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

Feature/#603 last used color picker #644

Merged
merged 7 commits into from
Jan 4, 2025

Conversation

jsanzdev
Copy link
Collaborator

@jsanzdev jsanzdev commented Jan 2, 2025

Closes #603

  • Shared context for the color picker.
  • You can save the custom colors with left click and override an existing saved one with right click (Tooltips added for usability)
  • Saving the project to a file will also save the custom color palette.
  • Importing from previous versions works too.

@jsanzdev jsanzdev linked an issue Jan 2, 2025 that may be closed by this pull request
@@ -19,6 +20,7 @@ export const mapFromQuickMockFileDocumentToApplicationDocument = (
return {
activePageIndex: 0,
pages: fileDocument.pages,
customColors: fileDocument.customColors || new Array(5).fill(null),
Copy link
Member

Choose a reason for hiding this comment

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

Why here 5 entries and below 16?

Maybe we could include this harcoded numbers into a const

@@ -342,6 +355,7 @@ describe('shapes to document mapper', () => {
shapes: shapespageA.concat(shapesPageB),
},
],
customColors: new Array(16).fill(null),
Copy link
Member

Choose a reason for hiding this comment

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

Let's create a cost

CUSTOM_COLORS_SIZE = 16

@brauliodiez brauliodiez merged commit 66ffc89 into dev Jan 4, 2025
2 checks passed
@brauliodiez brauliodiez deleted the feature/#603-Last-Used-Color-Picker branch January 4, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color picker replace preset colors with chosen colors once picked
2 participants