repology / repology-webapp

Repology web application
https://repology.org
GNU General Public License v3.0
200 stars 26 forks source link

Allow to specify minimum cell width for vertical badge #219

Closed Cimbali closed 1 year ago

Cimbali commented 1 year ago

My use case is basically trying to display 2 “related” packages in terms of repology detection, which are in fact the same package.

Displaying the 2 badges below each other and skipping the 2nd header is getting close to being satisfying but the very large width disparity is a little strange:

image

This PR allows to set a minwidth of a cell via a parameter, so I can specify columns=2&minwidth=200 and have a more similar display across both badges, thus increasing readability.

60 remains the minimum, and the fallback if no value or an incorrect value is passed.

AMDmi3 commented 1 year ago

You don't need that, you need projects merged instead.

Cimbali commented 1 year ago

That is even better indeed, thanks a lot @AMDmi3 !

If I’d known that was a thing I would have given the project name rather than letting you search for what it was :sweat_smile:

AMDmi3 commented 1 year ago

If I’d known that was a thing I would have given the project name rather than letting you search for what it was sweat_smile

No problem, I've recovered it from repository+version combinations :)

For the record, the change was also not entirely correct, as it affected version column which has the same width in this case, while you've likely intended to align columns with repository names.