rubygems.org icon indicating copy to clipboard operation
rubygems.org copied to clipboard

Allow sorting gems alphabetically in the Profile show page

Open heyapricot opened this issue 2 years ago • 4 comments

Hi! 👋 Looking at #3270, the idea of sorting gems in the rubygems.org page resonated with me. While this Pull Request does not implement all the sorting options mentioned in the issue (yet), it tries to lay the foundation for allowing to sort the gems displayed in the page.

If this approach is accepted, some follow-up questions are:

  • Would this be implemented in other pages? (e.g. search results)
  • How should we handle toggling between ascending or descending order?

Thanks for taking the time to review this! ☺️

heyapricot avatar Feb 20 '24 00:02 heyapricot

Hello and thanks for opening this PR.

currently it looks aligned well on wide screen

image

but seems off on tiny screen

image

Is that intended?

@martinemde @segiddins any ideas how to make gem lists sortable for now? There are various ways to manipulate rendered collections like this one on games page.

image

There is other filter on search page.

image

@heyapricot what's your usecase for this?

simi avatar Feb 25 '24 20:02 simi

@simi I was tackling issues from the list and on a personal note I've always been curious why sorting isn't an option

heyapricot avatar Feb 27 '24 01:02 heyapricot

@simi Fixed the alignment issue on mobile

heyapricot avatar Feb 27 '24 02:02 heyapricot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.15%. Comparing base (d5ec157) to head (b9e75bf). Report is 72 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4471   +/-   ##
=======================================
  Coverage   97.15%   97.15%           
=======================================
  Files         391      391           
  Lines        8260     8261    +1     
=======================================
+ Hits         8025     8026    +1     
  Misses        235      235           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 25 '24 19:03 codecov[bot]