Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

[WIP] Interactive table on gems page - #393

Draft
cllns wants to merge 16 commits into
dry-rb:mainfrom
cllns:master
Draft

[WIP] Interactive table on gems page#393
cllns wants to merge 16 commits into
dry-rb:mainfrom
cllns:master

Conversation

@cllns

@cllns cllns commented Jan 26, 2022

Copy link
Copy Markdown
Member

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

cllns commented Jan 26, 2022

Copy link
Copy Markdown
Member Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant