({ context }: GitHubAEProps)
| 11 | context: GHAEReleaseNotesContextT |
| 12 | } |
| 13 | export function GHAEReleaseNotes({ context }: GitHubAEProps) { |
| 14 | const { releaseNotes, releases, currentVersion } = context |
| 15 | const [focusedPatch, setFocusedPatch] = useState('') |
| 16 | |
| 17 | return ( |
| 18 | <div className="d-flex"> |
| 19 | <article className="min-width-0 flex-1"> |
| 20 | <div className="d-flex flex-items-center flex-justify-between color-bg-default px-5 py-2"> |
| 21 | <h1 className="f4 py-3 m-0">{currentVersion.planTitle} release notes</h1> |
| 22 | </div> |
| 23 | |
| 24 | <MarkdownContent data-search="article-body"> |
| 25 | {releaseNotes.map((patch) => { |
| 26 | return ( |
| 27 | <GHAEReleaseNotePatch |
| 28 | key={patch.version} |
| 29 | patch={patch} |
| 30 | currentVersion={currentVersion} |
| 31 | didEnterView={() => setFocusedPatch(patch.version)} |
| 32 | /> |
| 33 | ) |
| 34 | })} |
| 35 | </MarkdownContent> |
| 36 | </article> |
| 37 | |
| 38 | <aside |
| 39 | className={cx( |
| 40 | 'position-sticky d-none d-md-block border-left no-print color-bg-default flex-shrink-0', |
| 41 | styles.aside |
| 42 | )} |
| 43 | > |
| 44 | <nav className="height-full overflow-auto"> |
| 45 | <MarkdownContent> |
| 46 | <ul className="list-style-none pl-0 text-bold"> |
| 47 | {releases.map((release) => { |
| 48 | return ( |
| 49 | <CollapsibleReleaseSection |
| 50 | key={release.version} |
| 51 | release={release} |
| 52 | focusedPatch={focusedPatch} |
| 53 | /> |
| 54 | ) |
| 55 | })} |
| 56 | </ul> |
| 57 | </MarkdownContent> |
| 58 | </nav> |
| 59 | </aside> |
| 60 | </div> |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | const CollapsibleReleaseSection = ({ |
| 65 | release, |
nothing calls this directly
no outgoing calls
no test coverage detected