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

Rename CSS vars following DomainWidget refactor #1456

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Rename CSS vars following DomainWidget refactor #1456

merged 1 commit into from
Jul 19, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Jul 19, 2023

Fourth and final step in addressing #1377. Closes #1382.

A lot of the CSS variables (currently prefixed with --h5-domainSlider-) relate to the slider itself (track, thumbs, etc.), which is now named DomainSlider and exported, so those don't change.

Here are the variables that change:

  • --h5w-domainSlider-tooltip--bgColor => --h5w-domainWidget-popup--bgColor
    • Note that I'm replacing the term "tooltip" with "popup" to avoid confusion with the tooltip we show on top of visualisations. It's also kind of the wrong term in the context of the domain widget, since DomainControls is quite complex and the popup can be pinned open. It's more of a popover, really, but the term popup is a bit more generic and can apply to all toolbar popups (like the overflow menu). It's also consistent with the ARIA attribute aria-haspopup.
    • Also, it turns out that --h5w-domainSlider-tooltip--bgColor was actually applied to all toolbar "tooltips" in Toolbar.module.css. I introduce a new variable to fix this: --h5w-toolbar-popup--bgColor and use it as default for --h5w-domainWidget-popup--bgColor.
  • --h5w-domainSlider-tooltip--colorAlt => --h5w-domainControls--colorAlt
  • --h5w-domainSlider-boundInput--shadowColor => --h5w-domainControls-boundInput--shadowColor
  • --h5w-domainSlider-boundInput-focus--shadowColor => --h5w-domainControls-boundInput-focus--shadowColor
  • --h5w-domainSlider-boundInput-editing--bgColor => --h5w-domainControls-boundInput-editing--bgColor
  • --h5w-domainSlider-boundInput-editing--borderColor => --h5w-domainControls-boundInput-editing--borderColor
  • --h5w-domainSlider-histogram--bgColor => --h5w-histogram--bgColor
  • --h5w-domainSlider-histogram--color => --h5w-histogram--color
  • --h5w-domainSlider-histogram--color => --h5w-histogram-marker--color

@axelboc axelboc requested a review from loichuder July 19, 2023 13:26
Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

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

Note that I'm replacing the term "tooltip" with "popup" to avoid confusion with the tooltip we show on top of visualisations.

Good call 👍

@axelboc axelboc merged commit 582df1a into main Jul 19, 2023
@axelboc axelboc deleted the css-vars branch July 19, 2023 13:59
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.

[Toolbar] DomainSlider and DomainControls components decoupled from tooltip UI
2 participants