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

[features][ML listview] Sort on table headers #14963

Merged
merged 4 commits into from Nov 23, 2022

Conversation

ronronscelestes
Copy link
Contributor

@ronronscelestes ronronscelestes commented Nov 22, 2022

What

Make name, createdAt and updatedAt columns sortable

Tests

Sort on any of those attributes
Should be accessible through keyboard + voice reader tools

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Base: 49.78% // Head: 59.77% // Increases project coverage by +9.98% 🎉

Coverage data is based on head (c2b6052) compared to base (1d8d318).
Patch coverage: 96.00% of modified lines in pull request are covered.

Additional details and impacted files
@@                        Coverage Diff                         @@
##           features/MediaLibrary-listview   #14963      +/-   ##
==================================================================
+ Coverage                           49.78%   59.77%   +9.98%     
==================================================================
  Files                                 290     1343    +1053     
  Lines                               10189    32712   +22523     
  Branches                             2254     6239    +3985     
==================================================================
+ Hits                                 5073    19554   +14481     
- Misses                               4217    11298    +7081     
- Partials                              899     1860     +961     
Flag Coverage Δ
back 49.78% <ø> (ø)
front 64.29% <96.00%> (?)
unit_back 49.78% <ø> (ø)
unit_front 64.29% <96.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core/upload/admin/src/constants.js 100.00% <ø> (ø)
...es/core/upload/admin/src/pages/App/MediaLibrary.js 81.88% <0.00%> (ø)
...ore/upload/admin/src/components/TableList/index.js 98.03% <100.00%> (ø)
...nditionsModal/utils/createDefaultConditionsForm.js 100.00% <0.00%> (ø)
...dmin/src/hooks/useReleaseNotification/utils/api.js 0.00% <0.00%> (ø)
...onents/MediaLibraryInput/Carousel/CarouselAsset.js 62.50% <0.00%> (ø)
...onents/FolderCard/FolderCardBody/FolderCardBody.js 100.00% <0.00%> (ø)
...s/core/upload/admin/src/hooks/utils/rename-keys.js 100.00% <0.00%> (ø)
...ollapsePropertyMatrix/ActionRow/utils/constants.js 0.00% <0.00%> (ø)
packages/core/admin/admin/src/core/apis/Plugin.js 5.88% <0.00%> (ø)
... and 1046 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@jhoward1994 jhoward1994 left a comment

Choose a reason for hiding this comment

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

Nice works well, I just have one idea

<IconButton
label={sortLabel}
onClick={() => handleClickSort(isSorted, name)}
icon={isUp ? <CarretUp /> : <CarretDown />}
Copy link
Member

Choose a reason for hiding this comment

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

Worth passing a children instead? wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why not yes! just out of curiosity, is there a noticeable difference between passing it as prop/children? for better reading?

packages/core/upload/admin/src/pages/App/MediaLibrary.js Outdated Show resolved Hide resolved
Copy link
Contributor

@jhoward1994 jhoward1994 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ronronscelestes ronronscelestes merged commit 1ebcc5f into features/MediaLibrary-listview Nov 23, 2022
@ronronscelestes ronronscelestes deleted the ML-listview/sort branch November 23, 2022 12:49
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.

None yet

3 participants