Make information box viewing x of x less prominent #71
No reviewers
Labels
No labels
backend
bug
CI
dependencies
design
documentation
duplicate
enhancement
frontend
github_actions
good first issue
help wanted
invalid
javascript
question
refactoring
security
tooling
UX
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
NBIS/sda-download-ui!71
Loading…
Reference in a new issue
No description provided.
Delete branch "67-make-information-box-viewing-x-of-x-less-prominent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related issue(s) and PR(s)
This PR closes #67 and #75.
The viewing information was a little bit different between the Datasets and the datasets files list.
Type of change
List of changes made
Screenshot of the fix
With no pagination:

Testing
Test for different screen sizes, explorative testing.
Make sure production builds.
Definition of Done checklist
starting review
This works really nicely! However there is a point that needs some attention as I mention in the comment.
Here is a weird situation: If itemsPerPage = 10 and totalItems = 0 then
shouldShowViewingSummary == truebut then later theblock (line 67) will become
if falseso thatstartItemandendItemare not defined.However, the component will still render the summary because
shouldShowViewingSummaryistrue.Thank you, I will take a look at this!
I will make a fix for this and let you know, thank you!
@aaperis So please take a look again. This was supposed to be using the variable created earlier called
const shouldShowViewingSummary =
typeof itemsPerPage === "number" && typeof totalItems === "number";
But apparently I missed it. Hopefully this will cover the cases and not create weird behavior. Please take a look again!
Looks good, great work!