Timeline: tag event stories with taxonomy data-* attributes (all five surfaces)#8216
Draft
janmaarten-a11y wants to merge 2 commits into
Draft
Timeline: tag event stories with taxonomy data-* attributes (all five surfaces)#8216janmaarten-a11y wants to merge 2 commits into
janmaarten-a11y wants to merge 2 commits into
Conversation
…ttributes Spread the event data-* contract from the taxonomy module onto every Timeline.Item in the License Compliance feature stories. This is the proof-of-pattern pilot for Phase 3 taxonomy tagging (github/primer#6664). Storybook-only, no consumer-facing change. Copilot-Session: ac5d1407-e965-4994-b6d5-fd1b8ec0cdef
|
This was referenced Jul 22, 2026
…event stories with taxonomy data-* attributes Extend the taxonomy data-* tagging from License Compliance to the remaining four surfaces, so all five now carry the contract. Same approach: each Timeline.Item spreads toEventDataAttributes(), deriving category and visibility from that surface's 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. Storybook-only; no visual change.
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 all five Timeline event story surfaces with the taxonomy
data-*attribute contract: License Compliance, Code Scanning, Dependabot, Secret Scanning, and Issues. License Compliance landed first as the proof-of-pattern, and the other four follow the same approach.The change is Storybook-only and adds no consumer-facing behavior. It only adds attributes to the rendered
<li>rows, so visuals are unchanged. Each surface lives in its own file.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'stoEventDataAttributesserializer 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 runtime from each row's rendered actor login viaactorTypeForLogin, and is omitted when a row renders no actor.Timeline.Itemforwards arbitrary props to its<li>, so the attributes land 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 isreviews.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 inEventFixedare theALERT_CLOSED_BECAME_OUTDATEDevent, which the catalog folds intoclosed(a system closure), notfixed. They carrydata-event-type="closed"and no actor. The two "Fixed in branch" rows carrydata-event-type="fixed".Secret Scanning, GitHub system actor resolves to
user: the system "GitHub" identity ondetectedand the automated validity-change rows resolves todata-actor-type="user", becauseactorTypeForLogin("GitHub")returnsuser(GitHub is not in the bot set). Whether a system identity should classify asuserorbotis worth confirming.Secret Scanning, rows left untagged because they have no catalog leaf or are parked or shared:
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 valuedismissal_cancelledleaf, unlike Dependabot)EventMetadata"Extended metadata found" and "removed" (parked per github/primer#6888)EventAssignment(all five variants): a cross-surface shared event, deliberately out of the per-surface catalogIssues, 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 single source of truth:marked_as_duplicate)labeledplusunlabeled)Dependabot's
EventAssignmentandEventCopilotWorkare also left untagged as shared and parked events, consistent with Secret Scanning.Testing
Validated 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, confirming the
<li>rows carry the expected attributes and that the untagged rows carry none, with zero console errors.These files stay out of
Timeline.docs.jsonandbuild.tsby design.