From 608e6087ac8963c6c7ceff8150b93bbba7585a20 Mon Sep 17 00:00:00 2001 From: Phil Schanely Date: Thu, 18 Aug 2022 14:19:28 -0400 Subject: [PATCH] chore(list): clean up from feedback --- .../views/examples/components/list/_preview.html.erb | 10 +++++----- .../app/views/examples/components/list/_props.html.erb | 6 ------ packages/sage-system/lib/list.js | 2 -- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/app/views/examples/components/list/_preview.html.erb b/docs/app/views/examples/components/list/_preview.html.erb index f70302e241..9b6964d891 100644 --- a/docs/app/views/examples/components/list/_preview.html.erb +++ b/docs/app/views/examples/components/list/_preview.html.erb @@ -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]) }, } }, @@ -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]}", @@ -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]}", @@ -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 %> - + <%= sage_component SageCardBlock, {} do %>

<%= item[:name] %>

Item <%= item[:id] %> specs

diff --git a/docs/app/views/examples/components/list/_props.html.erb b/docs/app/views/examples/components/list/_props.html.erb index cb8133df0c..870df428c1 100644 --- a/docs/app/views/examples/components/list/_props.html.erb +++ b/docs/app/views/examples/components/list/_props.html.erb @@ -25,12 +25,6 @@ <%= md('String') %> <%= md('`nil`') %> - - <%= md('`hide_first_border`') %> - <%= md('Removes top border from first list item within a SageList') %> - <%= md('Boolean') %> - <%= md('`false`') %> - <%= md("**SageListItem**") %> diff --git a/packages/sage-system/lib/list.js b/packages/sage-system/lib/list.js index b083bb0bff..0cdbe014cf 100644 --- a/packages/sage-system/lib/list.js +++ b/packages/sage-system/lib/list.js @@ -38,8 +38,6 @@ Sage.sortableList = (function() { sortableConfigs = { ...DEFAULT_CONFIGS }; } - console.log('final configs', resourceName, sortableConfigs); - Sortable.create(el, { ...sortableConfigs, onStart: function(evt) {