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

[v1.1.8] Color fallback property is not always correctly defined #2

Closed
ChrisUser opened this issue Apr 24, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ChrisUser
Copy link
Owner

Affected versions

v1.1.7 - v1.1.8

Bug description

Most of the times one or more slots, without a previous defined background color, render as a transparent block.

Possible solution

  • This bug could be caused by the concurrence of the two useEffect hooks: one sets the array of the colors used (later) for the items without one; the other formats the items array with the correct color property.

The effect is that the items are, sometimes, formatted before the full usedColors array is populated.

  • Also the callback that renders the usageBar isn't triggered by the formatted items array changes, it runs only once.
@ChrisUser ChrisUser added bug Something isn't working good first issue Good for newcomers labels Apr 24, 2022
@ChrisUser ChrisUser self-assigned this Apr 24, 2022
@ChrisUser ChrisUser pinned this issue Apr 24, 2022
@ChrisUser
Copy link
Owner Author

ChrisUser commented Apr 24, 2022

Unfortunately this issue affects v1.1.9 - v1.1.12 too.

@ChrisUser
Copy link
Owner Author

I'm gonna work on a performance efficient version for React v18 in the near future but at the moment seems that updating the project to v1.1.13 solves the issue.

Going to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant