From e6e6eb14046a9eb7d782775184f7c0a74b335270 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 31 Oct 2025 16:13:12 -0500 Subject: [PATCH] Clean up account and collection settings screens --- app/assets/stylesheets/settings.css | 2 +- .../settings/_entropy_configuration.html.erb | 7 ++++--- app/views/account/settings/_name.html.erb | 12 +++++++----- app/views/account/settings/_users.html.erb | 17 ++++++++++------- app/views/account/settings/show.html.erb | 8 +++----- app/views/collections/edit.html.erb | 8 +------- app/views/collections/edit/_name.html.erb | 2 +- app/views/collections/edit/_users.html.erb | 12 ++++++++---- app/views/my/menus/_hotkeys.html.erb | 2 +- 9 files changed, 36 insertions(+), 34 deletions(-) diff --git a/app/assets/stylesheets/settings.css b/app/assets/stylesheets/settings.css index a1c37e88d..cd67a4cc0 100644 --- a/app/assets/stylesheets/settings.css +++ b/app/assets/stylesheets/settings.css @@ -45,7 +45,7 @@ display: flex; flex-direction: column; - gap: calc(var(--settings-spacer) / 4); + gap: calc(var(--settings-spacer) / 2); min-height: 0; } diff --git a/app/views/account/settings/_entropy_configuration.html.erb b/app/views/account/settings/_entropy_configuration.html.erb index ebcdf2b89..9ecc64db6 100644 --- a/app/views/account/settings/_entropy_configuration.html.erb +++ b/app/views/account/settings/_entropy_configuration.html.erb @@ -1,7 +1,8 @@
-

Auto close

- -

BOXCAR doesn’t let stale cards stick around forever. Cards automatically close as “Not Now” without activity for specific period of time. This is the default, global setting — you can override it on each board.

+
+

Auto close

+

BOXCAR doesn’t let stale cards stick around forever. Cards automatically close as “Not Now” without activity for specific period of time. This is the default, global setting — you can override it on each board.

+
<%= render "entropy/auto_close", model: account.default_entropy_configuration, url: account_entropy_configuration_path %>
diff --git a/app/views/account/settings/_name.html.erb b/app/views/account/settings/_name.html.erb index 2af2b98dc..3c4f68f03 100644 --- a/app/views/account/settings/_name.html.erb +++ b/app/views/account/settings/_name.html.erb @@ -1,8 +1,10 @@ -

Account

<%= form_with model: account, url: account_settings_path, method: :put, scope: :account, data: { controller: "form" }, class: "flex gap-half" do |form| %> - <%= form.text_field :name, required: true, class: "input input--transparent full-width", placeholder: "Account name",data: { action: "input->form#disableSubmitWhenInvalid" } %> - <%= form.button class: "btn btn--circle btn--link", data: { form_target: "submit" }, disabled: form.object do %> - <%= icon_tag "arrow-right" %> - Save changes + <%= form.text_field :name, required: true, class: "input input--transparent full-width txt-medium", placeholder: "Account name…", data: { action: "input->form#disableSubmitWhenInvalid" }, readonly: !Current.user.can_administer? %> + + <% if Current.user.can_administer? %> + <%= form.button class: "btn btn--circle btn--link txt-medium", data: { form_target: "submit" }, disabled: form.object do %> + <%= icon_tag "arrow-right" %> + Save changes + <% end %> <% end %> <% end %> diff --git a/app/views/account/settings/_users.html.erb b/app/views/account/settings/_users.html.erb index ebe8fefec..5e571eb67 100644 --- a/app/views/account/settings/_users.html.erb +++ b/app/views/account/settings/_users.html.erb @@ -1,15 +1,13 @@ -<%= tag.div class: "margin-block-start flex flex-column gap-half", data: { +
+

People on this account

+
+ +<%= tag.div class: "flex flex-column gap settings__user-filter", data: { controller: "filter navigable-list", action: "keydown->navigable-list#navigate filter:changed->navigable-list#reset", navigable_list_focus_on_selection_value: true, navigable_list_actionable_items_value: true } do %> -

People on the account

- - <%= link_to account_join_code_path, class: "btn btn--link center txt-small" do %> - <%= icon_tag "add" %> - Add people - <% end %>
@@ -18,4 +16,9 @@ <%= render partial: "account/settings/user", collection: users %>
+ + <%= link_to account_join_code_path, class: "btn btn--link center txt-small" do %> + <%= icon_tag "add" %> + Invite people + <% end %> <% end %> diff --git a/app/views/account/settings/show.html.erb b/app/views/account/settings/show.html.erb index 245643c20..53533bba4 100644 --- a/app/views/account/settings/show.html.erb +++ b/app/views/account/settings/show.html.erb @@ -1,14 +1,12 @@ -<% @page_title = "Account Settings for #{Account.sole.name}" %> +<% @page_title = "Account Settings" %> <% content_for :header do %>

<%= @page_title %>

<% end %> -
+
- <% if Current.user.can_administer? %> - <%= render "account/settings/name", account: @account %> - <% end%> + <%= render "account/settings/name", account: @account %> <%= render "account/settings/users", users: @users %>
diff --git a/app/views/collections/edit.html.erb b/app/views/collections/edit.html.erb index e44b4e425..13ffb88d7 100644 --- a/app/views/collections/edit.html.erb +++ b/app/views/collections/edit.html.erb @@ -15,11 +15,6 @@
-
-

Name and access

-
Choose who can access this board
-
- <%= form_with model: @collection, class: "display-contents", data: { controller: "form collections-form", collections_form_self_removal_prompt_message_value: "Are you sure you want to remove yourself from this collection? You won’t be able to get back in unless someone invites you.", @@ -27,8 +22,7 @@ <%= render "collections/edit/name", form: form %> <%= render "collections/edit/users", collection: @collection, selected_users: @selected_users, unselected_users: @unselected_users, form: form %> - diff --git a/app/views/collections/edit/_name.html.erb b/app/views/collections/edit/_name.html.erb index 396050204..1ff825380 100644 --- a/app/views/collections/edit/_name.html.erb +++ b/app/views/collections/edit/_name.html.erb @@ -1,7 +1,7 @@
diff --git a/app/views/collections/edit/_users.html.erb b/app/views/collections/edit/_users.html.erb index 5d2ae7409..6e0dd9152 100644 --- a/app/views/collections/edit/_users.html.erb +++ b/app/views/collections/edit/_users.html.erb @@ -1,12 +1,16 @@ -<%= access_menu_tag collection, class: "settings__user-filter settings__user-filter--bg" do %> -
  • -
    +
    +

    Who can access this board?

    +
    + +<%= access_menu_tag collection, class: "settings__user-filter unpad margin-none" do %> +
  • +
    <%= icon_tag "everyone" %> Everyone
    -
    Everyone
    +
    Everyone
    diff --git a/app/views/my/menus/_hotkeys.html.erb b/app/views/my/menus/_hotkeys.html.erb index 07b005b9b..4d991da9c 100644 --- a/app/views/my/menus/_hotkeys.html.erb +++ b/app/views/my/menus/_hotkeys.html.erb @@ -4,5 +4,5 @@ <%= filter_hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %> <%= filter_hotkey_link "New board", new_collection_path, 4, "collection-add" %> <%= filter_hotkey_link "Notifications", notifications_path, 5, "bell" %> - <%= filter_hotkey_link "Account #{tag.span("Settings", class: "visually-hidden")}", account_settings_path, 6, "settings" %> + <%= filter_hotkey_link "Settings", account_settings_path, 6, "settings" %>