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

Slice 2: Show “Panel is no longer available” overlay on info panels/forms #8293

Closed
fungairino opened this issue Apr 19, 2024 · 0 comments · Fixed by #8351
Closed

Slice 2: Show “Panel is no longer available” overlay on info panels/forms #8293

fungairino opened this issue Apr 19, 2024 · 0 comments · Fixed by #8351
Assignees

Comments

@fungairino
Copy link
Collaborator

fungairino commented Apr 19, 2024

Feature UX: use the provided UX mockup https://www.figma.com/file/iK3zlhXpXqjPCX8jgriynh/SideBar?type=design&node-id=1748-3224&mode=design&t=SjRFqEO49OZWGfmF-4

Engineering Considerations/Implementation Sketch

  • Add a new stale boolean attribute to TemporaryPanelEntry and FormPanelEntry, and a new reducer method invalidatePanels , for updating all current forms and panels to stale = true
  • Set up listener in the [ConnectedSidebar](https://github.com/pixiebrix/pixiebrix-extension/blob/83fd174a189408e7eb133b6b5f5d21851ef738f8/src/sidebar/ConnectedSidebar.tsx#L131-L130) for browser.webNavigation.onBeforeNavigate (note: checking that frameType is "outermost_frame" and the tabId is the one connected to the sidebar) that sets any temporary and form panels as stale using the sidebarSlice setPanels method.
  • We will need to pass the connected tabId as a prop into the sidebar component
    Render the “Panel not available on this Page” overlay over the temporary and form panel body. Close button should trigger closing the panel.

Test Plan:

  • Ensure that this not occur on SPA navigation (ex. on a github repo, switching from the Code to Pull Requests tab.
  • If a link opens a new tab, the old tab’s sidebar panels should not be marked as stale
  • Ensure that this occurs when refreshing the page
  • Navigating via new link in the browser or following a link.

From: https://www.notion.so/pixiebrix/Phase-gracefully-handle-page-reload-navigation-in-the-Chromium-Side-Panel-0efdedb6c1e44b088e65106202e08c28?pvs=4#ec3a3eef571a4be988dcee641ee86759

@fungairino fungairino linked a pull request Apr 26, 2024 that will close this issue
5 tasks
fungairino added a commit that referenced this issue Apr 29, 2024
…8351)

* Unavailable overlay for sidebar forms and temp panels on nav

* close button works, added tests

* fixing lint errors

* wip

* PR comments
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 a pull request may close this issue.

1 participant