Skip to content

refactor: use interest invokers for contributor hovercard#1985

Draft
knowler wants to merge 7 commits intouserquin/feat-add-contributors-popup-cardfrom
knowler/contributors-hovercard
Draft

refactor: use interest invokers for contributor hovercard#1985
knowler wants to merge 7 commits intouserquin/feat-add-contributors-popup-cardfrom
knowler/contributors-hovercard

Conversation

@knowler
Copy link
Member

@knowler knowler commented Mar 7, 2026

Refactoring #1596 to use interest invokers, the Popover API, and anchor positioning instead. This is partly an experiment, so don’t let this block you from iterating on your PR @userquin.

Using these web platform APIs means we don’t need to add a whole lot of complexity to pull this off. The only JS we need is to update the activeContributor using the beforetoggle event for the popover.

This only works in Chromium, so we have a couple of options:

  1. Treat the hovercards as a progressive enhancement and work iteratively (polyfill later). If so, this PR is practically ready—I have a few changes I’d like to make though.
  2. Try to polyfill the interest invoker behaviour now using the Popover API (well supported). I might end up doing this.

Anchor positioning is only Baseline Newly Available as of December, but it does already have 81% availability in browsers globally.

I personally don’t think it’s worth it to try and create behavioural parity across all of our browser targets here. The content is likely available if the user just clicks through the GitHub links. The only thing that is missing is the governance roles, which might might be able to find a solution (grouping under separate headings would be the most easily accessible, especially from an information architecture perspective).

TODO

@knowler knowler self-assigned this Mar 7, 2026
@vercel
Copy link

vercel bot commented Mar 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 8, 2026 3:25am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 8, 2026 3:25am
npmx-lunaria Ignored Ignored Mar 8, 2026 3:25am

Request Review

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/en.json Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

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.

1 participant