Skip to content

v1.4.0 — Gridory

Choose a tag to compare

@VictorDiazJauregui VictorDiazJauregui released this 02 Nov 21:41
· 141 commits to main since this release
b5408f4

Minor release of Gridory, focused on the table: row selection, expandable rows, columns that hide by
priority, pinned and resizable columns, and help or custom content in the header. Everything is opt-in and
off by default: without the new props the table and the kanban look and behave as in 1.3.0, except for the
change listed under Visible changes.

English · Español

English

Upgrade

npm install gridory@1.4.0

Table

  • Row selection. rowSelection (RowSelectionConfig: selectedIds, defaultSelectedIds, onChange,
    selectAllScope: "page" | "filtered" (SelectAllScope), isRowSelectable) adds the _select column.
    Rows carry data-selected and aria-selected; checkboxes are .gdy-table-select with
    .gdy-table-select-indicator and data-state.
  • Expandable rows. renderExpandedRow, expandedRowIds, defaultExpandedRowIds, onExpandedChange
    and canExpandRow add the _expand column (.gdy-table-expand-toggle, .gdy-table-expand-chevron) and a
    full-width detail (.gdy-table-expanded-row, -cell, -panel with data-state, -content, -body); the
    open row carries data-expanded. The detail is not a row for paging, totals or selection.
  • Column visibility. columnVisibility, responsiveColumns with the column fields hideable and
    priority (data-hidden-by="priority"), and onColumnVisibilityChange (ColumnVisibilityDetails).
  • Pinned columns. pin: "left" | "right" (ColumnPin) on a column with width, and rowActions.pinned.
    Cells carry data-pinned and data-pinned-edge; the container data-has-pinned, data-scrolled-start,
    data-scrolled-end and data-pinning-suspended.
  • Resizable columns. resizableColumns, columnWidths, defaultColumnWidths and onColumnWidthsChange
    (on release), with resizable, minWidth (64) and maxWidth per column. The handle is
    .gdy-table-resize-handle (mouse and keyboard, not on touch screens); data-resized and data-resizing.
  • Header help and content. headerTooltip, headerTooltipPlacement (HeaderTooltipPlacement) and
    headerContent on a column: .gdy-table-head-help, .gdy-table-head-tooltip, data-help-placement.
  • Printing. With printMode, a column printValue prints its text (.gdy-table-print-value) and the
    selection prints "Sí" / "No".
  • No toolbar. features.toolbar: false.
  • MissingRowIdError (selection or expandable rows without getRowId) and PinnedColumnWidthError (pin
    without width). ColumnPin and HeaderTooltipPlacement are exported from gridory, gridory/table and
    gridory/kanban.
  • New labels and their default: selectRow "Seleccionar fila",
    selectPageRows "Seleccionar las filas de la página", selectFilteredRows "Seleccionar todas las filas filtradas", printSelected "Sí",
    printNotSelected "No", printSelectionHeader "Seleccionada", columnHelp "Ayuda sobre {column}",
    expandRow "Mostrar detalle", resizeColumn "Cambiar el ancho de {column}", resizeColumnValue
    "{width} px".
  • New tokens (--gdy-table-): row-selected-bg, select-border, select-bg, select-checked-bg,
    select-check-fg, select-focus-ring, head-help-fg, tooltip-bg, tooltip-fg, tooltip-z,
    expanded-bg, expanded-padding, expand-focus-ring, expand-duration, pinned-bg, pinned-shadow,
    pinned-z, pinned-corner-z, open-menu-z, resize-handle-color.
  • Variables the table writes, to read only: --gdy-table-pin-offset, --gdy-table-visible-width,
    --gdy-table-grid-width, --gdy-table-column-width, --gdy-table-column-print-width.

Fixes

  • Printing with printMode. Full-width rows (group, empty and loading) no longer count the actions
    column, which does not print and left an empty strip at the right of a grouped table.

Visible changes

  • A grouped table printed with printMode and row actions: the columns now fill the page width.

Good to know

  • An app that types a full DataTableLabels (not Partial) must add the ten new keys.
  • A background or opacity on a row (tr) does not reach its pinned cells: use --gdy-table-pinned-bg or
    style the cells.
  • The new column fields are table only: the kanban accepts them in ColumnDefinition and ignores them.
  • With responsiveColumns, widening a column can hide the lowest priority one on release, even that same
    column.

Workarounds you can remove

Workaround Replaced by
Your own checkbox column and selected-ids state rowSelection
Removing columns from columns with a media query responsiveColumns and priority
position: sticky on a column with nth-child pin
A title or a portal for help in the header headerTooltip or headerContent
An extra row or a modal for a row detail renderExpandedRow
Your own resize handles or a hand-made colgroup resizableColumns

See the table guide; every guide is
linked from the README.

Español

Actualizar

npm install gridory@1.4.0

Tabla

  • Selección de filas. rowSelection (RowSelectionConfig: selectedIds, defaultSelectedIds,
    onChange, selectAllScope: "page" | "filtered" (SelectAllScope), isRowSelectable) agrega la columna
    _select. Las filas llevan data-selected y aria-selected; las casillas son .gdy-table-select con
    .gdy-table-select-indicator y data-state.
  • Filas expandibles. renderExpandedRow, expandedRowIds, defaultExpandedRowIds, onExpandedChange
    y canExpandRow agregan la columna _expand (.gdy-table-expand-toggle, .gdy-table-expand-chevron) y
    un detalle de ancho completo (.gdy-table-expanded-row, -cell, -panel con data-state, -content,
    -body); la fila abierta lleva data-expanded. El detalle no cuenta como fila para la paginación, los
    totales ni la selección.
  • Visibilidad de columnas. columnVisibility, responsiveColumns con los campos de columna hideable
    y priority (data-hidden-by="priority"), y onColumnVisibilityChange (ColumnVisibilityDetails).
  • Columnas fijas. pin: "left" | "right" (ColumnPin) en una columna con width, y
    rowActions.pinned. Las celdas llevan data-pinned y data-pinned-edge; el contenedor
    data-has-pinned, data-scrolled-start, data-scrolled-end y data-pinning-suspended.
  • Columnas redimensionables. resizableColumns, columnWidths, defaultColumnWidths y
    onColumnWidthsChange (al soltar), con resizable, minWidth (64) y maxWidth por columna. La manija es
    .gdy-table-resize-handle (mouse y teclado, no en pantallas táctiles); data-resized y data-resizing.
  • Ayuda y contenido en el encabezado. headerTooltip, headerTooltipPlacement
    (HeaderTooltipPlacement) y headerContent en una columna: .gdy-table-head-help,
    .gdy-table-head-tooltip, data-help-placement.
  • Impresión. Con printMode, el printValue de una columna imprime su texto (.gdy-table-print-value)
    y la selección imprime "Sí" / "No".
  • Sin barra. features.toolbar: false.
  • MissingRowIdError (selección o filas expandibles sin getRowId) y PinnedColumnWidthError (pin sin
    width). ColumnPin y HeaderTooltipPlacement se exportan desde gridory, gridory/table y
    gridory/kanban.
  • labels nuevos y su texto por defecto: selectRow "Seleccionar fila",
    selectPageRows "Seleccionar las filas de la página", selectFilteredRows "Seleccionar todas las filas filtradas", printSelected "Sí",
    printNotSelected "No", printSelectionHeader "Seleccionada", columnHelp "Ayuda sobre {columna}",
    expandRow "Mostrar detalle", resizeColumn "Cambiar el ancho de {columna}", resizeColumnValue
    "{ancho} px".
  • Tokens nuevos (--gdy-table-): row-selected-bg, select-border, select-bg, select-checked-bg,
    select-check-fg, select-focus-ring, head-help-fg, tooltip-bg, tooltip-fg, tooltip-z,
    expanded-bg, expanded-padding, expand-focus-ring, expand-duration, pinned-bg, pinned-shadow,
    pinned-z, pinned-corner-z, open-menu-z, resize-handle-color.
  • Variables que escribe la tabla, solo para leer: --gdy-table-pin-offset, --gdy-table-visible-width,
    --gdy-table-grid-width, --gdy-table-column-width, --gdy-table-column-print-width.

Arreglos

  • Impresión con printMode. Las filas de ancho completo (grupo, sin resultados y carga) ya no cuentan
    la columna de acciones, que no se imprime y dejaba una franja vacía a la derecha de una tabla agrupada.

Cambios visibles

  • Una tabla agrupada impresa con printMode y acciones por fila: las columnas ahora ocupan todo el ancho
    de la página.

Para tener en cuenta

  • Una app que tipa un DataTableLabels completo (no Partial) tiene que sumar las diez claves nuevas.
  • Un fondo o una opacity en una fila (tr) no llegan a sus celdas fijas: usa --gdy-table-pinned-bg o
    aplica el estilo a las celdas.
  • Los campos de columna nuevos son solo de la tabla: el kanban los acepta en ColumnDefinition y los ignora.
  • Con responsiveColumns, agrandar una columna puede ocultar al soltar la de menor prioridad, incluso esa
    misma columna.

Parches que puedes quitar

Parche Lo reemplaza
Una columna de casillas propia y el estado de los ids seleccionados rowSelection
Quitar columnas de columns con un media query responsiveColumns y priority
position: sticky en una columna con nth-child pin
Un title o un portal para la ayuda del encabezado headerTooltip o headerContent
Una fila extra o un modal para el detalle de una fila renderExpandedRow
Manijas propias o un colgroup hecho a mano resizableColumns

Ver la guía de la tabla; todas
las guías están enlazadas desde el README.