Timeline: tag Issues event stories with taxonomy data-* attributes#8221
Closed
janmaarten-a11y wants to merge 1 commit into
Closed
Timeline: tag Issues event stories with taxonomy data-* attributes#8221janmaarten-a11y wants to merge 1 commit into
janmaarten-a11y wants to merge 1 commit into
Conversation
Spread taxonomy data-* attributes onto each cataloged Issues Timeline.Item in Timeline.issues.features.stories.tsx (Storybook-only, no visual change). Uses toEventDataAttributes with the merged taxonomy module (scope 'issue'); category and visibility derive from ISSUE_TAXONOMY so metadata events carry data-event-visibility='auditOnly'. Five variants with no catalog leaf are left untagged. Copilot-Session: 7b74330e-756a-4689-91d5-afbb9f2bf44b
|
Contributor
Author
|
Closing: consolidating the four Timeline surface-tagging changes into one combined PR. The branch stays live for integration. |
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
This is the Phase 3 tagging fan-out for the Issues surface (github/primer#6664, epic #6654), following the License Compliance pilot (#8216). It adds the taxonomy
data-*attributes to every cataloged Issues event story so the stories can be filtered and grouped by event family. Issues is the largest surface, with 38 catalog leaves.The change is Storybook-only and produces no visual change. It edits a single file,
packages/react/src/Timeline/Timeline.issues.features.stories.tsx, and tags eachTimeline.Itemin place without restructuring, reordering, or regrouping any stories.It uses the same contract as the License Compliance pilot (#8216): the consuming taxonomy module (#8180) plus its docs (#6888). A small local
issueAttrshelper callstoEventDataAttributeswithscope: 'issue'(singular), and readscategoryandvisibilityfromISSUE_TAXONOMYso the values always come from the catalog rather than being hand-written per row. Each item passes its rendered actor login sodata-actor-typeresolves (every Issues event carries an actor).Because category and visibility are read from the catalog, the metadata events (labels, assignees, milestones, project fields, issue types, and rename) carry
data-event-visibility='auditOnly'automatically. The status, references, and moderation events default todata-event-visibility='primary'.Variants left untagged
Five story variants have no matching leaf in
ISSUE_TAXONOMY, so they are intentionally left untagged (nodata-event-*attributes) with an inline code comment explaining why:marked_as_duplicateexists)marked_as_duplicateexists)marked_as_duplicateexists)labeled+unlabeled, which a single row cannot carry cleanly)Changelog
New
data-event-scope,data-event-type,data-event-category,data-event-visibility, anddata-actor-typeattributes on the cataloged Issues Timeline event stories.Changed
Removed
Rollout strategy
Testing & Reviewing
All repo gates pass with zero new errors: prettier, eslint, stylelint, and type-check (15/15 tasks).
A headless render pass (with console-error enforcement on, 0 console errors) confirmed the sample rows:
data-event-scope='issue'data-event-type='closed'data-event-category='status'data-event-visibility='primary'data-actor-type='user'data-event-type='labeled'data-event-category='metadata'data-event-visibility='auditOnly'data-actor-type='user'data-event-type='connected'data-event-category='references'It also confirmed the flagged variants (Converted from draft; Marked as canonical; Unmarked as duplicate; Unmarked as canonical; Labels added and removed) carry no
data-event-*attributes.To review, open the
Components/Timeline/Events/Issuesstories in Storybook and inspect the renderedTimeline.ItemDOM nodes.