c-admin-table-toolbar: choose which parts it shows and where

Open
#799 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start by locating c-admin-table-toolbar, c-admin-table, and c-admin-table-page, then read how the existing toolbar parts and c-list-pagination are rendered. Implement the configurable layout, part slots, and pagination placement described in the issue; done means the default layout is preserved and consumers can rearrange or replace parts and choose where pagination appears.

Written by the indexing model from the issue text.

Description

c-admin-table-toolbar lays out a fixed set of controls in a fixed order across two rows:

  • Top row: model name, Create, Reload, Edit toggle, #toolbar-actions, the "Showing x – y of n" range, page controls.
  • Second row: search, Columns & Filters, page size.

The only ways to change it are to hide parts with CSS (.c-admin-table-toolbar--model-name { display: none }) or to rebuild the toolbar from scratch. c-admin-table adds c-list-pagination under the table as well, so the page controls and the page size show twice.

The parts are already mostly their own components (c-admin-create-btn, c-list-range-display, c-list-page, c-list-filters, c-list-page-size), so the toolbar could be a layout of named parts:

  • A layout prop: an array of rows, each an array of part names, with "spacer" and "divider" as fillers. The default reproduces today's toolbar:

    [
      ["title", "divider", "create", "reload", "editable", "actions", "spacer", "range", "spacer", "page"],
      ["search", "divider", "filters", "spacer", "page-size"],
    ]
    

    Leaving a part out drops it; moving it moves it. A single row gives a one-line toolbar.

  • A slot per part (#part-create, #part-search, …), with the default rendering as its fallback, to replace one part without touching the rest. An app's own controls take a name of their own in layout and render from the slot of the same name.

  • On c-admin-table and c-admin-table-page, a pagination prop choosing where page controls appear ("toolbar", "bottom" or both), so they are not shown twice by default.

This supersedes the #toolbar-prepend / #toolbar-append and title items in #795 for the table toolbar.

Dominant language
C#
Stars
81
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IntelliTect/Coalesce

All issues in IntelliTect/Coalesce

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.