-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: S2 Guides #9083
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
docs: S2 Guides #9083
Conversation
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
LFDanLu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving for testing
| /*- end focus -*/ | ||
|
|
||
| return ( | ||
| <TableView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda unfortunate that we don't have ListView or standalone ListBox for S2. Perhaps a Picker or ComboBox would be preferable to a single column TableView? Not too bothered by this tbh, just felt kinda odd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can probably improve this. There is probably a different endpoint that has more properties that we can use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit unrelated since this PR is for S2, but should this also exist on the RAC side? Or was it omitted there on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #9083 (comment)
|
|
||
| Selection is represented by a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) containing the `id` of each selected item. You can also pass any iterable collection (e.g. an array) to the `selectedKeys` and `defaultSelectedKeys` props, but the `onSelectionChange` event will always pass back a Set. | ||
|
|
||
| <ExampleSwitcher type="component" examples={['CardView', 'Menu', 'SelectBoxGroup', 'TableView', 'TagGroup', 'ToggleButtonGroup', 'TreeView']}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Picker be here as well? Similar question w/ regard to the Single Selection section too
|
|
||
| </ExampleSwitcher> | ||
|
|
||
| ## Item actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the CardView examples here also have a more constrained size like the previous examples? Will help with the scroll jumping when all the examples above change size from CardView to an example that is smaller in height
| export const tags = ['links', 'navigation']; | ||
| export const description = 'Integrating client side routing with React Spectrum'; | ||
|
|
||
| # Client Side Routing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we were planning on merging this into a "Framework setup" page, but ok for now.
|
|
||
| ComboBox, SegmentedControl, and Tabs only support single selection and use the `selectedKey` prop (singular) rather than `selectedKeys`. | ||
|
|
||
| <ExampleSwitcher type="component" examples={['CardView', 'ComboBox', 'Menu', 'SegmentedControl', 'SelectBoxGroup', 'TableView', 'Tabs', 'TagGroup', 'ToggleButtonGroup', 'TreeView']}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol that's a lot of examples 😂 do we need to show every single component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it does feel heavy.
Includes guides for Collections, Forms, Client Side Routing, and Selection.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: