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

Refactor Selector API and implement ComplexVisTypeSelector #1652

Merged
merged 1 commit into from
May 28, 2024

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented May 22, 2024

BREAKING

  • I replace the optionComponent prop of Selector with a cleaner renderOption prop. This simplifies a few things, including removing the need for dedicated option components (ScaleOption and ColorMapOption).
  • I replace the now-removed ColorMapOption, which was exported in the lib to address Customizing toolbar #1377, with a new component called ColorMapGradient that takes care only of rendering a little gradient preview for a given color map (which should in fact cover more customisation use cases).

NEW FEATURE

  • I create a component called ComplexVisTypeSelector (in line with ColorMapSelector and ScaleSelector) to reduce duplication, and I export it in the lib;
  • I move enum ComplexVisType to the shared package and I export it in the lib; I also replace its values and stop relying on them for display purposes (axis label, plot title, selector options), as this seemed very brittle and prevented displaying different labels in different places.

@axelboc axelboc force-pushed the refact-selector branch 2 times, most recently from 73aaa8d to e6dda13 Compare May 22, 2024 12:30
@axelboc axelboc requested a review from loichuder May 22, 2024 12:33
@axelboc axelboc force-pushed the refact-selector branch from e6dda13 to ca67638 Compare May 22, 2024 13:24
@axelboc axelboc merged commit 2835722 into main May 28, 2024
8 checks passed
@axelboc axelboc deleted the refact-selector branch May 28, 2024 06:48
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