lane711 / sonicjs

SonicJs Headless CMS - Blazing Fast Headless CMS built on Cloudflare Workers. 100% Javascript Based

Home Page:https://sonicjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement AG Grid for data tables

lane711 opened this issue · comments

commented

Currently, all table data in the admin UI use simple HTML tables with no paging, filtering, etc. For example:
Screenshot 2023-08-14 at 1 07 52 PM

By adding AG grid, we can hookup paging to start and add filtering later on once its available in the API:
Screenshot 2023-08-14 at 1 12 09 PM

The main file to modify to replace the existing tables is:
src/cms/admin/pages/content.tsx

You can add the js/css references in the theme file using cdn references:
src/cms/admin/theme.tsx

The scope of this story is to add minimum setup for AG Grid

  1. Add js/css refernces
  2. Replaces all existing tables with AG Grid. There are currently 5 tables in the app. You can find them by searching the codebase for "<table"
  3. Tables should render on the client side, not server side like they do know. So you'll need the grid to hit the API from the client instead of hitting the data methods directly.
  4. Paging is supported in the auto-generated APIs, so that should be included in the issue.

Items that are out of scope and will be addressed in future stories:

  1. sorting (will be a separate story)
  2. filtering (will be a separate set of stories)