feat(core/dfn-panel): show citation popup on biblio reference click#5293
Draft
marcoscaceres wants to merge 5 commits into
Draft
feat(core/dfn-panel): show citation popup on biblio reference click#5293marcoscaceres wants to merge 5 commits into
marcoscaceres wants to merge 5 commits into
Conversation
Clicking a [[SPEC]] inline reference now shows a dfn-panel-style popup containing the full citation details (title, authors, publisher, date, URL) from the rendered references section, instead of navigating to the bottom of the page. The biblio panels reuse the existing .dfn-panel CSS infrastructure and runtime interaction model (show/hide/dock, focus trapping, keyboard nav). Panel IDs use the scheme `biblio-panel-for-<bib-id>` to avoid collision with dfn panels. Multiple links that alias to the same bib entry share a single panel. Clicking prevents the default scroll-to-references navigation. Closes #3345
The test asserted expect(doc).toBeTruthy() which always passes. Replace with expect(panel).toBeNull() to verify no panel is created.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds bibliography-reference (“bibref”) popups using the existing dfn-panel infrastructure, so clicking an inline citation like [FETCH] can show the full rendered reference without jumping to the References section.
Changes:
- Extend
core/dfn-panelto generate and wire up “biblio panels” for inline bibliography links (a.bibref). - Update the dfn-panel runtime listener to open the correct biblio panel and suppress default hash navigation.
- Add styling and a dedicated test suite for biblio panel creation/interaction (including export behavior).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/spec/core/dfn-panel-spec.js | Adds new biblioPanel test coverage for panel creation, ARIA, interaction, and exported docs. |
| src/styles/dfn-panel.css.js | Adds minor styling for a.bibref cursor and spacing for rendered biblio content inside panels. |
| src/core/dfn-panel.runtime.js | Extends runtime event handling to open/close biblio panels from a.bibref interactions. |
| src/core/dfn-panel.js | Generates biblio panels by cloning rendered reference entries and marks bibref links with dialog semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #3345
Clicking a bibliography reference (e.g. [FETCH]) now shows a popup panel with the full citation details, using the same panel infrastructure as dfn panels. Multiple references to the same spec share one panel. The popup prevents the default jump to the references section, keeping the reader in context.