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

Aperta
#799 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
81
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntelliTect/Coalesce

Tutte le issue di IntelliTect/Coalesce

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.