Added recent used colors in the brand panel#1830
Closed
SoloDevAbu wants to merge 2 commits intoonlook-dev:mainfrom
Closed
Added recent used colors in the brand panel#1830SoloDevAbu wants to merge 2 commits intoonlook-dev:mainfrom
SoloDevAbu wants to merge 2 commits intoonlook-dev:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 9cf63f2 in 2 minutes and 2 seconds. Click for details.
- Reviewed
107lines of code in3files - Skipped
0files when reviewing. - Skipped posting
10draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. apps/studio/src/lib/editor/engine/theme/index.ts:366
- Draft comment:
Consider adding in-code comments to clarify why addRecentColors() is called here and in similar update flows, preventing accidental duplicate calls. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. apps/studio/src/lib/editor/engine/theme/index.ts:548
- Draft comment:
The implementation of addRecentColors uses filtering and unshift; consider documenting that the recent colors list is maintained in memory only. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. apps/studio/src/routes/editor/EditPanel/StylesTab/single/ColorInput/ColorBrandPicker.tsx:127
- Draft comment:
Ensure that using color.lightColor for addRecentColors is consistent with the theme API calls (which use toHex()). - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. apps/studio/src/routes/editor/LayersPanel/BrandTab/index.tsx:81
- Draft comment:
Using array index as key (e.g.,recent-color-${index}) is acceptable if list order is stable; consider adding unique IDs if order can change. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. apps/studio/src/lib/editor/engine/theme/index.ts:382
- Draft comment:
Review: The call to reloadWebviews is no longer awaited. Confirm this fire‐and‐forget behavior is intended, as awaiting may be needed for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% 1. The comment asks to "confirm" the intention, which violates our rules about not asking for confirmations. 2. The method is called after scanConfig() which suggests it's a UI refresh that doesn't need to block. 3. Without seeing the implementation of reloadWebviews() or understanding the full system architecture, we can't be certain that awaiting is necessary. 4. The code appears to be working as intended since this is a deliberate change. I could be wrong about whether awaiting is necessary - perhaps there are race conditions or UI glitches that could occur without awaiting the reload. While race conditions are possible, we don't have strong evidence that awaiting is required. The change appears deliberate and UI refreshes often don't need to block. Delete this comment. It asks for confirmation rather than pointing out a clear issue, and we don't have strong evidence that awaiting is actually necessary.
6. apps/studio/src/routes/editor/EditPanel/StylesTab/single/ColorInput/ColorBrandPicker.tsx:127
- Draft comment:
Notice: addRecentColors is invoked here on color selection even though update methods also call it. Verify that duplicating this update is intentional and won’t cause unexpected ordering. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
7. apps/studio/src/routes/editor/LayersPanel/BrandTab/index.tsx:77
- Draft comment:
Suggestion: Consider conditionally rendering the 'Recent Colors' section (or showing a placeholder) when there are no recent colors to avoid an empty grid display. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
8. apps/studio/src/lib/editor/engine/theme/index.ts:366
- Draft comment:
Typo: The comment says 'Base on the class name, find the styles to update'. It would be more clear to say 'Based on the class name, find the styles to update'. - Reason this comment was not posted:
Comment was on unchanged code.
9. apps/studio/src/lib/editor/engine/theme/index.ts:3
- Draft comment:
Potential Typo: The module 'ColorPalletGroup' is imported. If this is intended to reference a color palette group, consider renaming it to 'ColorPaletteGroup' for clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. apps/studio/src/routes/editor/EditPanel/StylesTab/single/ColorInput/ColorBrandPicker.tsx:3
- Draft comment:
Typo alert: The import path uses 'ColorPalletGroup'. Consider verifying if 'Pallet' is intended or if it should be 'Palette', as it's the conventional spelling when referring to a range of colors. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_u8BOO0ROQwl3CQhE
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Contributor
|
Hey @SoloDevAbu , this is sick! Yes this can be cached in persistent storage or even in browser-level storage as well. I also DM'ed you on X. |
Contributor
|
Hello, I am migrating the desktop app to a new repository. This repository will now focus on the web version. This PR has been migrated to the new repository: onlook-dev#4. Sorry for the inconvenience, rest assure your work here will also be adapted for the web version (if it hasn't already). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added recent colors section to show 12 most recently used colors
Related Issues
fixes #1697
Type of Change
Testing
Tested by running locally
Screenshots (if applicable)
Important
Adds a recent colors section to the brand panel, displaying the 12 most recently used colors.
ThemeManagerinindex.tsto manage recent colors withaddRecentColors()andrecentColorList.BrandPopoverPickerinColorBrandPicker.tsxto add selected colors to recent colors.BrandTabinindex.tsxusingrecentColorListfromThemeManager.This description was created by
for 9cf63f2. You can customize this summary. It will automatically update as commits are pushed.