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

Emit calciteStepperItemChange when navigating by stepper methods #5021

Closed
nwhittaker opened this issue Jul 26, 2022 · 8 comments
Closed

Emit calciteStepperItemChange when navigating by stepper methods #5021

nwhittaker opened this issue Jul 26, 2022 · 8 comments
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. c-stepper Issues that pertain to the calcite-stepper component enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented Jul 26, 2022

Description

When a user clicks a button that invokes a stepper method and navigates a stepper, the stepper should emit a calciteStepperItemChange events.

Acceptance Criteria

A stepper emits a calciteStepperItemChange whenever the step changes either by clicking a stepper-item heading or via a stepper method.

Relevant Info

No response

Which Component

calcite-stepper

Example Use Case

In some cases, it's necessary to force a user to visit steps in order. This can currently be accomplished by disabling subsequent steps and offering a button that, when clicked, enables the next step and navigates to it via the stepper's nextStep() method.

In order to cleanly track the current step and which steps have been visited (regardless if the user clicked the button or navigated to a previously enabled step by clicking its heading), it'd be helpful to unify that code in a single calciteStepperItemChange handler.

Another use case is the event provides an indicator that the step is rendered and ready for any setup work (e.g. setting initial focus).

@nwhittaker nwhittaker 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 Jul 26, 2022
@jcfranco
Copy link
Member

jcfranco commented Aug 3, 2022

We only emit change events on user interaction, so any code calling the stepper methods needs to sync up accordingly. Reason being that the code calling the stepper methods knows that there is potentially a change in step, hence why we don't emit. It also helps avoid cases where we can't distinguish where a change event came from.

I think what's missing is a property to easily know the selected stepper item. FYI, I'll have a PR for cleaning up event payloads this week that will introduce this prop.

@benelan benelan added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. and removed ArcGIS Field Apps labels Jan 30, 2023
@geospatialem geospatialem added spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Nov 6, 2023
@macandcheese
Copy link
Contributor

Some items here as follow up from triage:

  • This component does not adhere to the convention of limiting publicly methods. Propose to remove the current methods.
  • Currently, the calciteStepperItemChange is emitted from Stepper. There is no event emitted from Stepper Item.
  • To match other components, we should emit StepperItemChange from Stepper Item and emit a new StepperChange from Stepper

@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Dec 6, 2023
@macandcheese macandcheese added the c-stepper Issues that pertain to the calcite-stepper component label Apr 29, 2024
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

Installed and assigned for verification.

@jcfranco jcfranco added 0 - new New issues that need assignment. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels May 9, 2024
@jcfranco jcfranco assigned jcfranco and unassigned geospatialem and DitwanP May 9, 2024
@jcfranco jcfranco added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels May 9, 2024
@jcfranco
Copy link
Member

jcfranco commented May 9, 2024

Installed and assigned for verification.

False alarm. Updated the label on the wrong issue. 😅

nothing-to-see

@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels May 15, 2024
@jcfranco
Copy link
Member

Spike summary:

@jcfranco jcfranco added the spike complete Issues that have a research spike completed and dev work can proceed label May 15, 2024
@github-actions github-actions bot added 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. 2 - in development Issues that are actively being worked on. labels May 15, 2024
@github-actions github-actions bot removed this from the 2024-05-28 - May Main Release milestone May 15, 2024
Copy link
Contributor

cc @geospatialem, @brittneytewks

@jcfranco jcfranco self-assigned this May 15, 2024
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library and removed 0 - new New issues that need assignment. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. spike complete Issues that have a research spike completed and dev work can proceed labels May 15, 2024
@jcfranco
Copy link
Member

Added to this milestone per ☝️.

@jcfranco
Copy link
Member

Closing in favor of #2094 as title and description are closer to the changes #9351 will include. cc @geospatialem

@jcfranco jcfranco removed this from the 2024-05-28 - May Main Release milestone May 17, 2024
@jcfranco jcfranco added 0 - new New issues that need assignment. and removed 2 - in development Issues that are actively being worked on. labels May 17, 2024
@jcfranco jcfranco removed their assignment May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. c-stepper Issues that pertain to the calcite-stepper component enhancement Issues tied to a new feature or request. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

7 participants