-
Notifications
You must be signed in to change notification settings - Fork 667
Timeline: add Issue event stories (Phase 2) #8070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
janmaarten-a11y
wants to merge
9
commits into
main
Choose a base branch
from
janmaarten-a11y-timeline-issues-event-closed-story
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,651
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6a7d609
Add Timeline Issues Features stories (Phase 2 Issues surface)
janmaarten-a11y b35c8a6
Timeline Issues stories: re-home captions and de-border secondary con…
janmaarten-a11y 0182d76
Timeline Issues stories: fix commit-message weight, retitle under Eve…
janmaarten-a11y 4050b75
docs(Timeline): note issue event stories are Storybook-only by design
janmaarten-a11y f3eda9e
fix(Timeline): commit-ref message muted + monospace to match live
janmaarten-a11y 3ca0a5d
feat(Timeline): add EventProject shared-event group (Issue version)
janmaarten-a11y 2dabb7f
fix(Timeline): default-color project icon in EventClosed 'closed via …
janmaarten-a11y e0034d7
Add shared badge-row timeline event stories (Issues surface)
janmaarten-a11y 9e28b4b
a11y: remove badge double-announce, fix inline-link underline + click…
janmaarten-a11y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
175 changes: 175 additions & 0 deletions
175
packages/react/src/Timeline/Timeline.issues.features.stories.module.css
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,175 @@ | ||
| .RealisticTimeline { | ||
| /* GitHub renders the timeline at most 1012px wide in product surfaces. */ | ||
| max-width: 1012px; | ||
| } | ||
|
|
||
| .LinkWithBoldStyle { | ||
| font-weight: var(--base-text-weight-semibold); | ||
| color: var(--fgColor-default); | ||
| margin-right: var(--base-size-4); | ||
| } | ||
|
|
||
| .LinkWithBoldStyle:hover { | ||
| color: var(--fgColor-accent); | ||
| } | ||
|
|
||
| .InlineAvatar { | ||
| vertical-align: middle; | ||
| margin-right: var(--base-size-4); | ||
| } | ||
|
|
||
| .Timestamp { | ||
| text-decoration: underline; | ||
| } | ||
|
|
||
| .CommitSha { | ||
| font-family: var(--fontStack-monospace); | ||
| font-size: var(--text-body-size-small); | ||
| font-weight: var(--base-text-weight-semibold); | ||
| color: var(--fgColor-default); | ||
| } | ||
|
|
||
| /* Story-only scaffolding: each variant is wrapped in its own <section> with a | ||
| small caption heading ABOVE the event, so the event row itself (badge + | ||
| inline avatar + body) renders exactly as it would in product — the caption | ||
| never sits inside Timeline.Body. Variants stay scannable like a Figma | ||
| component set. Not part of the faithful event. */ | ||
| .Variant { | ||
| margin-bottom: var(--base-size-24); | ||
| } | ||
|
|
||
| .VariantLabel { | ||
| margin: 0 0 var(--base-size-4); | ||
| font-size: var(--text-body-size-small); | ||
| font-weight: var(--base-text-weight-semibold); | ||
| color: var(--fgColor-muted); | ||
| text-transform: uppercase; | ||
| letter-spacing: 0.04em; | ||
| } | ||
|
|
||
| /* IssueLink-style inline reference: state octicon + bold title + muted number. */ | ||
| .IssueLink { | ||
| color: var(--fgColor-default); | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .IssueLink:hover { | ||
| color: var(--fgColor-accent); | ||
| text-decoration: underline; | ||
| } | ||
|
|
||
| .IssueLinkIcon { | ||
| color: var(--fgColor-done); | ||
| vertical-align: middle; | ||
| margin-right: var(--base-size-4); | ||
| } | ||
|
|
||
| .IssueLinkTitle { | ||
| font-weight: var(--base-text-weight-semibold); | ||
| } | ||
|
|
||
| .IssueLinkNumber { | ||
| color: var(--fgColor-muted); | ||
| } | ||
|
|
||
| /* Issue-version ProjectV2 reference (github-ui `ProjectV2.tsx` + `ClosedEvent.tsx`): | ||
| an inline default-colored TableIcon octicon followed by a default-color link | ||
| (`.ProjectRefLink`). The underline comes from the Link `inline` prop (always-on | ||
| underline, which also satisfies the high-contrast a11y rule). Mirrors live | ||
| `.projectLink`/`.stateReasonLink` (both `color: var(--fgColor-default)`). NOTE: | ||
| the PR (ERB) surface renders this differently — see the EventProject group. */ | ||
| .ProjectRefIcon { | ||
| vertical-align: middle; | ||
| margin-right: var(--base-size-4); | ||
| } | ||
|
|
||
| .ProjectRefLink { | ||
| color: var(--fgColor-default); | ||
| } | ||
|
|
||
| /* Open (green) state icon variant for IssueLink references that point at an | ||
| open issue/PR (e.g. the canonical issue in a "marked as duplicate of" row). */ | ||
| .IssueLinkIconOpen { | ||
| color: var(--fgColor-open); | ||
| vertical-align: middle; | ||
| margin-right: var(--base-size-4); | ||
| } | ||
|
|
||
| /* Inline pull-request state icon rendered in the body text (References group), | ||
| mirroring github-ui's `sourceIcon('PullRequest', ...)` open-state coloring. */ | ||
| .PrStateIcon { | ||
| color: var(--fgColor-open); | ||
| vertical-align: middle; | ||
| margin: 0 var(--base-size-4); | ||
| } | ||
|
|
||
| /* Open (green) badge icon, used when the badge icon itself is a PR state icon | ||
| (References "removed a link to a pull request" → `leadingIcon={PullStateIcon}`). */ | ||
| .BadgeIconOpen { | ||
| color: var(--fgColor-open); | ||
| } | ||
|
|
||
| /* Wrapper around a colored issue-type Token so it sits inline with the copy, | ||
| matching github-ui's `IssueTypeEvent.module.css` `issueTypeTokenWrapper`. */ | ||
| .TokenWrapper { | ||
| display: inline-flex; | ||
| vertical-align: middle; | ||
| margin: 0 var(--base-size-4); | ||
| } | ||
|
|
||
| /* Commit reference (github-ui's `ReferencedEventInner`): NOT a bordered card on | ||
| live GitHub — `.referencedCommitContainer` is a plain flex column (`gap: 2px`) | ||
| with the monospace message on the left and the SHA on the right. Mirror that: | ||
| no border, no card background, no row dividers. */ | ||
| .CommitRefBox { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--base-size-4); | ||
| margin-top: var(--base-size-8); | ||
| } | ||
|
|
||
| .CommitRefRow { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| gap: var(--base-size-8); | ||
| } | ||
|
|
||
| .CommitRefMessage { | ||
| font-family: var(--fontStack-monospace); | ||
| font-size: var(--text-body-size-small); | ||
| color: var(--fgColor-muted); | ||
| } | ||
|
|
||
| .CommitRefOid { | ||
| font-family: var(--fontStack-monospace); | ||
| font-size: var(--text-body-size-small); | ||
| color: var(--fgColor-muted); | ||
| } | ||
|
|
||
| /* Secondary reference list (github-ui Hierarchy/Dependency events render the | ||
| linked issues below the main copy). On live GitHub these are PLAIN, lightly | ||
| indented rows — state octicon + bold title + muted #number per line — with no | ||
| surrounding border, no card background, and no row dividers. Single vs | ||
| multiple differ only by item count + singular/plural leading copy. */ | ||
| .RefList { | ||
| margin-top: var(--base-size-8); | ||
| padding-left: var(--base-size-4); | ||
| list-style: none; | ||
| } | ||
|
|
||
| .RefListItem + .RefListItem { | ||
| margin-top: var(--base-size-4); | ||
| } | ||
|
|
||
| /* IssueField event: the field name reads as semibold inline text, the value as | ||
| an inline link (github-ui's `IssueFieldEvent` `issueFieldTokenWrapper`). */ | ||
| .FieldName { | ||
| font-weight: var(--base-text-weight-semibold); | ||
| color: var(--fgColor-default); | ||
| margin: 0 var(--base-size-4); | ||
| } | ||
|
|
||
| .FieldValue { | ||
| margin-left: var(--base-size-4); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not already a variant on the base link component?