Skip to content

feat(core/dfn-panel): show linking terms in panel#5251

Open
marcoscaceres wants to merge 5 commits into
mainfrom
feat/3741-dfn-panel-lt
Open

feat(core/dfn-panel): show linking terms in panel#5251
marcoscaceres wants to merge 5 commits into
mainfrom
feat/3741-dfn-panel-lt

Conversation

@marcoscaceres
Copy link
Copy Markdown
Contributor

Closes #3741

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 visibility into a definition’s alternate “linking terms” (from data-lt) by rendering them in the DFN panel, addressing the usability request in #3741.

Changes:

  • Render a “Linking terms:” line in the DFN panel when data-lt is present and contains aliases beyond the DFN’s own text.
  • Normalize/dedupe data-lt values for display and omit the term matching the DFN’s text content.
  • Add a spec test covering presence/absence and whitespace normalization behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/core/dfn-panel.js Adds linkingTermsToHTML() and injects linking-term display into the panel markup.
tests/spec/core/dfn-panel-spec.js Adds coverage ensuring linking terms appear only when appropriate and handle trimming/deduping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcoscaceres marcoscaceres marked this pull request as ready for review May 4, 2026 11:08
marcoscaceres and others added 3 commits May 9, 2026 18:01
Adds a "Possible linking syntaxes:" section to each dfn popup panel,
showing the correct ReSpec inline shorthand for linking to the definition.
Handles all dfn types: [= =] for concepts, {{ }} for IDL, [^ ^] for
elements/attributes, {^ ^} for CDDL. Includes data-lt aliases and per-item
copy-to-clipboard buttons. Fixes selectors in dfn-index-spec.js.

Closes #3741
- Add "interface mixin" and "callback interface" to IDL_TYPES
- Add removeOnSave to copy buttons so they're stripped from exports
- Include buttons in trapFocus selector (a11y: keyboard users can
  reach copy buttons)
@marcoscaceres marcoscaceres force-pushed the feat/3741-dfn-panel-lt branch from 13771de to 6cf689e Compare May 10, 2026 09:30
…fault

Split comma-separated data-dfn-for values so each produces a separate
linking syntax (e.g. {{Foo/method()}} and {{Bar/method()}} instead of
the invalid {{Foo, Bar/method()}}). Also skip primaryTerm when
data-lt-noDefault is set, matching getDfnTitles behavior.
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.

Show the linking terms (-lt) for exported terms in the DFN box

3 participants