Unable to "Render Panel" when the host pattern doesn't match
Describe the bug
This is more of a UX issue rather than a bug. The user can make changes to side panels regardless of the current page, but "Render Panel" and "Auto-render" don't do anything. This can cause confusion until/unless they realize the current page doesn't match.
To Reproduce
Steps to reproduce the behavior:
- Create side panel for https://pbx.vercel.app/
- Visit https://example.com
- Click "Render Panel" in Page Editor
Actual behavior
It opens the sidebar, but then nothing appears
Expected behavior
- Hide "auto-render"?
- When clicking "Render Panel", Show notifications in page editor regarding unavailability
Screenshots/Loom
@BLoe I'd like to get your opinion on the Expected Behavior
I discussed this with Mark and Britt. I think we should NOT show the panel, but SHOULD have a pop-up or other warning indicator to inform the mod builder that the panel wasn't shown due to URL mismatch. The reason (from Mark) for not showing the panel is that some functionality like API calls or page scraping could fail or perform unexpected behavior in the case where the URL doesn't match. But we still want to make it totally clear to the mod builder why the button/switch is not rendering the sidebar panel.
I think it could make sense to have the warning behavior attached to the button, and remove the auto-render switch in this case, but don't have strong feelings there. Auto-render could just as easily show the same warning, although there are probably some use-cases where this would cause too much spam, but that could also be avoided by having a long debounce/throttle effect on the warning indicator.
The reason (from Mark) for not showing the panel is that some functionality like API calls or page scraping could fail or perform unexpected behavior in the case where the URL doesn't match
💯
Removing from MV3/Sidebar Epics because this is manifest-independent