Commit Graph

20 Commits

Author SHA1 Message Date
Mike Dalessio 248fc5d3e7 Fix back navigation from filter views to cards (#2725)
* test: update sign_in_as system test helper to be more generic

and support fixture users with more than one board

* test: backfill a test for the card "back link"

when coming from a board filter page

* Fix back navigation to filter views from cards

When navigating from a filter view to a card, the back link now shows
the filter's label and navigates back to the filter URL instead of the
card's board.

The turbo-navigation Stimulus controller stores the page title alongside
the referrer URL in sessionStorage. On the card show page, a
referrerBackLink target rewrites the back link's href and label from the
stored values. This is scoped only to the card show page to avoid
navigation loops in multi-level deep pages.

* Add referrer allowlist to prevent stale referrer rewrites

The back link is only rewritten when the stored referrer's path matches
an allowlist of paths passed via prefer_referrer. This prevents stale
referrers from unrelated pages (e.g., settings) from overriding the
card's back link.

* Move back link navigation tests to dedicated system test file

Extract back link tests from smoke_test.rb into their own file since
they test specific JavaScript behavior that needs regression coverage.
Move sign_in_as helper to ApplicationSystemTestCase for reuse.

* Move markdown paste tests to dedicated system test file
2026-03-18 17:03:13 -04:00
Adrien Maston 9569032403 Move helper to bridge helper file 2026-02-20 13:03:28 +01:00
Rosa Gutierrez bb6f2963b4 Revert commits accidentally pushed to main
Revert "Add bridged share button to board and card permas"
This reverts commit 069e165b43.

Revert "Move helper to bridge helper file"
This reverts commit 1ee37f046c.
2026-02-20 12:58:39 +01:00
Adrien Maston 1ee37f046c Move helper to bridge helper file 2026-02-20 12:46:00 +01:00
Adrien Maston 4072688974 Use a dedicated link to bridge a "go to" board button 2026-02-05 17:36:48 +01:00
Adrien Maston 626b8aa8a6 Revert "Show "Go to" board button in card perma"
This reverts commit d689f560b4.
2026-02-05 17:31:37 +01:00
Adrien Maston d689f560b4 Show "Go to" board button in card perma 2026-02-05 17:04:03 +01:00
Adrien Maston 161925ab2b Merge branch 'main' into mobile/prepare-webviews-2
* main: (100 commits)
  Fix notification broadcast test for turbo-rails 2.0.21
  Update `turbo-rails` to get latest Turbo version
  Remove reference to removed controller
  Fix bad formatting on bridge page title attr
  Use private functions for bridge components
  Setup focus handling on touch target's connect callback
  Setup proper focus handling for mobile on the card perma's board picker
  Move dialog focus handling into the dialog controller
  Create popup initial alignment classes
  Fix class typo
  Hide the board selector button if card is closed
  Align board and tag picker dialogs without using math
  Add dialog manager to card perma
  Fix "M" hotkey using stale user from fragment cache
  Solve problem when Action Text raises on missing attachables
  Solve problem when Action Text raises on missing attachables
  Completing a step removes stalled status from UI
  Bump Bootsnap to v1.21.1
  Add Enable all/Disable all buttons to webhook event selection
  Use correct class selectors to target cards with  background images
  ...
2026-01-20 13:38:38 +01:00
Adrien Maston 8bf2397c4a Don't make all buttons bigger on mobile 2026-01-09 11:57:16 +01:00
Jay Ohms b9dcc3c08f Update bridged overflow menu items for settings links 2026-01-08 16:36:12 -05:00
Adrien Maston f848a492a4 Use already existing buttons to populate the top nav bar 2026-01-08 17:32:21 +01:00
Denis Švara 37467743b3 Remove bridge button metadata from board settings link. 2026-01-08 16:37:42 +01:00
Denis Švara 37f03fc4e7 Use bridge buttons controller in boards. 2026-01-08 10:18:56 +01:00
Denis Švara dc9c544408 Use bridge nav-button for board settings action. 2026-01-07 12:54:04 +01:00
Jason Zimdars 7644b0e793 ESC is primary back hotkey, use helper in more places 2025-12-01 13:54:08 -06:00
Andy Smith 5246c202b0 Create back link helper that works nicely on mobile 2025-11-13 14:13:29 -06:00
Andy Smith 3d2b649828 Add btn--back class 2025-11-13 13:57:36 -06:00
Jason Zimdars 699bc1a13b Use ArrowLeft for back button navigation 2025-11-11 14:30:25 -06:00
Jason Zimdars 64e466d903 Use b for back-to-board, indicate shortcut visibly 2025-11-10 14:34:08 -06:00
Jorge Manrubia 39ec6cf062 Replace collection with board in the code, tests green 2025-11-05 13:41:12 +01:00