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

[WIP] Interactive table on gems page #393

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

[WIP] Interactive table on gems page #393

wants to merge 16 commits into from

Conversation

cllns
Copy link
Member

@cllns cllns commented Jan 26, 2022

Fixes #314.

I'll have to clean this up a bit, especially since I had to tweak the build and deploy scripts to get a demo page up.

Anyway, it took me way too long but I got a demo page up: http://dry.cllns.com/gems/

Let me know what you think!

The table gem I used (gridjs), is quite nice and simple but it doesn't have great support for converting from a <table> like we're doing here. I can't format the cells or headers at all (sorting on 'name' is broken and I can't disable it), see grid-js/gridjs#908 . So, if we want to go forward with this, we can generate a .json file instead, and pull that in. Then we'll be able to customize it how we want. (And, later, we could switch the endpoint to a... gasp, real server, if we need.)

For "popularity", I used the following system based on the number of downloads each gem has (though I bumped dry-system up to ⭐️⭐️ since it's close and about to ship 1.0)

⭐️ 0-1MM
⭐️⭐️ 1-10MM
⭐️⭐️⭐️ 10-20MM
⭐️⭐️⭐️⭐️ 20-40MM
⭐️⭐️⭐️⭐️⭐️ 40+MM

The "high-level" option is because @solnic told me there had been talk about grouping them that way before. I don't think what I have is perfect (dry-struct and dry-initializer are low-level but ready for use in apps).

And, there's some logic that's barely surfaced (see Options and Flow Control), based on how I grouped the gems. I'd like to also render a series of <ul>s, showing what is built on top of what (maybe inside some cards?) but that can come later.

@cllns
Copy link
Member Author

cllns commented Jan 26, 2022

Itemized list of things that need to be fixed (I will keep this updated):

  • Sorting by Name doesn't work
  • Column headers are cut off sometimes
  • Gem names (same) are wrapped over two lines
  • Version may not be useful (it's on Status page)
  • Add note about popularity (possibly factor in GitHub stars to calculation)

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.

1 participant