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: overrides entity visibility within drawers #9546

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Nov 26, 2024

When using the admin.hidden: true property on a collection, it rightfully removes all navigation and routing for that particular collection. However, this also affects the expected behavior of hidden entities when they are rendered within a drawer, such as the document drawer or list drawer. For example, when creating a new admin.hidden document through the relationship or join field, the drawer should still render the view, despite the underlying route for that view being disabled. This change was a result of the introduction of on-demand server components in #8364, where we now make a server roundtrip to render the view in its entirety, which include the logic that redirects these hidden entities.

Now, we pass a new overrideEntityVisibility argument through the server function that, when true, skips this step. This way documents can continue to respect admin.hidden while also having the ability to override on a case-by-case basis throughout the UI.

@jacobsfletch jacobsfletch marked this pull request as ready for review November 26, 2024 21:56
@jacobsfletch jacobsfletch changed the title fix: allows entity visibility overrides when rendering document or list views within a drawer fix: overrides entity visibility within drawers Nov 26, 2024
@jacobsfletch jacobsfletch merged commit 5d18a52 into main Nov 26, 2024
53 checks passed
@jacobsfletch jacobsfletch deleted the fix/nested-entity-visibility branch November 26, 2024 23:22
Copy link

🚀 This is included in version v3.2.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.

1 participant