Skip to content

Add column alignment, row groups with subtotals and a total row to the data table - #361

Merged
tylercschneider merged 6 commits into
mainfrom
feature/table-groups
Oct 15, 2026
Merged

tylercschneider merged 6 commits into
mainfrom
feature/table-groups

Conversation

@tylercschneider

Copy link
Copy Markdown
Collaborator

One Sentence Summary

A developer building a report with the data table can now right-align number columns, group rows under project headings with a subtotal each, and end the table with a grand total.

ACs Covered

  • A developer can align any column left or right, in its heading and in its cells.
  • A column given no alignment keeps the alignment the table gives it today.
  • A developer can group the table's rows under heading rows named by a value in each row.
  • A group's heading row shows the subtotals passed for that group, each under its column.
  • A developer can end the table with a total row whose values sit under their columns.
  • Group heading rows and the total row use the table's existing heading classes from the keystone theme.
  • A table given no groups and no total row renders the same markup as before.

Decision Log

How are a table's group heading rows and total row styled?

They reuse the table heading classes keystone already has, chosen over adding new group and total classes to keystone_ui-styles.

Code Example

Keystone::Ui::DataTableComponent.new(items: items, columns: [ { task: "Task" }, { hours: "Hours" } ],
  group_by: :project, group_totals: { "Portal" => { hours: "3.5" } })

Out of Scope

Ticket Billed Against

Not specified.

Tokens Used

Not measured.

Effort

Not measured.

Closes #360


Generation Metadata

Scribe: pr-scribe adca11d
Rules: pr-body aec86e2, draft-reading 2e698a6, writing-style c3c2f61
Model: claude-sonnet-5-5, cc 2.1.299

tylercschneider and others added 6 commits October 15, 2026 13:59
…end alignment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tart alignment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…umns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tal row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tylercschneider
tylercschneider merged commit fd0d03b into main Oct 15, 2026
6 checks passed
@tylercschneider
tylercschneider deleted the feature/table-groups branch October 15, 2026 18:04
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.

Add column alignment, row groups with subtotals and a total row to the data table

1 participant