Timeline: tag Code Scanning event stories with taxonomy data-* attributes#8218
Closed
janmaarten-a11y wants to merge 1 commit into
Closed
Timeline: tag Code Scanning event stories with taxonomy data-* attributes#8218janmaarten-a11y wants to merge 1 commit into
janmaarten-a11y wants to merge 1 commit into
Conversation
…utes Add per-row data-* taxonomy attributes to the Code Scanning Timeline event stories, projecting each row through the shared toEventDataAttributes serializer and deriving category/visibility from CODE_SCANNING_TAXONOMY. Config-deletion rows carry data-event-type="closed" per the taxonomy (BECAME_OUTDATED folds into closed), not "fixed". Storybook-only, no visual change.
|
Contributor
Author
|
Closing: consolidating all four Timeline surface-tagging changes into one combined PR. Branch janmaarten-a11y-timeline-tag-code-scanning-stories stays pushed for integration. |
primer
Bot
deleted the
janmaarten-a11y-timeline-tag-code-scanning-stories
branch
July 23, 2026 00:19
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.
Summary
Adds per-row
data-*taxonomy attributes to the Code Scanning Timeline event stories. This is the Phase 3 tagging fan-out (github/primer#6664, epic github/primer#6654) applied to the Code Scanning surface, following the proven License Compliance pilot (#8216).Every
Timeline.IteminTimeline.code-scanning.features.stories.tsxnow spreads a small localcodeScanningAttrshelper that projects the row through the sharedtoEventDataAttributesserializer from the taxonomy module (#8180, docs #6888). It emitsdata-event-scope,data-event-type,data-event-category,data-event-visibility, and (for actor rows)data-actor-type.This is the same contract as the License Compliance pilot (#8216) consuming the taxonomy module (#8180): the story derives
categoryandvisibilityFROMCODE_SCANNING_TAXONOMYrather than hand-maintaining them, and resolvesdata-actor-typefrom the rendered actor login viaactorTypeForLogin. System rows (no rendered actor) pass no login, sodata-actor-typeis omitted entirely.Storybook-only, no visual change. This file is intentionally not wired into components-json or the docs page, so nothing consumer-facing changes.
Per-row attributes
data-event-typedetected/appeared/reappeared, categoryfindings, nodata-actor-type.data-event-type="fixed"(categoryfindings), system, no actor.data-event-type="closed"(categorystatus) withdata-actor-type="user".data-event-type="reopened", user actor.data-event-type="dismissal_requested", user actor.data-event-type="dismissal_reviewed", user actor.The one judgment call: Configuration deleted maps to closed
The
EventFixedstory visually groups two "Configuration deleted" rows alongside the "Fixed in branch" rows. These rows are theALERT_CLOSED_BECAME_OUTDATEDwire event, which the taxonomy catalog folds intoclosed(a system closure), notfixed(see theCODE_SCANNING_TAXONOMYcomment:closed: folds BECAME_OUTDATED (system) + CLOSED_BY_USER (user)). So the two "Configuration deleted" rows carrydata-event-type="closed"(categorystatus), while the two "Fixed in branch" rows carrydata-event-type="fixed". Both are system config/fix events with no rendered actor, so neither emitsdata-actor-type. A code comment on theEventFixedstory documents this classification. Flagging it here for reviewer confirmation.All Code Scanning leaves are cataloged; there are no parked or shared events on this surface, so nothing is left untagged.
Changelog
New
Nothing consumer-facing. Storybook-only taxonomy tagging.
Changed
Code Scanning Timeline event stories now render per-row
data-*taxonomy attributes.Removed
Nothing.
Rollout strategy
Testing & Reviewing
Rendered the
EventDetected,EventFixed, andEventClosedByUserstories headlessly and asserted the emitted attributes: Detected rows have nodata-actor-typeand categoryfindings; the "Fixed in branch" row isdata-event-type="fixed"(no actor) while "Configuration deleted" isdata-event-type="closed"(no actor); the Closed-by-user row isdata-event-type="closed"withdata-actor-type="user". Zero console errors. Prettier, ESLint, Stylelint, and type-check all pass with zero new errors.