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

Use color picker library to fix problems with Firefox #6488

Merged
merged 9 commits into from
Sep 22, 2022

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Sep 22, 2022

URL of deployed dev instance (used for testing):

Steps to test:

  • create a new annotation
  • create a tree and change it's color via right click in the tree tab
  • create a segment and change it's color via right click in the segments tab
  • ensure that the color editing "feels good" (the popover should close when it loses focus etc)

Issues:


…events (will act weird in Chrome when opening the color picker and closing it without changing a color)
@philippotto philippotto self-assigned this Sep 22, 2022
@philippotto
Copy link
Member Author

it's now deployed at https://fixcolorpicker.webknossos.xyz/

import { Popover } from "antd";
import * as Utils from "libs/utils";
import { HexColorInput, HexColorPicker } from "react-colorful";
import useThrottledCallback from "beautiful-react-hooks/useThrottledCallback";
Copy link
Member

Choose a reason for hiding this comment

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

Cool library 🤩

Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

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

Nice. Works like charm. Test with FF, Safari and Chrome on Mac.

<ThrottledColorPicker color={color} onChange={onChangeColor} />
);
return (
<Popover content={content} trigger="click" overlayStyle={{ zIndex: 10000 }}>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

😆 that's capturing how I felt while adding that really well

@philippotto philippotto enabled auto-merge (squash) September 22, 2022 13:31
@philippotto philippotto merged commit a6a5999 into master Sep 22, 2022
@philippotto philippotto deleted the fix-color-picker-2 branch September 22, 2022 13:53
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.

Changing segment/tree color is broken in Firefox
3 participants