Skip to content

Rename table component arguments: rows→data, label→title, formatter→html#24

Merged
marco8757 merged 3 commits intomainfrom
copilot/update-table-component-arguments
Feb 5, 2026
Merged

Rename table component arguments: rows→data, label→title, formatter→html#24
marco8757 merged 3 commits intomainfrom
copilot/update-table-component-arguments

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 5, 2026

Renames table component arguments for improved API clarity.

Changes

Table Component

  • rows:data: (parameter and internal variable)

Column Component

  • label:title: (parameter and internal variable)
  • formatter:html: (parameter and internal variable)

Action Component

  • formatter:html: (parameter and internal variable)

Tests & Documentation

  • Updated all 20 component tests
  • Updated all documentation files and examples

Example

<%# Before %>
<%= render FlatPack::Table::Component.new(rows: @users) do |table| %>
  <% table.with_column(label: "Name", formatter: ->(u) { u.name.upcase }) %>
<% end %>

<%# After %>
<%= render FlatPack::Table::Component.new(data: @users) do |table| %>
  <% table.with_column(title: "Name", html: ->(u) { u.name.upcase }) %>
<% end %>
Original prompt

In table component update the following:

  1. argument called 'rows' to 'data'
  2. argument called 'label' to 'title'
  3. argument called 'formatter' to 'html'

Make sure to update documentations as well


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 5, 2026 06:07
Co-authored-by: marco8757 <9066883+marco8757@users.noreply.github.com>
…t title:

Co-authored-by: marco8757 <9066883+marco8757@users.noreply.github.com>
Copilot AI changed the title [WIP] Update table component argument names and documentation Rename table component arguments: rows→data, label→title, formatter→html Feb 5, 2026
Copilot AI requested a review from marco8757 February 5, 2026 06:18
@marco8757 marco8757 marked this pull request as ready for review February 5, 2026 06:29
@marco8757 marco8757 merged commit a458201 into main Feb 5, 2026
5 checks passed
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.

2 participants