Skip to content

feat: Nested columns special type rows and expand by default #1872

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
merged 4 commits into from
May 26, 2022

Conversation

kristenarmes
Copy link
Contributor

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

Summary of Changes

This work builds on the nested columns changes outlined in this RFC. The changes included here are disabled for now until the nested columns dropdown behavior is enabled.

  1. Smaller height rows are included in the table to clearly show which types are nested arrays and/or maps. This is to help distinguish from structs, which previously were the only ones being displayed since they had named nested columns.
  2. The nested column rows will be expanded by default, unless a configured threshold is reached. This config is the same that has been used for the frontend parsing of nested columns.

Examples of the special type rows:

Array of structs
Screen Shot 2022-05-24 at 2 51 45 PM

Map
Screen Shot 2022-05-24 at 2 48 13 PM

Array of maps
Screen Shot 2022-05-24 at 2 49 25 PM

Tests

  • Check that columns are expanded by default if the total number of columns is less than or equal to than the configured value
  • Collapsed by default if the total is greater than the configured value
  • The correct number of special type rows appear for various map or array children types

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

…efault unless max config is reached

Signed-off-by: Kristen Armes <[email protected]>
@boring-cyborg boring-cyborg bot added area:frontend From the Frontend folder category:ui labels May 24, 2022
Signed-off-by: Kristen Armes <[email protected]>
{arrayOpenerLabel} {mapOpenerLabel}
</span>
</td>
{[...Array(additionalTableColCount)].map((value, index) => (
Copy link
Member

Choose a reason for hiding this comment

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

Would Array(additionalTableColCount).map work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the way I came across when looking for a how to add a dynamic number of elements. It does add the correct number of empty <td>s by iterating over the count, and the reason I'm doing this is bc otherwise the background-color was being cut off at the width of the first table column td

Signed-off-by: Kristen Armes <[email protected]>
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

Thanks a lot, great work!

@Golodhros Golodhros merged commit 30cf377 into amundsen-io:main May 26, 2022
@kristenarmes kristenarmes deleted the special-type-handling-rows branch May 26, 2022 21:25
hansadriaans pushed a commit to DataChefHQ/amundsen that referenced this pull request Jun 30, 2022
…n-io#1872)

* Special type handling rows for nested columns, and expand nested by default unless max config is reached

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

* Using constant for row height

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

* Addressing PR comments

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

* Passing max number of nested cols as an option to Table instead of from config

Signed-off-by: Kristen Armes <[email protected]>
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