-
Notifications
You must be signed in to change notification settings - Fork 77
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
Enhancement: Custom labels for slider handles and ticks #4004
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Online
Issues logged by ArcGIS Online team members.
c-slider
Issues that pertain to the calcite-slider component
enhancement
Issues tied to a new feature or request.
estimate - 8
Requires input from team, consider smaller steps.
low risk
Issues with low risk for consideration in low risk milestones
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Milestone
Comments
paulcpederson
added
enhancement
Issues tied to a new feature or request.
0 - new
New issues that need assignment.
needs triage
Planning workflow - pending design/dev review.
labels
Jan 25, 2022
benelan
added
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
and removed
needs triage
Planning workflow - pending design/dev review.
labels
Jan 25, 2022
This came up in a Community question as well. |
benelan
changed the title
Enhancement: Custom labels for slider handles
Enhancement: Custom labels for slider handles and ticks
May 16, 2022
eriklharper
added
the
i18n-l10n
issues dealing with internationalization/localization
label
May 17, 2022
jcfranco
removed
the
i18n-l10n
issues dealing with internationalization/localization
label
May 24, 2022
geospatialem
modified the milestones:
2023 September Priorities - Main release,
2023 October Priorities - Maintenance Release
Sep 28, 2023
geospatialem
added
the
low risk
Issues with low risk for consideration in low risk milestones
label
Sep 28, 2023
geospatialem
modified the milestones:
2023 October Priorities - Maintenance Release,
2024 January Priorities - Main release
Oct 19, 2023
geospatialem
modified the milestones:
2024-01-17 - Jan Main Release,
2024-02-27 - Feb Maintenance Release
Jan 8, 2024
brittneytewks
added
the
estimate - 8
Requires input from team, consider smaller steps.
label
Jan 29, 2024
geospatialem
modified the milestones:
2024-02-27 - Feb Maintenance Release,
2024-03-26 - Mar Release
Feb 26, 2024
geospatialem
modified the milestones:
2024-03-26 - Mar Release,
2024-04-30 - Apr Release
Mar 25, 2024
jcfranco
added
2 - in development
Issues that are actively being worked on.
and removed
0 - new
New issues that need assignment.
labels
Apr 23, 2024
This was referenced Apr 24, 2024
jcfranco
added a commit
that referenced
this issue
Apr 24, 2024
**Related Issue:** #4004 ## Summary Adds `labelFormatter` prop to allow customization of handle and tick labels. ```ts interface CalciteSlider { /** * Formatter for custom handle/ticks labels. * * If the returned value is a string, it will get used in the label, * and if it is `undefined`, it will use the default, formatted label. */ labelFormatter( // the associated label value value: number, // the label type type: "min" | "max" | "value" | "tick" // the default formatter (configured with corresponding locale, numbering system and group separator defaultFormatter: (value: number): string; ): string | undefined; } ```
jcfranco
added
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
and removed
2 - in development
Issues that are actively being worked on.
labels
Apr 24, 2024
Installed and assigned for verification. |
DitwanP
added
4 - verified
Issues that have been released and confirmed resolved.
and removed
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
labels
Apr 24, 2024
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Online
Issues logged by ArcGIS Online team members.
c-slider
Issues that pertain to the calcite-slider component
enhancement
Issues tied to a new feature or request.
estimate - 8
Requires input from team, consider smaller steps.
low risk
Issues with low risk for consideration in low risk milestones
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Description
Currently the slider supports a
labelHandles
prop which shows the numeric value of each handle above the slider. There are many cases where the numeric value is not user friendly, and we'd like the ability to set a custom handle text.Acceptance Criteria
API should allow for dynamically updating the custom handle text in response to changes. We propose adding this via an additional prop
formatLabels
which accepts a function:This function returns a string and must be synchronous. Each time we render a tick label or a handle label, we call this function if available and render the resulting string instead. If this function is not defined or doesn't return a string, the original value is used.
Relevant Info
I can work on a solution to this for review as we need this for the current release.
This is a more abstract solution to #557 (closed due to inactivity) and is semi related to #2584 as it's the same concept for for handles rather than ticks.
Please respond with thoughts on the API and especially naming as this is a rather esoteric prop concept.
Which Component
calcite-slider
Example Use Case
There are lots of applications of this capability:
The text was updated successfully, but these errors were encountered: