Steplist component - #5201
Conversation
|
Build successful! 🎉 |
|
Build successful! 🎉 |
There was a problem hiding this comment.
In general it's looking really good. Thank you for picking this up.
I don't seem able to undo any step except the last one
steps:
default story, keyboard navigate to the steplist and then to the last item
keyboard navigate back to the first item, only the last step is cleared out
Rest of my comments I think could be candidates for followup:
would be good to have less stories if they are covered by the controls, and instead add the more edge case stories, such as ones with steps that have long names which wrap or cause the steplist to take 100% of the width, or show them in a dialog, or maybe one with controlled selection that updates in response to events, or a disabled key in the middle but still have some enabled toward the far end. or starting with a disabled key. it'd also be good to have one with the keyboard activation set to manual
I have a feeling that we'll want/need to support links in steplists, we'll need an example of that to make sure it works
what I mean by that is specifically https://react-spectrum.adobe.com/react-spectrum/Breadcrumbs.html#links
| )}> | ||
| {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} | ||
| <a className={classNames(styles, 'spectrum-Steplist-link')} > | ||
| <VisuallyHidden {...stepStateProps}>{stepStateText}</VisuallyHidden> |
There was a problem hiding this comment.
I'm not hearing "Completed" ever read out on MacOS VO
| {item.rendered} | ||
| </span> | ||
| <span className={classNames(styles, 'spectrum-Steplist-marker-focus')}> | ||
| <span className={classNames(styles, 'spectrum-Steplist-marker')}>{(item.index || 0) + 1}</span> |
There was a problem hiding this comment.
we should internationalize this number using a number formatter
There was a problem hiding this comment.
I also feel like the announcement should prioritize the step number followed by the title
so instead of it reading "Dog 2", it should say something like "Step 2, Dog"
or, it should say "Dog, step 2"
| return { | ||
| ...state, | ||
| setSelectedKey, | ||
| setLastCompletedStep, |
There was a problem hiding this comment.
where is this used? can it be controlled through props selectedKey?
|
@snowystinger please give it another review when you get a chance. I addressed most of the feedback here and several of the items from the testing bash. I also cleaned up some things. Opted to use context instead of passing the |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Some behavioral things I noticed: In the last story, when I press next, I can go to step 4, but then if I click on step < 4, I can't get back to step 4 without clicking the next button eventually Unsure about this one, but when individual steps are disabled, they don't display their number, yet steps around them will. I think it looks funky, not sure I like it. |
|
Build successful! 🎉 |
Fixed
This is because I made changes to align more with the spec: #1012
I improved the stories a bit to help clear things up. I tried to rename them and added a I also added tests that hopefully describe the expected controlled and uncontrolled (sort of) states of the step list component.
I wasn't able to repro this one, but I wondered if this was related to the designs not having the numbers in incomplete steps for medium size, but the large and extra large incomplete steps do? https://spectrum-contributions.corp.adobe.com/page/steplist-beta/ |
|
Build successful! 🎉 |
snowystinger
left a comment
There was a problem hiding this comment.
we should check all package jsons so we don't have extraneous dependencies, I did a spot check
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
reidbarber
left a comment
There was a problem hiding this comment.
I think the isEmphasized text color may fail contrast requirements, so we may want to revisit that design. Besides that, I think this looks ready for an alpha release (after the empty documentation pages get removed.)
There was a problem hiding this comment.
For followup: address HCM styling, especially for disabled steplist
| "completed": "Completed: ", | ||
| "notCompleted": "Not completed: ", | ||
| "current": "Current: ", | ||
| "steplist": "Step List" |
There was a problem hiding this comment.
don't think we need this line since the aria hook is the one that needs this translation?
There was a problem hiding this comment.
This is for localizing the VisuallyHidden component states of the step to the DOM:
<li>
<a role="link" tabIndex="0">
<VisuallyHidden>Completed: </VisuallyHidden>
Details
</a>
</li>
There was a problem hiding this comment.
Right, but we don't need "steplist" if I'm not mistaken? Only the previous three lines are used:
react-spectrum/packages/@react-spectrum/steplist/src/StepListItem.tsx
Lines 55 to 61 in 060af14
|
Build successful! 🎉 |
snowystinger
left a comment
There was a problem hiding this comment.
Tracking remaining work for the team here https://github.com/orgs/adobe/projects/19/views/4?pane=issue&itemId=42835801
|
Build successful! 🎉 |
|
## API Changes
unknown top level export { type: 'any' } |
LFDanLu
left a comment
There was a problem hiding this comment.
Happy for this to be merged as is for testing and for the rest to be followup
Reviving work on the StepList component and dusting off PR #2832
Still need to add tests and docs but thought I would get the ball rolling.
StepList Component Issue - #1012
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: