Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/layered-ui-rails/references/HELPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Formats a date/time value as `"%-d %b %Y, %H:%M"` (e.g. "15 Apr 2026, 10:30"). R
{ attribute: :email, render: ->(r) { r.email } },
{ attribute: :created_at, label: "Joined", render: ->(r) { l_ui_format_datetime(r.created_at) } },
],
actions: ->(r) { link_to "Edit", edit_user_path(r), class: "l-ui-table__action" },
actions: ->(r) { link_to "Edit", edit_user_path(r), class: "l-ui-button l-ui-button--outline l-ui-button--small" },
caption: "Users",
query: @q,
turbo_frame: "users") %>
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/layered/ui/table_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def l_ui_format_datetime(value)
# { attribute: :name, primary: true, render: ->(r) { link_to r.name, persona_path(r) } },
# { attribute: :description, render: ->(r) { truncate(r.description, length: 60) } },
# ],
# actions: ->(r) { link_to "Edit", edit_persona_path(r), class: "l-ui-table__action" },
# actions: ->(r) { link_to "Edit", edit_persona_path(r), class: "l-ui-button l-ui-button--outline l-ui-button--small" },
# caption: "Personas"
# )
#
Expand Down
6 changes: 3 additions & 3 deletions test/dummy/app/views/pages/tables.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<td class="l-ui-table__cell"><%= user.email %></td>
<td class="l-ui-table__cell"><%= time_ago_in_words(user.created_at) %> ago</td>
<td class="l-ui-table__cell"><%= time_ago_in_words(user.updated_at) %> ago</td>
<td class="l-ui-table__cell l-ui-table__cell--action"><a class="l-ui-table__action" href="#">Edit</a> <button class="l-ui-table__action l-ui-table__action--danger">Delete</button></td>
<td class="l-ui-table__cell l-ui-table__cell--action"><a class="l-ui-button l-ui-button--outline l-ui-button--small" href="#">Edit</a> <button class="l-ui-button l-ui-button--outline-danger l-ui-button--small">Delete</button></td>
</tr>
<% end %>
</tbody>
Expand Down Expand Up @@ -82,8 +82,8 @@
&lt;th class="l-ui-table__cell l-ui-table__cell--primary" scope="row"&gt;&lt;a href="#"&gt;Alice&lt;/a&gt;&lt;/th&gt;
&lt;td class="l-ui-table__cell"&gt;alice@example.com&lt;/td&gt;
&lt;td class="l-ui-table__cell l-ui-table__cell--action"&gt;
&lt;a class="l-ui-table__action" href="#"&gt;Edit&lt;/a&gt;
&lt;button class="l-ui-table__action l-ui-table__action--danger"&gt;Delete&lt;/button&gt;
&lt;a class="l-ui-button l-ui-button--outline l-ui-button--small" href="#"&gt;Edit&lt;/a&gt;
&lt;button class="l-ui-button l-ui-button--outline-danger l-ui-button--small"&gt;Delete&lt;/button&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
Expand Down
4 changes: 2 additions & 2 deletions test/dummy/app/views/pages/tables_helper.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
{ attribute: :name, render: ->(r) { r.name } },
{ attribute: :email, render: ->(r) { r.email } },
],
actions: ->(r) { link_to("Edit", "#", class: "l-ui-table__action") },
actions: ->(r) { link_to("Edit", "#", class: "l-ui-button l-ui-button--outline l-ui-button--small") },
caption: "Users with actions") %>

<div class="mt-6" data-controller="l-ui--modal">
Expand All @@ -132,7 +132,7 @@
{ attribute: :name, render: -&gt;(r) { r.name } },
{ attribute: :email, render: -&gt;(r) { r.email } },
],
actions: -&gt;(r) { link_to("Edit", edit_user_path(r), class: "l-ui-table__action") },
actions: -&gt;(r) { link_to("Edit", edit_user_path(r), class: "l-ui-button l-ui-button--outline l-ui-button--small") },
caption: "Users with actions") %&gt;</code></pre>
</div>
</dialog>
Expand Down
Loading