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

Add Color Code Display for Single Color Filaments #526

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion client/src/components/spoolIcon.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
width: 1.5em;
height: 2.5em;
gap: 2px;
margin: 0 0.5em;
Copy link
Owner

Choose a reason for hiding this comment

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

This doesn't look so good in the spool list, the text is butted up against the color block. Why did you remove this?

Copy link
Author

Choose a reason for hiding this comment

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

Just an UI/UX improvement.

During development, I saw, that the color is not aligned to the same spot as other records. I thought this was not intended.

image

If this was your intention, I will revert the change 😊

Copy link
Author

Choose a reason for hiding this comment

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

Oh okay, I see the issue! Will fix that

}

.spool-icon.vertical {
Expand Down
1 change: 1 addition & 0 deletions client/src/pages/filaments/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const FilamentShow: React.FC<IResourceComponentsProps> = () => {
<TextField value={record?.name} />
<Title level={5}>{t("filament.fields.color_hex")}</Title>
{colorObj && <SpoolIcon color={colorObj} size="large" />}
{record?.color_hex && <TextField value={`#${record?.color_hex}`} />}
<Title level={5}>{t("filament.fields.material")}</Title>
<TextField value={record?.material} />
<Title level={5}>{t("filament.fields.price")}</Title>
Expand Down