Timeline: tag event stories with taxonomy data-* attributes (Code Scanning, Dependabot, Secret Scanning, Issues)#8223
Closed
janmaarten-a11y wants to merge 1 commit into
Closed
Conversation
Apply the taxonomy data-* contract to the Code Scanning, Dependabot, Secret Scanning, and Issues Timeline event stories, consuming the taxonomy module (#8180) and following the License Compliance pilot (#8216). Storybook-only; no visual change. Each surface spreads toEventDataAttributes() onto its Timeline.Item rows, deriving category and visibility from its catalog and resolving data-actor-type from the rendered login. Parked and shared events, and variants with no catalog leaf, are left untagged with inline comments.
|
Contributor
Author
|
Superseded: folded these four surface files into #8216, which now covers all five surfaces (License Compliance + these four) in one PR. Closing this in favor of that. |
janmaarten-a11y
deleted the
janmaarten-a11y-timeline-taxonomy-data-attrs-all
branch
July 22, 2026 22:10
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.
Part of github/primer#6664 (epic github/primer#6654).
This PR tags four Timeline event story surfaces with the taxonomy
data-*attribute contract: Code Scanning, Dependabot, Secret Scanning, and Issues.
It applies the same approach proven in the License Compliance pilot
(#8216), so the two together cover all five surfaces.
The change is Storybook-only and adds no consumer-facing behavior. It only
adds attributes to the rendered
<li>rows, so visuals are unchanged. Eachsurface lives in its own file, so the four changes are independent.
How it works
Every
<Timeline.Item>for a cataloged event now spreads thedata-*attribute set produced by the taxonomy module (#8180,
packages/react/src/Timeline/taxonomy/), documented in github/primer#6888.Each file adds a small local helper that calls the module's
toEventDataAttributesserializer and derivescategoryandvisibilityfrom that surface's catalog, so the stories stay in sync with the source of
truth rather than hand-typing values.
data-actor-typeresolves at runtimefrom each row's rendered actor login via
actorTypeForLogin, and is omittedwhen a row renders no actor.
Timeline.Itemforwards arbitrary props to its<li>, so the attributesland directly on the row element.
What each surface tags
detected,appeared,reappeared) andfixedare system events with no actor. Closures,reopen, and the delegated-dismissal pair carry user actors.
openedandfixedrender the Dependabot bot actor;dismissedandreopenedfold manual (user) and automated (bot) paths;the delegated-dismissal group is
reviews.assignees, milestones, project fields, issue types, rename) carry
data-event-visibility="auditOnly"straight from the catalog.Judgment calls and untagged rows for review
These are the places where the mapping was not a clean 1:1, called out so a
reviewer can confirm each one.
Code Scanning, configuration-deleted maps to
closed: the two"Configuration deleted" rows in
EventFixedare theALERT_CLOSED_BECAME_OUTDATEDevent, which the catalog folds intoclosed(a system closure), not
fixed. They carrydata-event-type="closed"andno actor. The two "Fixed in branch" rows carry
data-event-type="fixed".Secret Scanning, GitHub system actor resolves to
user: the system"GitHub" identity on
detectedand the automated validity-change rowsresolves to
data-actor-type="user", becauseactorTypeForLogin("GitHub")returns
user(GitHub is not in the bot set). Whether a system identityshould classify as
userorbotis worth confirming.Secret Scanning, rows left untagged because they have no catalog leaf or are
parked or shared:
has no catalog leaf; the catalog's dismissal leaves are the separate
delegated-closure flow)
EventReport): the catalog maps Report tovalidity_changed,but github/primer#6888 flags that mapping as unconfirmed (open item 2), so
the row is left untagged rather than emit an unconfirmed value
dismissal_cancelledleaf, unlike Dependabot)
EventMetadata"Extended metadata found" and "removed" (parked pergithub/primer#6888)
EventAssignment(all five variants): a cross-surface shared event,deliberately out of the per-surface catalog
Issues, five variants left untagged. Each is a metadata or audit-only event
the taxonomy does not yet enumerate as a distinct leaf, so it is a candidate
leaf to add in a follow-up, not a defect. Tagging one now would mean emitting
a
data-event-typewith no catalog backing, which would break the singlesource of truth:
(the catalog has only
marked_as_duplicate)labeledplus
unlabeled)Dependabot's
EventAssignmentandEventCopilotWorkare also left untaggedas shared and parked events, consistent with Secret Scanning.
Testing
Validated on the combined branch with the repo's own gates: prettier,
eslint, and type-check (15/15 tasks) all pass with zero new errors. Each
surface was additionally rendered headlessly in real Chromium on its own
branch, confirming the
<li>rows carry the expected attributes and thatthe untagged rows carry none, with zero console errors.
These files stay out of
Timeline.docs.jsonandbuild.tsby design.