@@ -111,6 +111,10 @@
|
||||
.card {
|
||||
inline-size: calc(var(--column-width-expanded) - var(--column-padding-expanded) * 2);
|
||||
}
|
||||
|
||||
.cards--grid & {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
|
||||
.cards__new-column {
|
||||
@@ -123,8 +127,10 @@
|
||||
--card-grid-columns: 1;
|
||||
|
||||
container-type: inline-size;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--cards-gap);
|
||||
justify-content: center;
|
||||
margin-inline: auto;
|
||||
max-inline-size: var(--main-width);
|
||||
@@ -589,6 +595,7 @@
|
||||
--card-padding-block: var(--block-space);
|
||||
|
||||
border: 1px solid var(--border-color);
|
||||
margin-block-end: var(--cards-gap);
|
||||
text-align: center;
|
||||
|
||||
&:has(dialog[open]) {
|
||||
|
||||
@@ -320,6 +320,10 @@
|
||||
position: absolute;
|
||||
rotate: 5deg;
|
||||
transform-origin: top right;
|
||||
|
||||
.cards & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.card:has(.card__closed),
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
--input-background: var(--color-canvas);
|
||||
--input-border-radius: 5em;
|
||||
--input-padding: 0.5em 1.3em;
|
||||
--input-width: 24ch;
|
||||
--input-width: 16em;
|
||||
--collapsed-filter-space: calc(var(--btn-size) + var(--inline-space-half) + 0.25em);
|
||||
|
||||
inline-size: var(--input-width);
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
.notifications-list {
|
||||
--panel-size: 45ch;
|
||||
|
||||
.tray__item {
|
||||
position: relative;
|
||||
|
||||
&[aria-selected] {
|
||||
outline: 0;
|
||||
|
||||
|
||||
.card {
|
||||
border-radius: 0.25ch;
|
||||
outline: var(--focus-ring-size) solid var(--focus-ring-color);
|
||||
@@ -56,8 +58,8 @@
|
||||
&:before {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.icon {
|
||||
|
||||
.icon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ module EventsHelper
|
||||
end
|
||||
|
||||
def comment_event_action_sentence(event)
|
||||
"#{h event_creator_name(event) } commented on <span style='color: var(--card-color)'>#{h event.eventable.card.title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } commented on <span style='color: var(--card-color)'>\"#{h event.eventable.card.title }\"</span>".html_safe
|
||||
end
|
||||
|
||||
def event_creator_name(event)
|
||||
@@ -75,28 +75,28 @@ module EventsHelper
|
||||
case event.action
|
||||
when "card_assigned"
|
||||
if event.assignees.include?(Current.user)
|
||||
"#{h event_creator_name(event) } will handle <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } will handle <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
else
|
||||
"#{h event_creator_name(event) } assigned #{h event.assignees.pluck(:name).to_sentence } to <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } assigned #{h event.assignees.pluck(:name).to_sentence } to <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
end
|
||||
when "card_unassigned"
|
||||
"#{h event_creator_name(event) } unassigned #{ h(event.assignees.include?(Current.user) ? "yourself" : event.assignees.pluck(:name).to_sentence) } from <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } unassigned #{ h(event.assignees.include?(Current.user) ? "yourself" : event.assignees.pluck(:name).to_sentence) } from <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_published"
|
||||
"#{h event_creator_name(event) } added <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } added <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_closed"
|
||||
"#{h event_creator_name(event) } marked <span style='color: var(--card-color)'>#{h title }</span> as done".html_safe
|
||||
"#{h event_creator_name(event) } marked <span style='color: var(--card-color)'>\"#{h title }\"</span> as done".html_safe
|
||||
when "card_reopened"
|
||||
"#{h event_creator_name(event) } reopened <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event) } reopened <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_due_date_added"
|
||||
"#{h event_creator_name(event)} set the date to #{h event.particulars.dig('particulars', 'due_date').to_date.strftime('%B %-d')} on <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event)} set the date to #{h event.particulars.dig('particulars', 'due_date').to_date.strftime('%B %-d')} on <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_due_date_changed"
|
||||
"#{h event_creator_name(event)} changed the date to #{h event.particulars.dig('particulars', 'due_date').to_date.strftime('%B %-d')} on <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event)} changed the date to #{h event.particulars.dig('particulars', 'due_date').to_date.strftime('%B %-d')} on <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_due_date_removed"
|
||||
"#{h event_creator_name(event)} removed the date on <span style='color: var(--card-color)'>#{h title }</span>".html_safe
|
||||
"#{h event_creator_name(event)} removed the date on <span style='color: var(--card-color)'>\"#{h title }\"</span>".html_safe
|
||||
when "card_title_changed"
|
||||
"#{h event_creator_name(event)} renamed <span style='color: var(--card-color)'>#{h title }</span> (was: '#{h event.particulars.dig('particulars', 'old_title')})'".html_safe
|
||||
"#{h event_creator_name(event)} renamed <span style='color: var(--card-color)'>\"#{h title }\"</span> (was: '#{h event.particulars.dig('particulars', 'old_title')})'".html_safe
|
||||
when "card_collection_changed"
|
||||
"#{h event_creator_name(event)} moved <span style='color: var(--card-color)'>#{h title }</span> to '#{h event.particulars.dig('particulars', 'new_collection')}'".html_safe
|
||||
"#{h event_creator_name(event)} moved <span style='color: var(--card-color)'>\"#{h title }\"</span> to '#{h event.particulars.dig('particulars', 'new_collection')}'".html_safe
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ module Filter::Resources
|
||||
|
||||
def collection_titles
|
||||
if collections.none?
|
||||
Collection.one? ? [ Collection.first.name ] : [ "All collections" ]
|
||||
Collection.one? ? [ Collection.first.name ] : [ "All Boards" ]
|
||||
else
|
||||
collections.map(&:name)
|
||||
end
|
||||
|
||||
@@ -47,7 +47,8 @@ class NotificationPusher
|
||||
when "comment_created"
|
||||
base_payload.merge(
|
||||
title: "RE: #{base_payload[:title]}",
|
||||
body: comment_notification_body(event)
|
||||
body: comment_notification_body(event),
|
||||
path: card_path_with_comment_anchor(event.eventable)
|
||||
)
|
||||
when "card_assigned"
|
||||
base_payload.merge(
|
||||
@@ -111,4 +112,8 @@ class NotificationPusher
|
||||
def card_path(card)
|
||||
"#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(card)}"
|
||||
end
|
||||
|
||||
def card_path_with_comment_anchor(comment)
|
||||
"#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(comment.card, anchor: ActionView::RecordIdentifier.dom_id(comment))}"
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@ class Tag < ApplicationRecord
|
||||
end
|
||||
|
||||
def cards_count
|
||||
cards.count
|
||||
cards.open.count
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
navigable_list_focus_on_selection_value: true,
|
||||
navigable_list_actionable_items_value: true
|
||||
} do %>
|
||||
|
||||
<h2 class="divider txt-large">People on the account</h2>
|
||||
<%#= render "account/invite" # Scheduled work in https://3.basecamp.com/2914079/buckets/37331921/todos/8746162337 %>
|
||||
<%= render "account/invite" %>
|
||||
|
||||
<div class="settings__user-filter">
|
||||
<input placeholder="Filter…" class="input input--transparent full-width txt-small" type="search" autocorrect="off" autocomplete="off" data-1p-ignore="true" data-filter-target="input" data-action="input->filter#filter">
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
>
|
||||
<strong class="popup__title">Tag this…</strong>
|
||||
|
||||
<%= form_with url: card_taggings_path(@card), class: "flex flex-column gap-half full-width margin-block-half" do |form| %>
|
||||
<%= form_with url: card_taggings_path(@card), id: dom_id(@card, :tags_form), class: "flex flex-column gap-half full-width margin-block-half" do |form| %>
|
||||
<%= form.text_field :tag_title, placeholder: @tags.any? ? "Add a new tag or filter…" : "Name this tag…", class: "input txt-small full-width",
|
||||
autocomplete: "off", data: { filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list">
|
||||
<li class="popup__item" data-navigable-list-target="item">
|
||||
<%= button_tag "Create a new tag", type: "submit", form: dom_id(@card, :tags_form), class: "btn popup__btn" do %>
|
||||
<%= icon_tag "add" %>
|
||||
<span>Create tag</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% @tags.each do |tag| %>
|
||||
<li class="popup__item" data-filter-target="item" data-navigable-list-target="item">
|
||||
<%= button_to card_taggings_path(@card, params: { tag_title: tag.title }), method: :post,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% @page_title = "Collection Settings" %>
|
||||
<% @page_title = "Board Settings" %>
|
||||
|
||||
<% content_for :header do %>
|
||||
<%= render "filters/menu" %>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="settings__panel settings__panel--users panel shadow center">
|
||||
<header>
|
||||
<h2 class="divider txt-large">Name and Access</h2>
|
||||
<div>Choose who can access this Collection</div>
|
||||
<div>Choose who can access this Board</div>
|
||||
</header>
|
||||
|
||||
<%= form_with model: @collection, class: "display-contents", data: {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<%= form_with model: collection, class: "txt-align-center margin-block-start-auto", method: :delete do |form| %>
|
||||
<%= form.button class: "btn txt-negative borderless txt-small", data: { turbo_confirm: "Are you sure you want to permanently delete this Collection?" } do %>
|
||||
<%= icon_tag "trash" %>
|
||||
<span>Delete this Collection</span>
|
||||
<span>Delete this Board</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%= turbo_frame_tag @collection, :publication do %>
|
||||
<header>
|
||||
<h2 class="divider txt-large">Public link</h2>
|
||||
<div>Turn on the Public link to share this collection with anyone in the world. They won’t need to log in and they won’t be able to see anything else in Fizzy.</div>
|
||||
<div>Turn on the Public link to share this Board with anyone in the world. They won’t need to log in and they won’t be able to see anything else in Fizzy.</div>
|
||||
</header>
|
||||
|
||||
<% if collection.published? %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<label for="collection_all_access" class="switch">
|
||||
<%= form.check_box :all_access, class: "switch__input", checked: collection.all_access?, data: { action: "change->toggle-class#toggle" } %>
|
||||
<span class="switch__btn round"></span>
|
||||
<span class="for-screen-reader">Give everyone access to this project</span>
|
||||
<span class="for-screen-reader">Give everyone access to this Board</span>
|
||||
</label>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% @page_title = "Create a new collection" %>
|
||||
<% @page_title = "Create a new Board" %>
|
||||
|
||||
<% content_for :header do %>
|
||||
<%= render "filters/menu" %>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="panel shadow center" style="--panel-size: 55ch; view-transition-name: new-collection">
|
||||
<%= form_with model: @collection, class: "flex flex-column gap txt-large", data: { controller: "form" } do |form| %>
|
||||
<h2 class="txt-x-large">Create a new collection</h2>
|
||||
<h2 class="txt-x-large"><%= @page_title %></h2>
|
||||
<label class="flex align-center gap">
|
||||
<%= form.text_field :name, required: true, class: "input full-width", autofocus: true, autocomplete: "off",placeholder: "Give it a name…", data: { action: "keydown.esc@document->form#cancel" } %>
|
||||
</label>
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
<%= render "events/index/add_card_button", user_filtering: @user_filtering %>
|
||||
|
||||
<h1 class="header__title">
|
||||
<span>Activity in</span>
|
||||
<%= render "events/index/filter", user_filtering: @user_filtering %>
|
||||
<% if @user_filtering.collections.one? %>
|
||||
Latest Activity
|
||||
<% else %>
|
||||
<span>Activity <%= @user_filtering.filter.collections.any? ? "in" : "across" %></span>
|
||||
<%= render "events/index/filter", user_filtering: @user_filtering %>
|
||||
<% end %>
|
||||
</h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% # Using method: :get inside Turbo frame triggers some special Turbo handling where the script_name is lost %>
|
||||
<% if user_filtering.collections.any? %>
|
||||
<%= collapsible_nav_section "Collections" do %>
|
||||
<%= collapsible_nav_section "Boards" do %>
|
||||
<%= render partial: "filters/menu/collections/collection", collection: user_filtering.collections, as: :collection %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<%= filter_hotkey_link "Home", root_path, 1, "home" %>
|
||||
<%= filter_hotkey_link "Assigned to me", cards_path(assignee_ids: [Current.user.id]), 2, "clipboard" %>
|
||||
<%= filter_hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %>
|
||||
<%= filter_hotkey_link "New Collection", new_collection_path, 4, "collection-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" %>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
controller: "dialog multi-selection-combobox",
|
||||
action: "keydown.esc->dialog#close click@document->dialog#closeOnClickOutside",
|
||||
filter_show: user_filtering.show_collections?,
|
||||
multi_selection_combobox_no_selection_label_value: "Collection…",
|
||||
multi_selection_combobox_no_selection_label_value: "Board…",
|
||||
multi_selection_combobox_label_prefix_value: "" } do %>
|
||||
<button type="button" class="btn input input--select flex-inline txt-x-small" data-action="click->dialog#toggle:stop">
|
||||
<span class="overflow-ellipsis" data-multi-selection-combobox-target="label">
|
||||
@@ -16,8 +16,8 @@
|
||||
<%= hidden_field_tag "collection_ids[]", nil, data: { filter_settings_target: "field" } %>
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Collection…" do %>
|
||||
<strong class="popup__title">Collection…</strong>
|
||||
<%= filter_dialog "Board…" do %>
|
||||
<strong class="popup__title">Board…</strong>
|
||||
|
||||
<% if user_filtering.collections.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"1p-ignore": "true",
|
||||
controller: "hotkey",
|
||||
filter_settings_target: "field",
|
||||
action: "keydown.f@document->hotkey#focus input->filter-settings#resetIfNoFiltering input->form#debouncedSubmit keydown.enter->form#submitToTopTarget" } %>
|
||||
action: "keydown.f@document->hotkey#focus input->filter-settings#resetIfNoFiltering input->form#debouncedSubmit keydown.enter->form#submitToTopTarget blur->form#submitToTopTarget" } %>
|
||||
|
||||
<% if filter.terms.present? %>
|
||||
<% filter.terms.each do |term| %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= event_action_sentence(@event) %>
|
||||
<% if @event.eventable %>
|
||||
— <%= link_to "Show more", polymorphic_url(@event.eventable) %>
|
||||
— <%= link_to "↗︎", polymorphic_url(@event.eventable) %>
|
||||
<% end %>
|
||||
|
||||
@@ -12,7 +12,7 @@ class EventsControllerTest < ActionDispatch::IntegrationTest
|
||||
get events_path
|
||||
|
||||
assert_select "div.events__time-block[style='grid-area: 17/2']" do
|
||||
assert_select "strong", text: "David assigned JZ to Layout is broken"
|
||||
assert_select "strong", text: "David assigned JZ to \"Layout is broken\""
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ class EventsControllerTest < ActionDispatch::IntegrationTest
|
||||
get events_path
|
||||
|
||||
assert_select "div.events__time-block[style='grid-area: 22/2']" do
|
||||
assert_select "strong", text: "David assigned JZ to Layout is broken"
|
||||
assert_select "strong", text: "David assigned JZ to \"Layout is broken\""
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user