Skip to content

Document closesOnNavigation() for plugin overlays - #612

Open
wojt-janowski wants to merge 1 commit into
NativePHP:mainfrom
wojt-janowski:docs/plugin-overlays-close-on-navigation
Open

wojt-janowski wants to merge 1 commit into
NativePHP:mainfrom
wojt-janowski:docs/plugin-overlays-close-on-navigation

Conversation

@wojt-janowski

Copy link
Copy Markdown
Contributor

Documents Element::closesOnNavigation() from NativePHP/mobile-air#670 in UI Component Plugins, as asked there.

A new "Closing Overlays on Navigation" section, marked since 4.8, explains why open bottom sheets and modals close when a screen navigates away, and how a plugin's own sheet or modal opts in by returning true from closesOnNavigation(). It also covers what the leaving screen's last frame contains, and that the element's $type must match the manifest.

Testing

  • php artisan test --filter=Documentation: 8 passed.
  • Rendered the page locally and checked the section, the badge and its links.

NativePHP/mobile-air#670 lets a UI plugin element opt in to closing when its screen navigates away, like core bottom sheets and modals.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1dca0-9fd9-70ee-9a18-d0b2c7791ec9
Co-authored-by: Wojt Janowski <wojt@clinically.com.au>

This branch has not been deployed

No deployments
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