Skip to content

Commit

Permalink
chore(list): clean up from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
philschanely committed Aug 18, 2022
1 parent ca7a647 commit abf1c7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
10 changes: 5 additions & 5 deletions docs/app/views/examples/components/list/_preview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This assumes that the contents of the list are already formatted as desired or y
<%= sage_component SageList, {
items: sample_products.map { | item | {
content: "Item #{item[:name]}",
id: item[:id],
id: "example-default-item-#{item[:id]}",
more_actions: { items: dropdown_items(item[:id]) },
}
},
Expand All @@ -80,7 +80,7 @@ and additional configurations through `sortable_configs`. See the Props list for
sortable_resource: "sample_products",
items: sample_products.map { | item | {
content: "Item #{item[:name]}",
id: item[:id],
id: "example-sortable-item-#{item[:id]}",
more_actions: { items: dropdown_items(item[:id]) },
sortable: true,
sortable_update_url: "#sortable-update-url?item=#{item[:id]}",
Expand All @@ -99,7 +99,7 @@ If you would like the whole row to be draggable, use the `sortable_configs` to s
sortable_resource: "sample_products",
items: sample_products.map { | item | {
content: "Item #{item[:name]}",
id: item[:id],
id: "example-fully-draggable-item-#{item[:id]}",
more_actions: { items: dropdown_items(item[:id]) },
sortable: true,
sortable_update_url: "#sortable-update-url?item=#{item[:id]}",
Expand All @@ -124,14 +124,14 @@ Note that this example also implements the [Reveal utility class](#{pages_helper
} do %>
<% sample_products.each do | item | %>
<%= sage_component SageListItem, {
id: item[:id],
id: "example-default-item-#{item[:id]}",
more_actions: { items: dropdown_items(item[:id]) },
sortable: true,
sortable_update_url: "#sortable-update-url?item={item[:id]}",
css_classes: SageClassnames::REVEAL_CONTAINER,
} do %>
<%= sage_component SageCardRow, { grid_template: "ete" } do %>
<img src="//source.unsplash.com/random/240x160?v=<%= item[:id] %>" width="64" alt="" />
<img src="https://source.unsplash.com/random/240x160?v=<%= item[:id] %>" width="64" alt="" />
<%= sage_component SageCardBlock, {} do %>
<h4><%= item[:name] %></h4>
<p>Item <%= item[:id] %> specs</p>
Expand Down
6 changes: 0 additions & 6 deletions docs/app/views/examples/components/list/_props.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
<td><%= md('String') %></td>
<td><%= md('`nil`') %></td>
</tr>
<tr>
<td><%= md('`hide_first_border`') %></td>
<td><%= md('Removes top border from first list item within a SageList') %></td>
<td><%= md('Boolean') %></td>
<td><%= md('`false`') %></td>
</tr>
<tr>
<td colspan="4">
<%= md("**SageListItem**") %>
Expand Down
2 changes: 0 additions & 2 deletions packages/sage-system/lib/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ Sage.sortableList = (function() {
sortableConfigs = { ...DEFAULT_CONFIGS };
}

console.log('final configs', resourceName, sortableConfigs);

Sortable.create(el, {
...sortableConfigs,
onStart: function(evt) {
Expand Down

0 comments on commit abf1c7e

Please sign in to comment.