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

Added custom color selector for issue #49 #67

Merged
merged 4 commits into from
Feb 11, 2024

Conversation

hunterchen7
Copy link
Contributor

@hunterchen7 hunterchen7 commented Feb 9, 2024

This adds a custom color selector, it is draggable and closes when clicked outside.

color picker

I used SketchPicker from react-color for the color picker and Draggable from react-draggable to make it draggable.

I'm not sure how styling should best be done but I added new classes to styles.module.css in ./Palette to do it.

I also updated 2 if statements in src-tauri/src/command.rs to be more concise, mentioned in #66.

It can definitely look better, it clashes a bit stylistically and doesn't change depending on lightmode/darkmode but it gets the job done. I don't think it's quite merge ready but a decent place to start. I would like help with the styling if you can find some time.

Copy link
Owner

@kkoomen kkoomen left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for implementing this. Please implement the changes as requested from this review. I'll test your changes soon and if everything works as expected, we can merge and do a new release.


it clashes a bit stylistically and doesn't change depending on lightmode/darkmode

This is obvious and isn't something to be concerned about. This app provides a colorscheme that works for both modes. If the user has the choice to select any color, then it's out of our control what the end result will look like, so this is completely fine.

--

EDIT: I have made some changes myself:

  • select color on single click
  • open color selector on double click
  • add tooltip hinting that double click opens selector
  • add custom icon to show a visual difference with the color directly on the left
  • adjust general color selector tool styling
image

When hovering:

image

The reason for using single-click and double-click here, is because when single-clicking, people want to draw, not to first remove the color selector tool.

src/components/Paper/components/Palette/index.js Outdated Show resolved Hide resolved
src/components/Paper/components/Palette/index.js Outdated Show resolved Hide resolved
@kkoomen kkoomen marked this pull request as ready for review February 11, 2024 09:45
- select color on single click
- open color selector on double click
- add tooltip hinting that double click opens selector
- add custom icon to show a visual difference with the color directly on the left
- adjust general color selector tool styling
@kkoomen kkoomen merged commit ce1486d into kkoomen:master Feb 11, 2024
5 checks passed
@kkoomen kkoomen mentioned this pull request Feb 11, 2024
@hunterchen7 hunterchen7 deleted the custom-colors branch February 15, 2024 02:54
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.

2 participants