Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui:(platform): fix spacing issue in the collections panel #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,33 @@ const FolderCloseIcon = (props) => (
export default {
renderItemArrow: ({ item, context }) => {
// console.log(item, 'arrow context');
const leftAligned : boolean = false;

const alignClass = cx({
"text-left": leftAligned,
"text-right": !leftAligned,
});
const requestTokenClass = cx({
"pr-5": leftAligned,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these classes not begin generated by tailwind.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try pnpm build:tailwind at the platform/firecamp-ui directory

"pl-5": !leftAligned,
"w-11": true,
"mr-2":true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mr-2 class is generated tho

});

if (item.data?.__ref?.isRequest) {
const { type = null, method = '' } = item.data?.__meta;
switch (type) {
case ERequestTypes.Rest:
const text = method.toUpperCase();
return (
<div className={cx(text, 'collection_leaf-node-type', 'm-r-4')} {...context.arrowProps}>{text}</div>
<div className={cx(text, 'collection_leaf-node-type', 'm-r-4', alignClass)} {...context.arrowProps}>{text}</div>
);
case ERequestTypes.GraphQL:
return <FcIconGraphQL className="text-graphql" size={24} {...context.arrowProps} />;
return <FcIconGraphQL className={cx(requestTokenClass,"text-graphql")} size={24} {...context.arrowProps} />;
case ERequestTypes.WebSocket:
return <FcIconWebSocket className="" size={24} {...context.arrowProps} />;
return <FcIconWebSocket className={requestTokenClass} size={24} {...context.arrowProps} />;
case ERequestTypes.SocketIO:
return <FcIconSocketIoSquare className="" size={24} {...context.arrowProps} />;
return <FcIconSocketIoSquare className={requestTokenClass} size={24} {...context.arrowProps} />;
default:
return <></>;
}
Expand Down Expand Up @@ -223,4 +235,4 @@ export default {
</li>
);
},
};
};
4 changes: 3 additions & 1 deletion platform/firecamp-ui/src/components/tree/tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@
.collection_leaf-node-type {
font-size: 12px;
font-weight: 700;
width: 2.5rem /* 40px */;
width: 2.7rem /* 43px */;
flex: none;
height: 1rem /* 16px */;
margin-right: 0.5rem;
}

.rct-tree-item-title-container {
align-items: center;
padding-top: 0.125rem /* 2px */;
Expand Down