introduce several fixes within the nodejs.dev (styles, links, caching, functionality)#2654
Conversation
|
Please find a preview at: https://staging.nodejs.dev/2654/ |
|
Please find a preview at: https://staging.nodejs.dev/2654/ |
Codecov Report
@@ Coverage Diff @@
## main #2654 +/- ##
==========================================
+ Coverage 83.46% 86.37% +2.90%
==========================================
Files 103 102 -1
Lines 1113 1064 -49
Branches 310 293 -17
==========================================
- Hits 929 919 -10
+ Misses 178 139 -39
Partials 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Please find a preview at: https://staging.nodejs.dev/2654/ |
|
Please find a preview at: https://staging.nodejs.dev/2654/ |
…s not needed anymore
d9ca829 to
b9fd65c
Compare
|
@benhalverson could I get a review here? This PR also fixes the failure on your PR (#2650) |
|
@nodejs/nodejs-dev could I pretty please get a review here? |
| } | ||
| }; | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
There's no need to scroll anymore as the Navigation items are togglable now, and this logic was not 100% functional and hacky.
|
|
||
| const [theme, toggleTheme] = useTheme(); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
This is used to make the scroll-bar colors match with the current applied theme
|
|
||
| &--selected { | ||
| background: var(--black9); | ||
| background: var(--black10); |
There was a problem hiding this comment.
This reverts the changes done on the Install Node.js demo on the Homepage to how it was supposed to be (Figmas).
| }; | ||
|
|
||
| const Blog = ({ data: { posts } }: Props): JSX.Element => ( | ||
| export const getNavigationData = ( |
There was a problem hiding this comment.
This transforms the blog categories into data that the SideNavBar Component can use. It could also reside in a different file, like utils but I have no strong opinions here.
|
|
||
| .article-reader { | ||
| padding: var(--space-24); | ||
| padding: var(--space-80) 0 0 var(--space-128); |
There was a problem hiding this comment.
This makes the paddings respect the Figma designs.
| } | ||
| } | ||
|
|
||
| @media (max-width: 800px) { |
There was a problem hiding this comment.
Moved all mobile styles to mobile.scss to ensure "uniformity"
| } | ||
|
|
||
| &--done::before { | ||
| content: url('data:image/svg+xml;utf8;base64,PD94bWwgdmVyc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find a preview at: https://staging.nodejs.dev/2654/ |
|
I like it. My only ask is you bring back the github icon in the top right corner with the link going back directly to this github repo. The one at the bottom goes to nodejs/node |
Gotcha, I removed it because the Figmas don't have it, and Material Icons also don't have any GitHub Icon, and I thought that (maybe it makes sense) to just use Material Icons. I would actually (honestly) expect for Node.js the GitHub link to go to either nodejs/node or just the nodejs org. WDYT? |
|
The design was never set in stone so we don't have to make it exactly like the figma. I thought the same when I first joined. 👍🏻 If I wanted to contribute to this site and it sent me to the nodejs.org repo I'd be confused about why the code and what I'm looking at don't match. |
The thing is that the nodejs website should be about node.js, no? Any of the actual document (docs, learn) pages have the "edit this page in github" whose would redirect you there.
True thing. Well, I'm okay with reading the GitHub icon, but that one was low-res. Gonna grab one from here |
Check List
npm run lint:js -- --fixand/ornpm run lint:md -- --fixfor my JavaScript and/or Markdown changes.npm run testto check if all tests are passing, and/ornpm run test -- -uto update snapshots if I created and/or updated React Components.npm run buildwork fine.Description
This PR updates several styles to match the Figmas, and fixes several design and functionality related bugs.
previousSlugandscrollToutilitycreateMarkdownPagesrelativePath utility usingendsWithinstead ofincludesScreenshots
Related Issues
Closes https://github.com/nodejs/nodejs.dev/issues/854
Relates to https://github.com/nodejs/nodejs.dev/issues/950
Closes https://github.com/nodejs/nodejs.dev/issues/2661