Editor navigation: return to where you came from, select a hidden page's parent in the tree, page actions in the page module #149
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Moving between the List module, the page module, page properties and the element edit page loses context. Every Close / Save & close goes to a fixed place. The page tree shows nothing selected for a page it hides. And a hidden page offers no way back to its list and no page actions where you edit it. This issue makes the editor remember which view each view was opened from, keeps the tree pointing at the right place, and puts the page actions on the page itself, so a workflow like List → news item → edit → back behaves as expected.
Current behavior
Found while analysing the news workflow (news items live in a
hideChildPagessection and are managed in the List module, see #79), reproduced in a browser againstharness serveon a site withharness add news, and re-checked against the code during triage:hideChildPagessection the tree draws no row, and nothing in the tree is selected, not even the section./ news / summer-meetup / _index.md.?props=1): Close and Save & close always just drop?props=1, so they land on the page module of the same page. A List-module create opens properties when the chosen type has fields the create dialog does not show (news-itemdoes:authoris notcreate: true), so after Save & close the author is in the page module, not back in the List; it takes 2–3 presses of Back to return./edit/<lang>/<page>/<uid>): Close, Save & Close and "Back to page" always go to the page module of the element's page, even when the edit page was opened by clicking an element in the View module's preview.Desired behavior
Return to where you came from
returnquery parameter on editor routes names the view that Close / Save & close / the back button on the current view goes to.return. Every close reads it.returnstores that page view's URL, including its ownreturn, as properties'return. So every close goes exactly one step back.hrefcarries it too and open-in-new-tab keeps it);return(old links, typed URLs) behavior is as today, except for the hidden-page fallbacks below.parseRouteskips empty segments, so//page/en/xparses as a page route: a raw value starting with//must be rejected before it is parsed.return; they are deliberate navigations elsewhere. Reload, Back and shared links keep it, because it lives in the URL.Back button in the page module
return, and goes there. It is labelled with its target: the title of the page thereturnroute names (e.g. "← News" for that section's List), or that module's label when the route names no page.hideChildPagessection) shows it without areturntoo. It then goes to the parent section in the List module and is labelled with that section's title. #153 later re-points this fallback to the module that manages the section.returnshows no back button. Properties show none either; their Close plays that role.[← News] [Publish] [Properties] [Undo] [View] [⋯].Orientation for hidden pages
hideChildPagessection (at any depth: the tree draws none of its descendants), that section's tree row, the nearest ancestor the tree draws, is shown as the selected row (same selected styling andaria-current). No extra or temporary row is drawn for the hidden page.Home / News / Summer meetup. The "/" separator stays (the Media module's folder path shares it and does not change). Ancestor pages, the home page included, are clickable and select that page as today; a synthesized directory stays static.Page actions
return.return; without one, to the parent section's list for a hidden page, else to the parent page.