Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/AboutPageSideNavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../styles/about.scss';

// eslint-disable-next-line no-shadow
export enum AboutPageKeys {
about = '',
about = 'about',
governance = 'governance',
community = 'community',
workingGroups = 'working-groups',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function AboutPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.about} />
<Article
title={title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/governance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function GovernancePage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.governance} />
<Article
title={title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function PrivacyPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.privacy} />
<Article
title={title}
Expand Down
6 changes: 5 additions & 1 deletion src/pages/releases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import Footer from '../components/Footer';
import '../styles/article-reader.scss';
import DownloadTable from '../components/DownloadReleases/DownloadTable';
import { useReleaseData } from '../hooks/useReleaseHistory';
import AboutPageSideNavBar, {
AboutPageKeys,
} from '../components/AboutPageSideNavBar';

export default function ReleasesPage({ data }: Page): JSX.Element {
const { title, description } = data.page.frontmatter;
Expand All @@ -17,7 +20,8 @@ export default function ReleasesPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="centered-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.releases} />
<Article
title={title}
html={html}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function ResourcesPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.resources} />
<Article
title={title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function SecurityPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.security} />
<Article
title={title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/trademark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function TrademarkPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.trademark} />
<Article
title={title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/working-groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function WorkingGroupsPage({ data }: Page): JSX.Element {
return (
<>
<Layout title={title} description={description} showFooter={false}>
<main className="streched-container">
<main className="grid-container">
<AboutPageSideNavBar pageKey={AboutPageKeys.workingGroups} />
<Article
title={title}
Expand Down
3 changes: 1 addition & 2 deletions src/styles/learn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* Needed since overflow: none will disable position: sticky on children */
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
background-color: var(--color-fill-side-nav);
height: calc(100vh - var(--nav-height));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are seemingly breaking the /learn page on mobile (https://staging.nodejs.dev/1447/learn)

image

Can you keep the styling changes limited to about.scss only

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1448 is taking care of the style issues

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cross button is not visible in the deployed version (https://nodejs.dev/learn), which restricts the user from closing the sidenav in mobile view.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1448 handled that as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the pending thing, is you need to revert these lines to their original state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted back the above-mentioned changes and changes for extender class as both of these are being handled in #1448

overflow: auto;
overflow-x: hidden;
padding: 0 var(--space-20);
Expand Down Expand Up @@ -181,7 +180,7 @@
overflow: visible;
overflow-y: scroll;
position: fixed;
top: var(--nav-height);
top: calc(var(--nav-height) * 2);
Comment thread
manishprivet marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this now 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, removing it.

}

> :last-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ exports[`AboutPageSideNavBar renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down Expand Up @@ -98,8 +98,8 @@ exports[`AboutPageSideNavBar should about Releases page exist and contain a href
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/about.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`About page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`About page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community side-nav__item-community--active"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/governance.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`Governance Page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`Governance Page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/privacy.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`Privacy Page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`Privacy Page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
79 changes: 78 additions & 1 deletion test/pages/__snapshots__/releases.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,85 @@ exports[`Releases page renders correctly 1`] = `
</div>
</nav>
<main
class="centered-container"
class="grid-container"
>
<nav
class="side-nav-about"
>
<button
class="side-nav__open"
type="button"
>
Menu
</button>
<ul
class="community-nav__list"
>
<a
class="t-body2 side-nav__item-community"
href="/about"
id="link-about"
>
About
</a>
<a
class="t-body2 side-nav__item-community"
href="/governance"
id="link-governance"
>
Project Governance
</a>
<a
class="t-body2 side-nav__item-community"
href="/community"
id="link-community"
>
Community
</a>
<a
class="t-body2 side-nav__item-community"
href="/working-groups"
id="link-working-groups"
>
Working Groups
</a>
<a
class="t-body2 side-nav__item-community side-nav__item-community--active"
href="/releases"
id="link-releases"
>
Releases
</a>
<a
class="t-body2 side-nav__item-community"
href="/resources"
id="link-resources"
>
Resources
</a>
<a
class="t-body2 side-nav__item-community"
href="/trademark"
id="link-trademark"
>
Trademark Policy
</a>
<a
class="t-body2 side-nav__item-community"
href="/privacy"
id="link-privacy"
>
Privacy Policy
</a>
<a
class="t-body2 side-nav__item-community"
href="/security"
id="link-security"
>
Security Reporting
</a>
</ul>
</nav>
<article
class="article-reader"
>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/resources.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`About page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`About page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/security.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`Security page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`Security page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/trademark.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`Trademark page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`Trademark page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down
6 changes: 3 additions & 3 deletions test/pages/__snapshots__/working-groups.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`Working Groups page renders correctly 1`] = `
</div>
</nav>
<main
class="streched-container"
class="grid-container"
>
<nav
class="side-nav-about"
Expand All @@ -158,8 +158,8 @@ exports[`Working Groups page renders correctly 1`] = `
>
<a
class="t-body2 side-nav__item-community"
href="/"
id="link-"
href="/about"
id="link-about"
>
About
</a>
Expand Down