feat(structure): support closing first collapsed DocumentPanel
#5867
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Presently, if a
DocumentPanel
is both in its collapsed state and also the first pane, neither a back button nor a close button can be displayed.Presentation tool uses the
DocumentPanel
without any other panes, but also needs to support a collapsed state to prevent the inspector causing overflow issues.This PR lifts some logic for displaying the
DocumentPanel
close button, relying on the presence of a providedBackLink
, which Structure'sPaneRouterProvider
will now only pass if the pane is not the first. Presentation's router provider can therefore always pass aBackLink
and display a close button even in a collapsed state.What to review
There should be no changes within Structure tool, with the close and back buttons rendering as expected. The buttons should also both still be hidden if a user defines structure without multiple panes, e.g.
Testing
Notes for release
N/A. This is an internal feature.