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

feat(slider): improve slider variants and gapratio #3111

Merged
merged 7 commits into from
Oct 31, 2024

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Oct 23, 2024

Description

This PR enhances the slider component, so it

  • fixes some slider issues
    • tick color on inverted variant
    • tick position on vertical variant
    • wrong gapratio calculation when calculated number of labels is a prime number
    • adds internal caching of otherwise often repeated calculations
  • improves labelType "letter" option,
    • which now supports a custom letter string or array (was hardcoded before)
    • "increases" the letters in case more labels than given letters are needed (like the columns of a spreadsheet)
  • adds another variant vertical right aligned
  • adds an optional value fixed for autoAdjustLabels
  • adds another option highlightRange to slightly highlight the selected area range
  • supports the usage of ui label

Screenshot

image
image
image

Testcase

https://jsfiddle.net/lubber/1tvumckq/48/

Closes

#3103

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug type/feat Any feature requests or improvements lang/css Anything involving CSS state/awaiting-reviews Pull requests which are waiting for reviews javascript Pull requests that update Javascript code labels Oct 23, 2024
@lubber-de lubber-de added this to the 2.9.4 milestone Oct 23, 2024
@lubber-de
Copy link
Member Author

An enhanced variant of the solution in #3100 is implemented as well by using autoAdjustLabels: 'fixed' as described in #3100 (comment)

Copy link
Contributor

@prudho prudho left a comment

Choose a reason for hiding this comment

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

Very nice changes ! LGTM 👍

@lubber-de lubber-de merged commit 24c0a2b into fomantic:develop Oct 31, 2024
11 checks passed
@lubber-de lubber-de deleted the sliderImprovements branch October 31, 2024 19:33
lubber-de added a commit that referenced this pull request Oct 31, 2024
Missing and new types for slider matching the feature s of #3111
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lang/css Anything involving CSS state/awaiting-docs Pull requests which need doc changes/additions type/bug Any issue which is a bug or PR which fixes a bug type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants