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

Allow NavLists to define sub-items as well as a trailing visual #1446

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Oct 4, 2022

The current implementation of NavList disallows attaching a trailing visual to items that also define sub items. This used to be because the trailing visual slot was used for the expand/collapse chevron icon that shows/hides the list of sub items. However, the component uses the private_trailing_action_icon slot for the chevron now, and should no longer raise an error if sub items are present and the trailing_visual slot has been provided. I believe it should instead raise an error if sub items are present and the trailing_action slot is provided, since it doesn't make sense to render two trailing actions.

@changeset-bot
Copy link

changeset-bot bot commented Oct 4, 2022

🦋 Changeset detected

Latest commit: efdf65c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Oct 4, 2022
@camertron camertron temporarily deployed to github-pages October 4, 2022 18:05 Inactive
@camertron camertron marked this pull request as ready for review October 4, 2022 18:34
@camertron camertron requested review from a team and jonrohan October 4, 2022 18:34
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay tests!

@camertron camertron merged commit 4f23552 into main Oct 4, 2022
@camertron camertron deleted the nav_list_allow_subitems_with_trailing_visual branch October 4, 2022 22:24
@primer-css primer-css mentioned this pull request Oct 4, 2022
jonrohan added a commit that referenced this pull request Oct 5, 2022
* Adding click action

* Saving focus and enter states

* Generating component snapshots

* resize window

* Generating component snapshots

* Adding themes

* Generating component snapshots

* Adding color theme attributes

* Clear snapshot folder before running

* Save actions

* Generating component snapshots

* try dark now

* Generating component snapshots

* Remove dark theme for followup

* Generating component snapshots

* Also run forms tests (#1447)

* Allow NavLists to define sub-items as well as a trailing visual (#1446)

* Adding theme param to render preview with theme (#1451)

* Adding theme param to render preview with theme

* lint and simplify logic

* Generating component snapshots

* Generating component snapshots

Co-authored-by: jonrohan <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
jonrohan added a commit that referenced this pull request Oct 6, 2022
* Adding click action

* Saving focus and enter states

* Generating component snapshots

* resize window

* Generating component snapshots

* Adding themes

* Generating component snapshots

* Adding color theme attributes

* Clear snapshot folder before running

* Save actions

* Generating component snapshots

* try dark now

* Generating component snapshots

* Remove dark theme for followup

* Generating component snapshots

* Also run forms tests (#1447)

* Allow NavLists to define sub-items as well as a trailing visual (#1446)

* Adding theme param to render preview with theme (#1451)

* Adding theme param to render preview with theme

* lint and simplify logic

* Generating component snapshots

* Generating component snapshots

Co-authored-by: jonrohan <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants