Repository navigation
feat(injectors): add a page picker to the Injectors tab - #276
Merged
Merged
Conversation
Without a host page the Injectors tab read the top-level roots and environment of the injector-tree state, which belong to whichever tab reported last. With two app tabs open the tree jumped between them on every report, and a selected injector turned "no longer on the page" for no visible reason. The tab now reads shared.pages[pageId] for the shown page, picked with pickPage like the Signals tab: the host page when the panel is framed by one, else the page chosen in the new Page picker, else the page shown before, else the newest. The picker uses the shared app-select, shows only when more than one page reports and the panel has no host page, and labels pages by title or URL from the component tree. When the chosen page closes the tab falls back to another page and announces it. The selected injector, focus and collapsed rows are kept per page, and row highlights go to the shown page. Older servers that send no per-page map still show the top-level tree.
Contributor
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
8 tasks done
# Conflicts: # extension/ui/assets/browser-agent-rpc-BXhoSh1z-CQUbrXfP.js # extension/ui/assets/browser-agent-rpc-BXhoSh1z-Cdun1x9m.js # extension/ui/assets/browser-agent-rpc-BXhoSh1z-xH4BoUvO.js # extension/ui/assets/index-BNLt20OF.js # extension/ui/assets/index-CgvJVwtz.js # extension/ui/assets/index-CjuPzWo3.js # extension/ui/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
With no host page, the Injectors tab read the top-level
roots/environmentof theinjector-treestate, which belong to whichever tab reported last. With two app tabs open, the tree jumped between them on every report, and a selected injector became "no longer on the page" for no visible reason. Components, Signals, NgRx, Router and SSR & HTTP already have a Page picker.The tab now reads
pages[pageId]for the shown page and picks it withpickPage, like Signals: the host page when the panel is framed by one, otherwise the page you choose, otherwise the page shown before, otherwise the newest. A Page picker (sharedapp-select) appears only when more than one page reports and the panel has no host page. It labels pages by title or URL from the component tree. When the chosen page closes, the tab falls back to another page and announces it. Each page keeps its own selected injector, focus and collapsed rows, and row highlights go to the shown page. Servers without a per-page map still show the top-level tree. The docs page gets a "Page picker" section.How it was verified
pnpm format:checkpnpm typecheck(ngc with strictTemplates, no errors)pnpm test:panel(249 tests, 7 new; 5 of them fail without the change)pnpm docs:buildpnpm extension:build,extension/uicommittedpnpm commit:checkScreenshots
None attached.
Notes for reviewers
component-treeshared state, which is read only while the picker is shown, as on the Signals tab. If that state isn't available, pages show asPage <id>.request-page-highlightnow sends the shown page id instead ofhostPageId(). With a host page, nothing changes.Summary by CodeRabbit
New Features
Documentation