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

[DT-791] Add count to top of data library #2758

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

s-rubenstein
Copy link
Contributor

Addresses

Screenshot 2024-12-20 at 4 03 35 PM
Screenshot 2024-12-20 at 4 03 42 PM

Summary


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@s-rubenstein s-rubenstein requested a review from a team as a code owner December 20, 2024 21:03
@s-rubenstein s-rubenstein requested review from pshapiro4broad and rjohanek and removed request for a team December 20, 2024 21:03
Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

Looks good, thank you, see optional comment inline 👍🏽

summary='faceted dataset search table'
/>
<>
<div style={{ fontWeight: 600, borderBottom: '1px solid black' }}>{rowData.length} {_.capitalize(rowData.length > 1 ? tab.plural : tab.singular)}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

An interesting interaction is that if you filter to 0 records, the isEmpty(filteredData) condition kicks in and this block, along with the table, disappears. I think it would be cleaner to reflect that condition on this line, but it certainly isn't required. In that case, if we did show 0 records, the plural would be the correct language to use here.

Copy link
Member

Choose a reason for hiding this comment

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

I agree; I was expecting that the total would be outside the table, so it would be displayed in all cases. I don't see a specific UX proposal on the ticket so I may have missed a discussion about the UX in refinement.

Instead of showing a total inside the table, I think it would be better to show the total at the top, maybe on the same lines as the search (filter) text entry box. Also I would include both the number shown and the total number, so a user can tell how much of the total they're omitting. Text like "Showing X out of Y"/ "Showing all of Y"/"Showing none of Y" is one way to format this information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think for now my inclination is to leave the present isEmpty behavior, because it reduces redundant info. If necessary we can update it later.

Copy link
Contributor

@rjohanek rjohanek left a comment

Choose a reason for hiding this comment

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

Overall looks good, are there mocks for this? Does this reflect the filtered datasets/studies, or all? Does this work for the specific branded libraries too?

@s-rubenstein
Copy link
Contributor Author

@rjohanek I can't think of why branding would impact it - they should be using the same component?

It does update when I filter.

@s-rubenstein
Copy link
Contributor Author

@s-rubenstein
Copy link
Contributor Author

Screenshot 2025-01-06 at 10 56 43 AM

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

Thanks for the updates 👍🏽

@s-rubenstein s-rubenstein merged commit 076e286 into develop Jan 6, 2025
9 checks passed
@s-rubenstein s-rubenstein deleted the sr/dt-791-studies-total branch January 6, 2025 19:45
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.

4 participants