Skip to content

feat: Adding expand all/collapse all functionality for nested columns #1888

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

Merged

Conversation

kristenarmes
Copy link
Contributor

@kristenarmes kristenarmes commented Jun 6, 2022

Signed-off-by: Kristen Armes [email protected]

Summary of Changes

Added a button that displays Expand all nested or Collapse all nested to allow users to expand/collapse all nested columns with one click. This will default to show as Collapse all nested for most cases, but if the amount of columns exceeds the configured threshold then it will default to have all the rows collapsed and display Expand all nested on the button. In addition, a small caret button was added to the table header in vertical alignment with the other expand/collapse buttons per row that allows users to expand all/collapse all from there as well.

Screen Shot 2022-06-07 at 2 14 51 PM

Screen Shot 2022-06-07 at 2 17 25 PM

Tests

In the Table component, added tests for the rendering of the expand/collapse all button that appears in the table header, along with lifecycle tests for when the button is clicked. The TableDetailPage tests the usage of the toggleExpandingColumns function which sets the state to determine whether all the columns should be expanded or collapsed.

Documentation

N/A

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does

@boring-cyborg boring-cyborg bot added area:frontend From the Frontend folder category:ui labels Jun 6, 2022
@kristenarmes kristenarmes marked this pull request as ready for review June 6, 2022 22:20
Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

LGTM

Some minor comments, great job!

Copy link
Member

@Golodhros Golodhros left a comment

Choose a reason for hiding this comment

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

LGTM

@Golodhros Golodhros merged commit 1204acc into amundsen-io:main Jun 7, 2022
@kristenarmes kristenarmes deleted the expand-and-collapse-all-button branch June 7, 2022 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend From the Frontend folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants