Skip to content

Conversation

sevenseacat
Copy link
Contributor

Updates the DataTable component to use Cinder for table generation. It grabs the query from the generated form (for actions that take arguments) and passes it to the table, so that Cinder can do its thing.

Screenshot 2025-08-03 at 10 25 36 pm

This lets us expose groovy functionality like sorting, filtering, etc.

Discussion points

  • I've added some initial features for end users - adding table_sortable_columns and table_filterable_columns in the resource DSL - but we should discuss if/what we should make available.

  • Having things like auto-generated filters does look kind of funny for actions like by_id or by_name, that provide their own filters via arguments. Currently our DSL isn't granular enough to provide different configuration for different read actions - should we expand it?

  • Running mix assets.deploy to update the CSS (to include styles from Cinder) seems to have minified the CSS/JS when it wasn't minified before - so it looks like I deleted four bajillion lines of code when I didn't. Is it supposed to be minified? Or not minified?

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@zachdaniel
Copy link
Contributor

I think it should be minified but we have some kind of strange behavior w/ our recent change maybe? I'm not sure, but let's keep it minified and if something unminifies it moving forward we'll fix that.

I think it would be fair to have something like table_filterable_columns [action: [...], action2: [...]] for this case. Eventually we just need to do what we've discussed and "invert" it, but for now thats likely the only good option we have in the short term until we figure that out.

@zachdaniel
Copy link
Contributor

Also: 🔥

@sevenseacat
Copy link
Contributor Author

I'll think about a better way to set up DSL for filtering/sorting!

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.

2 participants