? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar rajputanuj31
rajputanuj31
24 Jan 2023

Adding sorting feature in media files

Pull Request for Issue #31347

Summary of Changes

Added some extra sorting techniques in Media files

Testing Instructions

  • Go to media
  • Select List View
  • click on name or size or dimension or date created or date modified

Actual result BEFORE applying this Pull Request

No sorting happens

Expected result AFTER applying this Pull Request

You can sort the media files by name or size .... by clicking on respective column heading
Sorting will be first ascending and after clicking again sorting will be descending

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Before Sorting

sort1

After Sorting By Name In Descending Order

sort 2

avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2023
Category Administration com_media NPM Change
avatar rajputanuj31 rajputanuj31 - open - 24 Jan 2023
avatar rajputanuj31 rajputanuj31 - change - 24 Jan 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2023
Category Administration com_media NPM Change Administration com_media NPM Change Repository
avatar rajputanuj31 rajputanuj31 - change - 24 Jan 2023
Labels Added: NPM Resource Changed ?
avatar rajputanuj31 rajputanuj31 - change - 24 Jan 2023
The description was changed
avatar rajputanuj31 rajputanuj31 - edited - 24 Jan 2023
avatar rajputanuj31 rajputanuj31 - change - 24 Jan 2023
The description was changed
avatar rajputanuj31 rajputanuj31 - edited - 24 Jan 2023
avatar brianteeman
brianteeman - comment - 24 Jan 2023

Please update the title of this Pull Request to something more meaningful. The titles are automatically used in the changelog so it is important that they are descriptive.

image

avatar rajputanuj31 rajputanuj31 - change - 24 Jan 2023
Title
Github Issue #31347
Sort the Media files from the Media list.
avatar rajputanuj31 rajputanuj31 - edited - 24 Jan 2023
avatar brianteeman
brianteeman - comment - 24 Jan 2023

How do you expect someone to know that they can click on a heading to sort?
How do you expect someone to know what the current sort is?
How do you expect someone to know what the current sort direction is?

Take a look at core Joomla components

avatar dgrammatiko
dgrammatiko - comment - 24 Jan 2023

@rajputanuj31 just to save you some time here the current approach that you’re following is wrong. What needs to be done here is to involve the store for remembering the users preference and then the items will adjust automatically the sorting according to the store value. That way switching from table to icons view you maintain the same sorting and also navigating around is more predictable. You could check this pr #39586 for the store parts. Also all the points that @brianteeman mentioned above should be solved…

avatar rajputanuj31
rajputanuj31 - comment - 27 Jan 2023

Hello @dgrammatiko so far I have been able to implement the changes suggested by @brianteeman but I am struggling to save the preferences of the user for default behaviour. I had checked the PR you mentioned and try to understand it and some more tips will be helpful

So far my progress:

media sort2

avatar brianteeman
brianteeman - comment - 27 Jan 2023

This is not correct. Take a look at core Joomla components. You should be using the exact same user interface for sorting the columns

avatar dgrammatiko
dgrammatiko - comment - 29 Jan 2023

@rajputanuj31 what I meant with the comment above was the changes here: 082ae03

The last 3 files in that commit are related to the store, the actions, the mutations and the default values. Anyways, the PR #39732 should solve the ordering issue.

avatar rajputanuj31
rajputanuj31 - comment - 29 Jan 2023

@rajputanuj31 what I meant with the comment above was the changes here: 082ae03

The last 3 files in that commit are related to the store, the actions, the mutations and the default values. Anyways, the PR #39732 should solve the ordering issue.

Ok understand now. So should I close this PR now.

avatar Quy
Quy - comment - 29 Jan 2023

Ok understand now. So should I close this PR now.

Yes, please.

avatar rajputanuj31
rajputanuj31 - comment - 29 Jan 2023

As PR #39732 solved the ordering issue so closing this PR

avatar rajputanuj31 rajputanuj31 - close - 29 Jan 2023
avatar rajputanuj31 rajputanuj31 - change - 29 Jan 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-01-29 17:14:49
Closed_By rajputanuj31
Labels Added: ?

Add a Comment

Login with GitHub to post a comment