Skip to content

feat: rendering colors in creator#85

Merged
bnszky merged 12 commits into
mainfrom
feat/colors
May 30, 2026
Merged

feat: rendering colors in creator#85
bnszky merged 12 commits into
mainfrom
feat/colors

Conversation

@alsjkdflkw

Copy link
Copy Markdown
Member

made the button and door colors generate in the editor, all the colors are created and stored in global variable

@bnszky bnszky requested review from 24bartixx and bnszky and removed request for bnszky May 16, 2026 17:02

@24bartixx 24bartixx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Displaying all colors of one object type in the select is not ideal. Once we add more colors (imagine 15 colors), finding the exact object with a desired color will be hell. Therefore, this solution will have to be replaced with the color options menu popup for the object (click the expand icon on the object --> choose color)

Image

If you have time, you can already do it like this
If you don't have time, you can finish up the current solution and that would be fine as well.

For the future, it would be advisable to include screenshots in the PR description as well as logic and explanation behind decisions regarding the code and solution.

Comment thread client/src/pages/creator.tsx Outdated
Comment thread client/src/pages/creator.tsx
Comment thread client/src/components/creator/creator-board/creator-tile.tsx
Comment thread client/src/constants/global.ts
@alsjkdflkw

Copy link
Copy Markdown
Member Author

sorry, i misunderstood the task description. I guess the visualization was misunderstood by me. I added a drop list for colors, and fix the ghost bug
image

@bnszky bnszky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add suggestions and fix bugs mentioned in the review. One more important feature:

Please adjust the color method to what is available in Phaser. We use in Phaser:

if (isColorized) {
      const colorInt = Phaser.Display.Color.HexStringToColor(color).color;
      this.sprite.setTint(colorInt);
    }

In this code, color all pixels the same. We want to make this visibility the same:
Current difference:

Image Image

Before or after implementing all suggestions and improvements, resolve conflicts and prepare this branch to merge

Comment thread client/src/components/creator/creator-board/creator-tile.tsx Outdated
Comment thread client/src/components/creator/creator-items-select/parts/creator-color-picker.tsx Outdated
Comment thread client/src/constants/layer-items.ts
Comment thread client/src/constants/layer-items.ts
Comment thread client/src/constants/layer-items.ts
@24bartixx

Copy link
Copy Markdown
Member

Apart from what Michał said, I see 2 inaccuracies that have to be addressed

  1. This icon arrow looks unintuitive
image
  1. Options menu is concluded inside the select component and doesn't appear fully
image

This can be resolved by the following methods:

  • overflow-visible style class in Tailwindcss (prefferable)
  • floating-ui (worth trying out if overflow-visible doesn't work)
  • portals with positioned elements (most complicated imo)

@bnszky

bnszky commented May 22, 2026

Copy link
Copy Markdown
Member

I resolved all the mentioned issues to fasten deployment. I added rotation for cables as well

@bnszky bnszky requested a review from Gwarnickn May 22, 2026 12:32
@bnszky bnszky merged commit d36b672 into main May 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants