Skip to content

feat(core/dfn-panel): show citation popup on biblio reference click#5293

Draft
marcoscaceres wants to merge 5 commits into
mainfrom
feat/3345-biblio-popup
Draft

feat(core/dfn-panel): show citation popup on biblio reference click#5293
marcoscaceres wants to merge 5 commits into
mainfrom
feat/3345-biblio-popup

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

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.

marcoscaceres and others added 4 commits May 10, 2026 17:04
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.
@marcoscaceres marcoscaceres requested a review from Copilot May 10, 2026 09:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-panel to 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.

Comment thread src/core/dfn-panel.runtime.js
Comment thread tests/spec/core/dfn-panel-spec.js
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.

Clicking on bliblio refs should pop up dfn panel

3 participants