Skip to content

Filter table from Banner#22

Open
saaaaaally wants to merge 9 commits into
mainfrom
saally/bannerFilterTable
Open

Filter table from Banner#22
saaaaaally wants to merge 9 commits into
mainfrom
saally/bannerFilterTable

Conversation

@saaaaaally
Copy link
Copy Markdown
Collaborator

@saaaaaally saaaaaally commented Dec 22, 2021

Added filtering table from banner.
Filter Details tables by clicking on banner error/warning/info
Filter Files table by clicking on failed files
Clicking on "See details" switches to details table.

image
image

@saaaaaally saaaaaally marked this pull request as ready for review December 27, 2021 21:31
Comment thread src/components/DetailsTable.tsx Outdated
Copy link
Copy Markdown
Contributor

@gretanausedaite gretanausedaite left a comment

Choose a reason for hiding this comment

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

After you resolved conflicts, I think search filter should be last one to filter data in table.
Also, maybe we need a way to remove those filters?

onTabSelected={(index) => setCurrentTab(index === 0 ? 'files' : 'details')}
onTabSelected={(index) => {
setCurrentTab(index === 0 ? 'files' : 'details');
context.setSeverityFilter(undefined);
Copy link
Copy Markdown
Collaborator Author

@saaaaaally saaaaaally Dec 28, 2021

Choose a reason for hiding this comment

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

After you resolved conflicts, I think search filter should be last one to filter data in table. Also, maybe we need a way to remove those filters?

@gretanausedaite Filters can be removed by clicking banner a 2nd time or by switching tabs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think "Clicking banner a 2nd time" would be obvious "remove filter" action for users. I could be wrong. @FlyersPh9, any comments?

We can pass severity filter value to tables initial state:
image

This way when users click on banner, filter icon shows that filter was applied
image

But we'd need to rethink all data filtering actions, maybe move them to initial state. And I didn't quickly find a way to add Fatal and Errors to Error filter, so that might be a problem.

Anyways, for first implementation, if Jon approves, we could leave it as is.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree we need a way to visually know which filter is active.
I couldn't figure out either how to filter by both fatal and error or both warning and critical on the table, so I couldn't get the initial state in the table to work correctly.
So instead I added isr-active so that you can tell visually when each filter is active.
bannerActiveFilter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think "Clicking banner a 2nd time" would be obvious "remove filter" action for users. I could be wrong. @FlyersPh9, any comments?

Clicking a 2nd time on the banner to remove the filter does seem unintuitive. I would expect the user to clear the column filter by using Clear button within the column filter.

Comment thread src/components/DetailsTable.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants