Skip to content

Commit f2dcf0a

Browse files
committed
Keep the parent crumb in a phone's trail
The redesign's phone trail showed only the first crumb and the current page, leaving the steps between to Topics and the reader's "← parent" link. #442 now returns from an overview group to its scope overview in place through the parent crumb, and that crumb was hidden on phones, so its scoped-overview journey could not focus it at 390x844. A phone's trail now keeps the first crumb, the parent and the current page; only the "…" for deeper ancestors gives way. The parent truncates like any middle crumb, at 24ch at most.
1 parent 0c559eb commit f2dcf0a

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎autoform_cli/assets/blueprint-dag.css‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/test_graph_view_rendering.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ def test_workspace_header_presses_one_view_and_gives_the_trail_its_own_row() ->
859859
# Topics sat a few px above the control beside it.
860860
assert ".bp-dag-integrated .bp-dag-outline-toggle { display: inline-flex; align-items: center; }" in tablet
861861
phones = style.split("@media (max-width: 720px) {\n .bp-dag-integrated", 1)[1].split("\n}", 1)[0]
862-
assert ".bp-dag-integrated .bp-dag-breadcrumb li:not(:first-child, :last-child) { display: none; }" in phones
862+
assert ".bp-dag-integrated .bp-dag-breadcrumb li:not(:first-child, :nth-last-child(-n+2)) { display: none; }" in phones
863863
assert ".bp-dag-integrated .bp-dag-search-wrap { flex-basis: 100%; }" in phones
864864

865865

‎tests/test_integrated_workspace_browser.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,9 @@ def test_long_ancestor_labels_and_full_reading_heading_stay_within_their_panes(
771771
playwright.expect(crumbs.nth(3)).to_have_text(_TARGET_TITLE)
772772
playwright.expect(crumbs.nth(3)).to_have_attribute("aria-current", "page")
773773
if width <= 720:
774-
# A phone keeps only the first crumb and the current page.
774+
# A phone keeps the first crumb, the parent and the current page; the "…" gives way.
775775
playwright.expect(crumbs.nth(1)).to_be_hidden()
776-
playwright.expect(crumbs.nth(2)).to_be_hidden()
776+
playwright.expect(crumbs.nth(2)).to_be_visible()
777777
else:
778778
playwright.expect(crumbs.nth(1)).to_be_visible()
779779
playwright.expect(crumbs.nth(2)).to_have_text(_DEEP_TITLE)

‎tests/test_scoped_overview_browser.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,7 @@ def test_large_scope_keeps_readable_truthful_groups_native_drill_zoom_and_back(
525525
_zoom_group(page, key)
526526
focused = _focus_graph_node(page, consumer.groups[key][0]["id"])
527527
playwright.expect(page.locator(".bp-dag-breadcrumb")).to_contain_text(_AREAS[0])
528-
if width <= 720:
529-
# A phone's trail shows only first / current: the scope crumb is there but hidden, and Areas or Back return to the scope.
530-
playwright.expect(page.locator(".bp-dag-breadcrumb a", has_text=_SCOPE_TITLE)).to_have_count(1)
531-
else:
532-
playwright.expect(page.locator(".bp-dag-breadcrumb").get_by_role("link", name=_SCOPE_TITLE, exact=True)).to_have_count(1)
528+
playwright.expect(page.locator(".bp-dag-breadcrumb").get_by_role("link", name=_SCOPE_TITLE, exact=True)).to_have_count(1)
533529
expanded_camera = _geometry(focused)["camera"]
534530
page.get_by_role("button", name=re.compile(r"^(Areas|Regions)$")).click()
535531
_committed(page)

0 commit comments

Comments
 (0)