Skip to content

Resolve the issue that the breadcrumb of new entry can't reflect accurate location if inside subfolders#382

Open
Spr-Aachen wants to merge 1 commit into
hunvreus:mainfrom
Spr-Aachen:treeFix
Open

Resolve the issue that the breadcrumb of new entry can't reflect accurate location if inside subfolders#382
Spr-Aachen wants to merge 1 commit into
hunvreus:mainfrom
Spr-Aachen:treeFix

Conversation

@Spr-Aachen

@Spr-Aachen Spr-Aachen commented Apr 2, 2026

Copy link
Copy Markdown

Issue

When creating a new entry inside a subfolder of a collection e.g., "Posts > subfolder"
2026-04-30 213520

The breadcrumb path in the top bar incorrectly displays as "Posts > New entry" instead of "Posts > subfolder > New entry"
2026-04-30 213527

Which means the subfolder segment was missing from the breadcrumb when path was null (i.e., during entry creation), even though the entry was correctly saved in the subfolder.


Solution

When path is null but a parent directory is provided, the fix now:

  1. Derives the relative path between the schema's root path and the parent directory
  2. Splits it into segments and reconstructs intermediate folder entries
  3. Renders the full breadcrumb chain: shows middle segments collapsed via a dropdown (with BreadcrumbEllipsis) if there are multiple levels, and always shows the immediate parent as a clickable link before the "New entry" page title
  4. Adds parent to the useMemo dependency array to ensure the breadcrumb re-renders correctly when navigating between folders

This ensures the breadcrumb accurately reflects the actual location where the new entry will be created.
586492702-d5dd1f9b-5574-4fd2-92f1-954217b282d6

@Spr-Aachen Spr-Aachen changed the title Fix construction of addEntryHref Resolve the issue that new entry can't be created inside subfolders Apr 2, 2026
@Spr-Aachen Spr-Aachen closed this Apr 30, 2026
@Spr-Aachen Spr-Aachen changed the title Resolve the issue that new entry can't be created inside subfolders Resolve the issue that the breadcrumb of new entry can't reflect accurate location if inside subfolders Apr 30, 2026
@Spr-Aachen Spr-Aachen reopened this Apr 30, 2026
@Spr-Aachen

Spr-Aachen commented May 1, 2026

Copy link
Copy Markdown
Author

Test Result

  • Before
    586095018-9696997e-ce07-47e5-8330-0f41aa5ae93d

  • After (Local Testing)
    2026-05-01 205811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant