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

ui: Adds ability to show a 'partial' list in list-collections #10174

Merged
merged 5 commits into from
May 7, 2021

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented May 4, 2021

We have a component that we use quite a lot called <ListCollection />, we use it for our 'virtual/DOM-recycling scrolling' and just for normal 'native scrolling' lists.

This PR adds a @partial attribute to this component, letting you specify that you only want a certain number of rows to show initially. When this attribute is set, we also render a 'View more' button to let the user expand the list to show all the rows instead of just a 'partial' amount.

partial-list

We also took the opportunity here to move the list-collection styles into the app/components/list-collection folder, so everything is co-located in the one folder.

@johncowen johncowen added the theme/ui Anything related to the UI label May 4, 2021
@johncowen johncowen marked this pull request as ready for review May 4, 2021 15:55
Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

Very cool 😎 LGTM

@vercel vercel bot temporarily deployed to Preview – consul May 7, 2021 15:44 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging May 7, 2021 15:45 Inactive
@johncowen johncowen merged commit 0e4db3f into master May 7, 2021
@johncowen johncowen deleted the ui/feature/partial-list-collection branch May 7, 2021 15:54
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/366012.

@hc-github-team-consul-core
Copy link
Collaborator

🍒✅ Cherry pick of commit 0e4db3f onto release/1.10.x succeeded!

hc-github-team-consul-core pushed a commit that referenced this pull request May 7, 2021
* ui: Add support for showing partial lists in ListCollection

* Add CSS for partial 'View more' button, and move all CSS to /components

* Enable partial view for intention permissions
@hc-github-team-consul-core
Copy link
Collaborator

🍒✅ Cherry pick of commit 0e4db3f onto release/1.9.x succeeded!

hc-github-team-consul-core pushed a commit that referenced this pull request May 7, 2021
* ui: Add support for showing partial lists in ListCollection

* Add CSS for partial 'View more' button, and move all CSS to /components

* Enable partial view for intention permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants