Skip to content

Commit 335ed57

Browse files
authored
Merge branch 'main' into rc-ghes-3.10
2 parents 324fc56 + 8b42c42 commit 335ed57

63 files changed

Lines changed: 1997 additions & 888 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ updates:
77
day: tuesday
88
open-pull-requests-limit: 20 # default is 5
99
ignore:
10+
# Because this is so dependent on the remote server we use
1011
- dependency-name: '@elastic/elasticsearch'
12+
# Because whatever we have needs to match what @primer/react also uses
13+
- dependency-name: 'styled-components'
1114
- dependency-name: '*'
1215
update-types:
1316
['version-update:semver-patch', 'version-update:semver-minor']

components/DefaultLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const DefaultLayout = (props: Props) => {
113113
</a>
114114
<Header />
115115
<div className="d-lg-flex">
116-
<SidebarNav />
116+
{isHomepageVersion ? null : <SidebarNav />}
117117
{/* Need to set an explicit height for sticky elements since we also
118118
set overflow to auto */}
119119
<div className="flex-column flex-1 min-width-0">

components/article/ArticleInlineLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const ArticleInlineLayout = ({
2626
return (
2727
<Box className={cx(styles.containerBox, className)}>
2828
{breadcrumbs && (
29-
<Box gridArea="breadcrumbs" className={cx('d-none d-xl-block mt-3 mr-auto width-full')}>
29+
<Box gridArea="breadcrumbs" className={cx('d-none d-xxl-block mt-3 mr-auto width-full')}>
3030
{breadcrumbs}
3131
</Box>
3232
)}

components/article/ArticlePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const ArticlePage = () => {
116116
</ArticleInlineLayout>
117117
) : (
118118
<div className="container-xl px-3 px-md-6 my-4">
119-
<div className={cx('d-none d-xl-block mt-3 mr-auto width-full')}>
119+
<div className={cx('d-none d-xxl-block mt-3 mr-auto width-full')}>
120120
<Breadcrumbs />
121121
</div>
122122

components/context/MainContext.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ export type ProductT = {
1212
versions?: Array<string>
1313
}
1414

15-
type SimpleProductT = {
16-
href: string
17-
name: string
18-
external: boolean
19-
}
20-
2115
type VersionItem = {
2216
// free-pro-team@latest, enterprise-cloud@latest, enterprise-server@3.3 ...
2317
version: string
@@ -69,7 +63,6 @@ export type MainContextT = {
6963
maptopic?: BreadcrumbT
7064
article?: BreadcrumbT
7165
}
72-
homepageLinks: Array<SimpleProductT>
7366
communityRedirect: {
7467
name: string
7568
href: string
@@ -135,7 +128,6 @@ export const getMainContext = async (req: any, res: any): Promise<MainContextT>
135128

136129
return {
137130
breadcrumbs: req.context.breadcrumbs || {},
138-
homepageLinks: req.context.homepageLinks || null,
139131
communityRedirect: req.context.page?.communityRedirect || {},
140132
currentProduct: req.context.productMap[req.context.currentProduct] || null,
141133
currentLayoutName: req.context.currentLayoutName,

components/page-header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const Header = () => {
315315
</div>
316316
</div>
317317
{!isHomepageVersion && !isSearchResultsPage && (
318-
<div className="d-flex flex-items-center d-xl-none mt-2">
318+
<div className="d-flex flex-items-center d-xxl-none mt-2">
319319
<div className={cx(styles.sidebarOverlayCloseButtonContainer, 'mr-2')}>
320320
<IconButton
321321
data-testid="sidebar-hamburger"

components/release-notes/GHAEReleaseNotePatch.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
import { useRef } from 'react'
22
import dayjs from 'dayjs'
3-
import cx from 'classnames'
43

54
import { useTranslation } from 'components/hooks/useTranslation'
65
import { PatchNotes } from './PatchNotes'
76
import { CurrentVersion, ReleaseNotePatch } from './types'
87

9-
import styles from './PatchNotes.module.scss'
10-
118
type Props = { patch: ReleaseNotePatch; currentVersion: CurrentVersion }
129
export function GHAEReleaseNotePatch({ patch, currentVersion }: Props) {
1310
const { t } = useTranslation('release_notes')
1411
const containerRef = useRef<HTMLDivElement>(null)
1512
const bannerText = t('banner_text')
1613

1714
return (
18-
<div ref={containerRef} className={cx(styles.sectionHeading, 'mb-10 pb-6')} id={patch.release}>
15+
<div ref={containerRef} className="mb-10 pb-6" id={patch.release}>
1916
<header
2017
style={{ zIndex: 1, marginTop: -1 }}
2118
className="container-xl border-top border-bottom px-3 pt-4 pb-2"

components/release-notes/GHESReleaseNotePatch.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import { useRef } from 'react'
22
import dayjs from 'dayjs'
3-
import cx from 'classnames'
43

54
import { useTranslation } from 'components/hooks/useTranslation'
65
import { PatchNotes } from './PatchNotes'
76
import { Link } from 'components/Link'
87
import { CurrentVersion, ReleaseNotePatch, GHESMessage } from './types'
98

10-
import styles from './PatchNotes.module.scss'
11-
129
type Props = {
1310
patch: ReleaseNotePatch
1411
currentVersion: CurrentVersion
@@ -27,7 +24,7 @@ export function GHESReleaseNotePatch({
2724
const containerRef = useRef<HTMLDivElement>(null)
2825

2926
return (
30-
<div ref={containerRef} className={cx(styles.sectionHeading, 'mb-10 pb-6')} id={patch.version}>
27+
<div ref={containerRef} className="mb-10 pb-6" id={patch.version}>
3128
<header
3229
style={{ zIndex: 1, marginTop: -1 }}
3330
className="container-xl border-top border-bottom px-3 pt-4 pb-2"

components/release-notes/PatchNotes.module.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
@import "@primer/css/support/index.scss";
22

3-
.sectionHeading {
4-
scroll-margin-top: 105px !important; // 88 + 8 + 8 + 1
5-
6-
@include breakpoint(xl) {
7-
scroll-margin-top: 65px !important; // 48 + 8 + 8 + 1
8-
}
9-
}
10-
113
.aside {
124
@include breakpoint(md) {
135
width: 8rem;

components/release-notes/PatchNotes.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { slug } from 'github-slugger'
33
import { ReleaseNotePatch } from './types'
44
import { HeadingLink } from 'components/article/HeadingLink'
55

6-
import styles from './PatchNotes.module.scss'
7-
86
const SectionToLabelMap: Record<string, string> = {
97
features: 'Features',
108
bugs: 'Bug fixes',
@@ -40,7 +38,7 @@ export function PatchNotes({ patch }: Props) {
4038
const headingSlug = item.heading ? slug(item.heading) : `heading${i}`
4139
return (
4240
<li key={headingSlug}>
43-
<h4 id={headingSlug} className={cx(styles.sectionHeading)}>
41+
<h4 id={headingSlug}>
4442
<a href={`#${headingSlug}`}>{item.heading}</a>
4543
</h4>
4644
<ul>

0 commit comments

Comments
 (0)