Skip to content

Timeline: tag Issues event stories with taxonomy data-* attributes#8221

Closed
janmaarten-a11y wants to merge 1 commit into
mainfrom
janmaarten-a11y-timeline-issues-data-attributes
Closed

Timeline: tag Issues event stories with taxonomy data-* attributes#8221
janmaarten-a11y wants to merge 1 commit into
mainfrom
janmaarten-a11y-timeline-issues-data-attributes

Conversation

@janmaarten-a11y

Copy link
Copy Markdown
Contributor

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 each Timeline.Item in 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 issueAttrs helper calls toEventDataAttributes with scope: 'issue' (singular), and reads category and visibility from ISSUE_TAXONOMY so the values always come from the catalog rather than being hand-written per row. Each item passes its rendered actor login so data-actor-type resolves (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 to data-event-visibility='primary'.

Variants left untagged

Five story variants have no matching leaf in ISSUE_TAXONOMY, so they are intentionally left untagged (no data-event-* attributes) with an inline code comment explaining why:

  • Converted from draft (a draft-conversion verb the Issues catalog excludes)
  • Marked as canonical (only marked_as_duplicate exists)
  • Unmarked as duplicate (only marked_as_duplicate exists)
  • Unmarked as canonical (only marked_as_duplicate exists)
  • Labels added and removed (one row representing two events, labeled + unlabeled, which a single row cannot carry cleanly)

Changelog

New

  • data-event-scope, data-event-type, data-event-category, data-event-visibility, and data-actor-type attributes on the cataloged Issues Timeline event stories.

Changed

  • None (Storybook-only stories; no component or public API change).

Removed

  • None.

Rollout strategy

  • None; Storybook-only story metadata with no consumer-facing package change, so no changeset is needed.

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:

  • EventClosed item: data-event-scope='issue' data-event-type='closed' data-event-category='status' data-event-visibility='primary' data-actor-type='user'
  • EventLabels "Label added" item: data-event-type='labeled' data-event-category='metadata' data-event-visibility='auditOnly' data-actor-type='user'
  • EventReferences "Linked pull request" item: 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/Issues stories in Storybook and inspect the rendered Timeline.Item DOM nodes.

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
@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 24c1897

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@janmaarten-a11y janmaarten-a11y added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test component: Timeline labels Jul 22, 2026
@janmaarten-a11y

Copy link
Copy Markdown
Contributor Author

Closing: consolidating the four Timeline surface-tagging changes into one combined PR. The branch stays live for integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: Timeline integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant