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

calcite-slider > decouple ticks, labels and stops #5827

Open
richiecarmichael opened this issue Nov 29, 2022 · 11 comments
Open

calcite-slider > decouple ticks, labels and stops #5827

richiecarmichael opened this issue Nov 29, 2022 · 11 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. blocked This issue is blocked by another issue. 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. figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@richiecarmichael
Copy link

Description

At present calcite-slider assumes that ticks, tick labels and stops coincide and that all three are at regular intervals. This is rarely the case. The solution is to have independent properties for all three. For examples:

{
  min: 0,
  max: 100,
  // Place small ticks at 10 unit spacing
  ticks: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
  // Label each quarter.
  labels: [0, 25, 50, 75, 100], 
  // Slider thumbs will snap at 10 unit intervals.
  steps: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
}

What are Labels?

Label will consist of text and longer tick mark, See #2584 for proposal on custom label formatter.

Design

class slider {
  ticks: number[];
  labels: number[];
  steps: number[];
}

Breaking changes:

  1. slider.labelTicks is obsolete
  2. slider.ticks changes from number to number[]

// @driskull @jcfranco

Acceptance Criteria

See above.

Relevant Info

Related issues:

#5522 - calcite-slider > layout vertical and horizontal
#2584 - Enhancement: calcite-slider - custom tick label formatters
#1631 - Enhancement: Configurable slider highlighting

Which Component

calcite-slider

Example Use Case

image

Esri team

ArcGIS API for JavaScript

@richiecarmichael richiecarmichael added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Nov 29, 2022
@github-actions github-actions bot added the ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. label Nov 29, 2022
@ubatsukh
Copy link

@driskull can you please change the priority of this issue to high as MV is asking for dimension/range slider. @jcfranco, we hope you can work the slider issues when you get back from your paternity leave. :)

The other slider issues that need to be addressed before the Ranger slider widget can be implemented in the API:
#5522
#2584
#1631

Here are the API requirements for the Range Slider: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/46032#issuecomment-3805946

@geospatialem geospatialem added the p - high Issue should be addressed in the current milestone, impacts component or core functionality label Nov 29, 2022
@driskull
Copy link
Member

@ubatsukh marked them as higher priority. We will figure out which milestone these can be taken care of after the 1.0 release.

@brittneytewks brittneytewks added estimate - 13 Requires planning and input from team, consider smaller steps. estimate - 8 Requires input from team, consider smaller steps. and removed estimate - 13 Requires planning and input from team, consider smaller steps. labels Mar 22, 2023
@brittneytewks
Copy link

Better understand user priority. Start in April for future milestone implementation

@brittneytewks brittneytewks added research Issues that require more in-depth research or multiple team members to resolve or make decision. and removed needs triage Planning workflow - pending design/dev review. labels Mar 22, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Mar 29, 2023
@geospatialem geospatialem added 0 - new New issues that need assignment. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Apr 6, 2023
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library and removed p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Apr 6, 2023
@jcfranco
Copy link
Member

jcfranco commented Sep 13, 2024

Blocked by #5522. @geospatialem @DitwanP

@jcfranco jcfranco added the blocked This issue is blocked by another issue. label Sep 13, 2024
@richiecarmichael
Copy link
Author

Good progress has been made to decouple steps, ticks and labels. Steps and ticks are now independent and while labels are coincident with ticks can be customized with a labelFormatter.

However steps and ticks are still regularly spaces from the start of the slider. When dealing with temporal data, irregular spaced steps, ticks and labels are the norm. Below are a few scenarios that have irregular steps/ticks/labels:

  1. A slider with ticks representing imagery captured during the day.
  2. A slider representing a time range with steps/ticks/labels representing:
    a) months (the number of days per month varies)
    b) years (leap years, leap seconds)

In this sample, the months of 2024 are shown as steps and ticks. Note that because these are evenly spaced that the start of July is assumed to be July 2.
image

@ashetland ashetland added the figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. ArcGIS Maps SDK for JavaScript Issues logged by ArcGIS SDK for JavaScript team members. blocked This issue is blocked by another issue. 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. figma changes Issues that require additions or updates to the Figma UI Kit where no `design` label exists p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

8 participants