Skip to content

Search filters put 'Programming Language :: Python :: N :: Only' checkboxes in an odd place #3851

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

Closed
bskinn opened this issue Apr 29, 2018 · 6 comments
Labels
bug 🐛 CSS/SCSS requires change to CSS/SCSS files help needed We'd love volunteers to advise on or help fix/implement this. HTML requires change to HTML files

Comments

@bskinn
Copy link
Contributor

bskinn commented Apr 29, 2018

The search-filter checkboxes are sorting the Programming Language :: Python :: N :: Only checkboxes below all of the respective N.n checkboxes, instead of placing them immediately below the N checkboxes:

more logical place for the checkboxes

This is highly nonintuitive, at least to me.

This may be low priority given that, e.g., #2442 and/or #3462 would presumably change the UI considerably.

@waseem18
Copy link
Contributor

waseem18 commented Apr 29, 2018

I second this. Only checkbox is a bit confusing. As @bskinn mentioned we should probably place Only below 2 and 3.

@brainwane brainwane added HTML requires change to HTML files CSS/SCSS requires change to CSS/SCSS files help needed We'd love volunteers to advise on or help fix/implement this. bug 🐛 labels May 2, 2018
@Cheukting
Copy link
Contributor

@nlhkabu do you want me to have a look at it?

@hellp
Copy link
Contributor

hellp commented Jul 28, 2018

The root cause seems to be the default ordering of Postgres' text fields.

Example:

SELECT classifier FROM mytable ORDER BY classifier;

Output:

Python :: 2 
Python :: 2.7 
Python :: 2 :: Only 

Looks like the collation "ucs_basic" (mentioned here as a SQL standard, but not default in PG, for UTF-8: https://www.postgresql.org/docs/10/static/collation.html) returns the strings in the order we'd prefer:

SELECT classifier FROM mytable ORDER BY classifier COLLATE ucs_basic ;

Output:

Python :: 2 
Python :: 2 :: Only 
Python :: 2.7 

What's the better idea? Simply change the query in the one place (does sqlalchemy support that somehow) or migrate the database field to always order by this collation?

@Cheukting
Copy link
Contributor

Amazing @hellp !

@nlhkabu
Copy link
Contributor

nlhkabu commented Jul 28, 2018

@dstufft is this something for you to look at?

@di
Copy link
Member

di commented Apr 3, 2020

This seems to have resolved itself. https://pypi.org/search/?q= currently shows the following:

Screen Shot 2020-04-02 at 9 41 42 PM

@di di closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 CSS/SCSS requires change to CSS/SCSS files help needed We'd love volunteers to advise on or help fix/implement this. HTML requires change to HTML files
Projects
None yet
Development

No branches or pull requests

7 participants