From e8c2474fbfb2b68e7982e7bf1bafe4ea0156e9fa Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Wed, 7 Jan 2026 16:27:41 +0100 Subject: [PATCH 01/17] Move custom insets declaration to global css --- app/assets/stylesheets/_global.css | 6 ++++++ app/assets/stylesheets/native.css | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index 25bc182772..f426a042e2 100644 --- a/app/assets/stylesheets/_global.css +++ b/app/assets/stylesheets/_global.css @@ -1,6 +1,12 @@ @layer reset, base, components, modules, utilities, native, platform; :root { + /* Insets - The mobile apps may inject their own custom insets based on native elements on screen, like a floating navigation */ + --custom-safe-inset-top: var(--injected-safe-inset-top, env(safe-area-inset-top, 0px)); + --custom-safe-inset-right: var(--injected-safe-inset-right, env(safe-area-inset-right, 0px)); + --custom-safe-inset-bottom: var(--injected-safe-inset-bottom, env(safe-area-inset-bottom, 0px)); + --custom-safe-inset-left: var(--injected-safe-inset-left, env(safe-area-inset-left, 0px)); + /* Spacing */ --inline-space: 1ch; --inline-space-half: calc(var(--inline-space) / 2); diff --git a/app/assets/stylesheets/native.css b/app/assets/stylesheets/native.css index 96df0e00ba..98622d74a0 100644 --- a/app/assets/stylesheets/native.css +++ b/app/assets/stylesheets/native.css @@ -1,11 +1,5 @@ @layer native { [data-platform~=native] { - /* The mobile apps may inject their own custom insets based on native elements on screen, like a floating navigation */ - --custom-safe-inset-top: var(--injected-safe-inset-top, env(safe-area-inset-top, 0px)); - --custom-safe-inset-right: var(--injected-safe-inset-right, env(safe-area-inset-right, 0px)); - --custom-safe-inset-bottom: var(--injected-safe-inset-bottom, env(safe-area-inset-bottom, 0px)); - --custom-safe-inset-left: var(--injected-safe-inset-left, env(safe-area-inset-left, 0px)); - -webkit-tap-highlight-color: transparent; .hide-on-native { From 589134591648d0e0b59005613c9bf3295bc90a49 Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Wed, 7 Jan 2026 16:28:25 +0100 Subject: [PATCH 02/17] Use custom insets instead of env values --- app/assets/stylesheets/header.css | 2 +- app/assets/stylesheets/layout.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/header.css b/app/assets/stylesheets/header.css index 5a3c7ee835..c54636d131 100644 --- a/app/assets/stylesheets/header.css +++ b/app/assets/stylesheets/header.css @@ -13,7 +13,7 @@ "menu menu menu" "actions-start title actions-end"; max-inline-size: 100dvw; - padding-block: calc(var(--block-space-half) + env(safe-area-inset-top)) var(--block-space-half); + padding-block: calc(var(--block-space-half) + var(--custom-safe-inset-top)) var(--block-space-half); padding-inline: var(--main-padding); position: relative; z-index: var(--z-nav); diff --git a/app/assets/stylesheets/layout.css b/app/assets/stylesheets/layout.css index b9f8d63675..5caaa56c0c 100644 --- a/app/assets/stylesheets/layout.css +++ b/app/assets/stylesheets/layout.css @@ -13,8 +13,8 @@ margin-inline: auto; max-inline-size: 100dvw; padding-inline: - calc(var(--main-padding) + env(safe-area-inset-left)) - calc(var(--main-padding) + env(safe-area-inset-right)); + calc(var(--main-padding) + var(--custom-safe-inset-left)) + calc(var(--main-padding) + var(--custom-safe-inset-right)); text-align: center; } From 8508f1341a324cac1e8a4e6b2bd76ce3c43f73c7 Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Wed, 7 Jan 2026 16:30:26 +0100 Subject: [PATCH 03/17] Hide the content of the header instead the header itself ... it has the top inset that prevents being under the navigation bar --- app/assets/stylesheets/native.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/native.css b/app/assets/stylesheets/native.css index 98622d74a0..2f75cfd7d4 100644 --- a/app/assets/stylesheets/native.css +++ b/app/assets/stylesheets/native.css @@ -13,7 +13,12 @@ :not(:has(.header__title, .header__actions)), :not(:has(.header__title, .header__actions--end)):has(.header__actions--start .btn--back:only-child) ) { - display: none; + block-size: var(--custom-safe-inset-top); + padding: unset; + + * { + display: none; + } } .header__actions { From 241ce9fd7ac011d0d1c5e54bb2ade6ab83ac3ddf Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Wed, 7 Jan 2026 16:31:07 +0100 Subject: [PATCH 04/17] Tweak the top corners of the container on the card perma --- app/assets/stylesheets/native.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/native.css b/app/assets/stylesheets/native.css index 2f75cfd7d4..17129a9159 100644 --- a/app/assets/stylesheets/native.css +++ b/app/assets/stylesheets/native.css @@ -34,6 +34,11 @@ margin-block-start: 0; } + .card-perma__bg { + border-start-start-radius: calc(0.2em + clamp(0.25rem, 2vw, var(--padding-block))); + border-start-end-radius: calc(0.2em + clamp(0.25rem, 2vw, var(--padding-block))); + } + /* Search /* ------------------------------------------------------------------------ */ From 8bf2397c4aebaa48279d0aaa0f4ea7630e014fd0 Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Fri, 9 Jan 2026 11:57:16 +0100 Subject: [PATCH 05/17] Don't make all buttons bigger on mobile --- app/assets/stylesheets/buttons.css | 13 +++---------- app/helpers/application_helper.rb | 2 +- app/helpers/boards_helper.rb | 2 +- app/helpers/webhooks_helper.rb | 2 +- app/views/boards/show/menu/_columns.html.erb | 2 +- app/views/cards/container/_gild.html.erb | 4 ++-- app/views/cards/container/_image.html.erb | 2 +- app/views/cards/pins/_pin_button.html.erb | 4 ++-- app/views/cards/watches/_watch_button.html.erb | 4 ++-- app/views/notifications/index.html.erb | 2 +- 10 files changed, 15 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/buttons.css b/app/assets/stylesheets/buttons.css index 64ea77611a..07653e7faa 100644 --- a/app/assets/stylesheets/buttons.css +++ b/app/assets/stylesheets/buttons.css @@ -107,11 +107,6 @@ > * { grid-area: 1/1; } - - @media (max-width: 639px) { - --btn-size: 3em; - --icon-size: 70%; - } } /* Make a normal button circular on mobile */ @@ -125,7 +120,7 @@ inline-size: var(--btn-size); kbd, - span:last-of-type { + span:last-of-type:not(.icon) { display: none; } } @@ -224,17 +219,15 @@ .btn--back { --btn-border-size: 0; - font-size: var(--text-medium); - @media (max-width: 639px) { - padding: 0.5em; - strong, kbd { display: none; } } @media (min-width: 640px) { + font-size: var(--text-medium); + .icon--arrow-left { display: none; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 946a0900e5..9e0a72f813 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -11,7 +11,7 @@ def icon_tag(name, **options) end def back_link_to(label, url, action, **options) - link_to url, class: "btn btn--back", data: { controller: "hotkey", action: action }, **options do + link_to url, class: "btn btn--back btn--circle-mobile", data: { controller: "hotkey", action: action }, **options do icon_tag("arrow-left") + tag.strong("Back to #{label}", class: "overflow-ellipsis") + tag.kbd("ESC", class: "txt-x-small hide-on-touch").html_safe end end diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb index a1960b3410..4ed22dc032 100644 --- a/app/helpers/boards_helper.rb +++ b/app/helpers/boards_helper.rb @@ -4,7 +4,7 @@ def link_back_to_board(board) end def link_to_edit_board(board) - link_to edit_board_path(board), class: "btn", data: { controller: "tooltip" } do + link_to edit_board_path(board), class: "btn btn--circle-mobile", data: { controller: "tooltip" } do icon_tag("settings") + tag.span("Settings for #{board.name}", class: "for-screen-reader") end end diff --git a/app/helpers/webhooks_helper.rb b/app/helpers/webhooks_helper.rb index f3bb077c83..dea0ea9bd9 100644 --- a/app/helpers/webhooks_helper.rb +++ b/app/helpers/webhooks_helper.rb @@ -24,7 +24,7 @@ def webhook_action_label(action) def link_to_webhooks(board, &) link_to board_webhooks_path(board_id: board), - class: [ "btn", { "btn--reversed": board.webhooks.any? } ], + class: [ "btn btn--circle-mobile", { "btn--reversed": board.webhooks.any? } ], data: { controller: "tooltip" } do icon_tag("world") + tag.span("Webhooks", class: "for-screen-reader") end diff --git a/app/views/boards/show/menu/_columns.html.erb b/app/views/boards/show/menu/_columns.html.erb index 017527a43c..b227b72efe 100644 --- a/app/views/boards/show/menu/_columns.html.erb +++ b/app/views/boards/show/menu/_columns.html.erb @@ -1,5 +1,5 @@
- diff --git a/app/views/cards/container/_gild.html.erb b/app/views/cards/container/_gild.html.erb index 7647a3b4ff..a54895a459 100644 --- a/app/views/cards/container/_gild.html.erb +++ b/app/views/cards/container/_gild.html.erb @@ -1,10 +1,10 @@ <% if card.golden? %> - <%= button_to card_goldness_path(card), method: :delete, class: "btn btn--reversed", data: { controller: "tooltip hotkey", action: "keydown.shift+g@document->hotkey#click" } do %> + <%= button_to card_goldness_path(card), method: :delete, class: "btn btn--reversed btn--circle-mobile", data: { controller: "tooltip hotkey", action: "keydown.shift+g@document->hotkey#click" } do %> <%= icon_tag "golden-ticket" %> Demote to normal (shift+g) <% end %> <% else %> - <%= button_to card_goldness_path(card), class: "btn", data: { controller: "tooltip hotkey", action: "keydown.shift+g@document->hotkey#click" } do %> + <%= button_to card_goldness_path(card), class: "btn btn--circle-mobile", data: { controller: "tooltip hotkey", action: "keydown.shift+g@document->hotkey#click" } do %> <%= icon_tag "golden-ticket" %> Promote to Golden Ticket (shift+g) <% end %> diff --git a/app/views/cards/container/_image.html.erb b/app/views/cards/container/_image.html.erb index 6f0fceea0e..87287cafea 100644 --- a/app/views/cards/container/_image.html.erb +++ b/app/views/cards/container/_image.html.erb @@ -5,7 +5,7 @@ <% end %> <% elsif !card.closed? %> <%= form_with model: card, data: { controller: "form" } do |form| %> -