Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): views rendered in drawers can update step nav #11548

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Mar 5, 2025

When rendering views within a drawer outside of the edit view, i.e. from the list view, it updates the underlying step nav to the collection of the drawer. This is true for both document drawers and list drawers.

This is because the logic controlling this behavior relies on the current edit depth, which is only incremented within the edit view itself. Instead of doing this, we can conditionally run the setter functions based the presence of a drawer slug.

An alternative to this would be to subscribe to the drawerDepth context but this would be less efficient, as this requires an unnecessary hook and subsequent rendering cycle.

@jacobsfletch jacobsfletch changed the title fix(ui): views rendered in document drawer can update step nav fix(ui): views rendered in drawers can update step nav Mar 5, 2025
@jacobsfletch jacobsfletch merged commit 04b0468 into main Mar 5, 2025
74 checks passed
@jacobsfletch jacobsfletch deleted the fix/drawer-step-nav branch March 5, 2025 15:07
Copy link
Contributor

github-actions bot commented Mar 5, 2025

🚀 This is included in version v3.27.0

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

Successfully merging this pull request may close these issues.

None yet

1 participant