Skip to content

Fixes wrong breadcrumb for 404 page #4074

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

Merged
merged 3 commits into from
Nov 10, 2021

Conversation

harish-sethuraman
Copy link
Collaborator

@harish-sethuraman harish-sethuraman commented Nov 7, 2021

For 404 route we are showing wrong bread crumb (learn react) and showed home as active but showed options of learn. So removed breadcrumb for 404 route.

It seems like the when the layout was not specified we were taking Learn as the default subtree
https://github.com/reactjs/reactjs.org/blob/7f995398f4cfffe9132341d4380b716d65d3a214/beta/plugins/md-layout-loader.js#L18
So changed the default sub tree to Home and then had to add layout to all the pages inside the learn directory.

Verified changes with both sidenav and mobile nav for both 404 page and valid page.

Before:
Screenshot 2021-11-07 at 3 46 41 PM
After:
Screenshot 2021-11-07 at 3 47 42 PM

Also the navigation highlights Home but shows options of learn.
Screenshot 2021-11-07 at 6 31 30 PM

@github-actions
Copy link

github-actions bot commented Nov 7, 2021

Size Changes

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 91.19 KB (🟡 +16 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Hundred Eighty-five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 203.17 KB (🟡 +16 B) 294.35 KB
/404 202.27 KB (🟡 +19 B) 293.45 KB
/blog 37.92 KB (🟡 +16 B) 129.11 KB
/blog/2013/06/02/jsfiddle-integration 213.86 KB (🟡 +16 B) 305.04 KB
/blog/2013/06/05/why-react 215.59 KB (🟡 +16 B) 306.78 KB
/blog/2013/06/12/community-roundup 215.29 KB (🟡 +16 B) 306.48 KB
/blog/2013/06/19/community-roundup-2 215.96 KB (🟡 +16 B) 307.15 KB
/blog/2013/06/21/react-v0-3-3 214.01 KB (🟡 +16 B) 305.19 KB
/blog/2013/06/27/community-roundup-3 216.32 KB (🟡 +16 B) 307.51 KB
/blog/2013/07/02/react-v0-4-autobind-by-default 214.62 KB (🟡 +16 B) 305.81 KB
/blog/2013/07/03/community-roundup-4 215.69 KB (🟡 +16 B) 306.88 KB
/blog/2013/07/11/react-v0-4-prop-validation-and-default-values 214.49 KB (🟡 +16 B) 305.68 KB
/blog/2013/07/17/react-v0-4-0 215.2 KB (🟡 +16 B) 306.39 KB
/blog/2013/07/23/community-roundup-5 216.09 KB (🟡 +16 B) 307.27 KB
/blog/2013/07/26/react-v0-4-1 213.97 KB (🟡 +16 B) 305.16 KB
/blog/2013/07/30/use-react-and-jsx-in-ruby-on-rails 214.57 KB (🟡 +16 B) 305.76 KB
/blog/2013/08/05/community-roundup-6 215.38 KB (🟡 +16 B) 306.57 KB
/blog/2013/08/19/use-react-and-jsx-in-python-applications 214.58 KB (🟡 +16 B) 305.77 KB
/blog/2013/08/26/community-roundup-7 215.55 KB (🟡 +16 B) 306.74 KB
/blog/2013/09/24/community-roundup-8 216.98 KB (🟡 +16 B) 308.17 KB
/blog/2013/10/03/community-roundup-9 215.92 KB (🟡 +16 B) 307.11 KB
/blog/2013/10/16/react-v0.5.0 215.6 KB (🟡 +16 B) 306.79 KB
/blog/2013/10/29/react-v0-5-1 213.96 KB (🟡 +16 B) 305.15 KB
/blog/2013/11/06/community-roundup-10 217.58 KB (🟡 +16 B) 308.77 KB
/blog/2013/11/18/community-roundup-11 216.66 KB (🟡 +16 B) 307.84 KB
/blog/2013/12/18/react-v0.5.2-v0.4.2 214.43 KB (🟡 +16 B) 305.62 KB
/blog/2013/12/19/react-v0.8.0 214.85 KB (🟡 +16 B) 306.04 KB
/blog/2013/12/23/community-roundup-12 216.31 KB (🟡 +16 B) 307.5 KB
/blog/2013/12/30/community-roundup-13 216.1 KB (🟡 +16 B) 307.28 KB
/blog/2014/01/02/react-chrome-developer-tools 214.35 KB (🟡 +16 B) 305.54 KB
/blog/2014/01/06/community-roundup-14 215.69 KB (🟡 +16 B) 306.88 KB
/blog/2014/02/05/community-roundup-15 216.9 KB (🟡 +16 B) 308.09 KB
/blog/2014/02/15/community-roundup-16 216.62 KB (🟡 +16 B) 307.81 KB
/blog/2014/02/16/react-v0.9-rc1 217.02 KB (🟡 +16 B) 308.21 KB
/blog/2014/02/20/react-v0.9 217.47 KB (🟡 +16 B) 308.66 KB
/blog/2014/02/24/community-roundup-17 216.33 KB (🟡 +16 B) 307.52 KB
/blog/2014/03/14/community-roundup-18 217.29 KB (🟡 +16 B) 308.48 KB
/blog/2014/03/19/react-v0.10-rc1 215.61 KB (🟡 +16 B) 306.79 KB
/blog/2014/03/21/react-v0.10 215.63 KB (🟡 +16 B) 306.82 KB
/blog/2014/03/28/the-road-to-1.0 215.74 KB (🟡 +16 B) 306.93 KB
/blog/2014/04/04/reactnet 214.38 KB (🟡 +16 B) 305.57 KB
/blog/2014/05/06/flux 214.5 KB (🟡 +16 B) 305.69 KB
/blog/2014/05/29/one-year-of-open-source-react 214.73 KB (🟡 +16 B) 305.92 KB
/blog/2014/06/27/community-roundup-19 216.28 KB (🟡 +16 B) 307.47 KB
/blog/2014/07/13/react-v0.11-rc1 216.66 KB (🟡 +16 B) 307.85 KB
/blog/2014/07/17/react-v0.11 217.92 KB (🟡 +16 B) 309.11 KB
/blog/2014/07/25/react-v0.11.1 214.87 KB (🟡 +16 B) 306.06 KB
/blog/2014/07/28/community-roundup-20 216.42 KB (🟡 +16 B) 307.61 KB
/blog/2014/07/30/flux-actions-and-the-dispatcher 216.05 KB (🟡 +16 B) 307.24 KB
/blog/2014/08/03/community-roundup-21 216.09 KB (🟡 +16 B) 307.28 KB
/blog/2014/09/03/introducing-the-jsx-specification 214.09 KB (🟡 +16 B) 305.28 KB
/blog/2014/09/12/community-round-up-22 216.57 KB (🟡 +16 B) 307.75 KB
/blog/2014/09/16/react-v0.11.2 214.86 KB (🟡 +16 B) 306.05 KB
/blog/2014/09/24/testing-flux-applications 218.04 KB (🟡 +16 B) 309.23 KB
/blog/2014/10/14/introducing-react-elements 217 KB (🟡 +16 B) 308.19 KB
/blog/2014/10/16/react-v0.12-rc1 216.96 KB (🟡 +16 B) 308.15 KB
/blog/2014/10/17/community-roundup-23 217.54 KB (🟡 +16 B) 308.72 KB
/blog/2014/10/27/react-js-conf 214.14 KB (🟡 +16 B) 305.32 KB
/blog/2014/10/28/react-v0.12 216.9 KB (🟡 +16 B) 308.09 KB
/blog/2014/11/24/react-js-conf-updates 214.52 KB (🟡 +16 B) 305.71 KB
/blog/2014/11/25/community-roundup-24 217.77 KB (🟡 +16 B) 308.95 KB
/blog/2014/12/18/react-v0.12.2 214.55 KB (🟡 +16 B) 305.74 KB
/blog/2014/12/19/react-js-conf-diversity-scholarship 214.94 KB (🟡 +16 B) 306.13 KB
/blog/2015/01/27/react-v0.13.0-beta-1 215.92 KB (🟡 +16 B) 307.1 KB
/blog/2015/02/18/react-conf-roundup-2015 217.9 KB (🟡 +16 B) 309.09 KB
/blog/2015/02/20/introducing-relay-and-graphql 217.05 KB (🟡 +16 B) 308.24 KB
/blog/2015/02/24/react-v0.13-rc1 215.96 KB (🟡 +16 B) 307.14 KB
/blog/2015/02/24/streamlining-react-elements 218.51 KB (🟡 +16 B) 309.7 KB
/blog/2015/03/03/react-v0.13-rc2 215.29 KB (🟡 +16 B) 306.48 KB
/blog/2015/03/04/community-roundup-25 216.25 KB (🟡 +16 B) 307.44 KB
/blog/2015/03/10/react-v0.13 216.57 KB (🟡 +16 B) 307.76 KB
/blog/2015/03/16/react-v0.13.1 214.38 KB (🟡 +16 B) 305.57 KB
/blog/2015/03/19/building-the-facebook-news-feed-with-relay 217.14 KB (🟡 +16 B) 308.33 KB
/blog/2015/03/26/introducing-react-native 214.28 KB (🟡 +16 B) 305.47 KB
/blog/2015/03/30/community-roundup-26 216.22 KB (🟡 +16 B) 307.41 KB
/blog/2015/04/17/react-native-v0.4 215.13 KB (🟡 +16 B) 306.32 KB
/blog/2015/04/18/react-v0.13.2 214.46 KB (🟡 +16 B) 305.65 KB
/blog/2015/05/01/graphql-introduction 218.95 KB (🟡 +16 B) 310.14 KB
/blog/2015/05/08/react-v0.13.3 214.35 KB (🟡 +16 B) 305.54 KB
/blog/2015/05/22/react-native-release-process 214.5 KB (🟡 +16 B) 305.69 KB
/blog/2015/06/12/deprecating-jstransform-and-react-tools 214.96 KB (🟡 +16 B) 306.15 KB
/blog/2015/07/03/react-v0.14-beta-1 216.47 KB (🟡 +16 B) 307.66 KB
/blog/2015/08/03/new-react-devtools-beta 215.07 KB (🟡 +16 B) 306.26 KB
/blog/2015/08/11/relay-technical-preview 215.13 KB (🟡 +16 B) 306.32 KB
/blog/2015/08/13/reacteurope-roundup 216.72 KB (🟡 +16 B) 307.91 KB
/blog/2015/09/02/new-react-developer-tools 214.49 KB (🟡 +16 B) 305.67 KB
/blog/2015/09/10/react-v0.14-rc1 220.17 KB (🟡 +16 B) 311.36 KB
/blog/2015/09/14/community-roundup-27 216.65 KB (🟡 +16 B) 307.83 KB
/blog/2015/10/01/react-render-and-top-level-api 215.62 KB (🟡 +16 B) 306.8 KB
/blog/2015/10/07/react-v0.14 220.66 KB (🟡 +16 B) 311.85 KB
/blog/2015/10/19/reactiflux-is-moving-to-discord 216.36 KB (🟡 +16 B) 307.55 KB
/blog/2015/10/28/react-v0.14.1 214.38 KB (🟡 +16 B) 305.56 KB
/blog/2015/11/02/react-v0.14.2 214.41 KB (🟡 +16 B) 305.59 KB
/blog/2015/11/18/react-v0.14.3 214.53 KB (🟡 +16 B) 305.72 KB
/blog/2015/12/04/react-js-conf-2016-diversity-scholarship 215.4 KB (🟡 +16 B) 306.59 KB
/blog/2015/12/16/ismounted-antipattern 215 KB (🟡 +16 B) 306.19 KB
/blog/2015/12/18/react-components-elements-and-instances 218.93 KB (🟡 +16 B) 310.11 KB
/blog/2015/12/29/react-v0.14.4 214.2 KB (🟡 +16 B) 305.39 KB
/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A 215.22 KB (🟡 +16 B) 306.4 KB
/blog/2016/01/12/discontinuing-ie8-support 214.02 KB (🟡 +16 B) 305.21 KB
/blog/2016/02/19/new-versioning-scheme 215.4 KB (🟡 +16 B) 306.59 KB
/blog/2016/03/07/react-v15-rc1 218.16 KB (🟡 +16 B) 309.35 KB
/blog/2016/03/16/react-v15-rc2 215.02 KB (🟡 +16 B) 306.21 KB
/blog/2016/03/29/react-v0.14.8 214.15 KB (🟡 +16 B) 305.34 KB
/blog/2016/04/07/react-v15 222.36 KB (🟡 +16 B) 313.54 KB
/blog/2016/04/08/react-v15.0.1 214.91 KB (🟡 +16 B) 306.09 KB
/blog/2016/07/11/introducing-reacts-error-code-system 214.62 KB (🟡 +16 B) 305.81 KB
/blog/2016/07/13/mixins-considered-harmful 222.78 KB (🟡 +16 B) 313.97 KB
/blog/2016/07/22/create-apps-with-no-configuration 218.11 KB (🟡 +16 B) 309.3 KB
/blog/2016/08/05/relay-state-of-the-state 218.15 KB (🟡 +16 B) 309.33 KB
/blog/2016/09/28/our-first-50000-stars 219.59 KB (🟡 +16 B) 310.78 KB
/blog/2016/11/16/react-v15.4.0 217.55 KB (🟡 +16 B) 308.73 KB
/blog/2017/04/07/react-v15.5.0 218.11 KB (🟡 +16 B) 309.3 KB
/blog/2017/05/18/whats-new-in-create-react-app 217.52 KB (🟡 +16 B) 308.7 KB
/blog/2017/06/13/react-v15.6.0 216.13 KB (🟡 +16 B) 307.31 KB
/blog/2017/07/26/error-handling-in-react-16 216.47 KB (🟡 +16 B) 307.66 KB
/blog/2017/09/08/dom-attributes-in-react-16 216.91 KB (🟡 +16 B) 308.1 KB
/blog/2017/09/25/react-v15.6.2 215.24 KB (🟡 +16 B) 306.43 KB
/blog/2017/09/26/react-v16.0 220.37 KB (🟡 +16 B) 311.56 KB
/blog/2017/11/28/react-v16.2.0-fragment-support 218.29 KB (🟡 +16 B) 309.48 KB
/blog/2017/12/07/introducing-the-react-rfc-process 214.82 KB (🟡 +16 B) 306.01 KB
/blog/2017/12/15/improving-the-repository-infrastructure 230.62 KB (🟡 +16 B) 321.81 KB
/blog/2018/03/01/sneak-peek-beyond-react-16 214.78 KB (🟡 +16 B) 305.97 KB
/blog/2018/03/27/update-on-async-rendering 220.02 KB (🟡 +16 B) 311.21 KB
/blog/2018/03/29/react-v-16-3 216.84 KB (🟡 +16 B) 308.03 KB
/blog/2018/05/23/react-v-16-4 216.98 KB (🟡 +16 B) 308.17 KB
/blog/2018/06/07/you-probably-dont-need-derived-state 220.64 KB (🟡 +16 B) 311.83 KB
/blog/2018/08/01/react-v-16-4-2 215.63 KB (🟡 +16 B) 306.82 KB
/blog/2018/09/10/introducing-the-react-profiler 217.25 KB (🟡 +16 B) 308.44 KB
/blog/2018/10/01/create-react-app-v2 217.72 KB (🟡 +16 B) 308.9 KB
/blog/2018/10/23/react-v-16-6 216.92 KB (🟡 +16 B) 308.1 KB
/blog/2018/11/13/react-conf-recap 214.63 KB (🟡 +16 B) 305.82 KB
/blog/2018/11/27/react-16-roadmap 220.83 KB (🟡 +16 B) 312.02 KB
/blog/2018/12/19/react-v-16-7 215.75 KB (🟡 +16 B) 306.94 KB
/blog/2019/02/06/react-v16.8.0 218.02 KB (🟡 +16 B) 309.21 KB
/blog/2019/02/23/is-react-translated-yet 217.59 KB (🟡 +16 B) 308.78 KB
/blog/2019/08/08/react-v16.9.0 220.52 KB (🟡 +16 B) 311.71 KB
/blog/2019/08/15/new-react-devtools 215.12 KB (🟡 +16 B) 306.31 KB
/blog/2019/10/22/react-release-channels 216.93 KB (🟡 +16 B) 308.12 KB
/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense 221.63 KB (🟡 +16 B) 312.82 KB
/blog/2020/02/26/react-v16.13.0 217.87 KB (🟡 +16 B) 309.05 KB
/blog/2020/08/10/react-v17-rc 224.15 KB (🟡 +16 B) 315.33 KB
/blog/all 54.03 KB (🟡 +16 B) 145.22 KB
/community 202.86 KB (🟡 +16 B) 294.04 KB
/community/acknowledgements 204.05 KB (🟡 +16 B) 295.24 KB
/community/meet-the-team 204.57 KB (🟡 +16 B) 295.76 KB
/learn 211.56 KB (🟡 +23 B) 302.75 KB
/learn/add-react-to-a-website 207.69 KB (🟡 +25 B) 298.88 KB
/learn/adding-interactivity 209.48 KB (🟡 +22 B) 300.67 KB
/learn/choosing-the-state-structure 215.23 KB (🟡 +23 B) 306.42 KB
/learn/conditional-rendering 207.46 KB (🟡 +22 B) 298.64 KB
/learn/describing-the-ui 206.67 KB (🟡 +23 B) 297.86 KB
/learn/editor-setup 203.95 KB (🟡 +25 B) 295.14 KB
/learn/escape-hatches 202.19 KB (🟡 +25 B) 293.38 KB
/learn/extracting-state-logic-into-a-reducer 212.83 KB (🟡 +22 B) 304.01 KB
/learn/importing-and-exporting-components 205.86 KB (🟡 +21 B) 297.04 KB
/learn/installation 203.5 KB (🟡 +20 B) 294.69 KB
/learn/javascript-in-jsx-with-curly-braces 205.93 KB (🟡 +22 B) 297.12 KB
/learn/keeping-components-pure 210.07 KB (🟡 +23 B) 301.26 KB
/learn/managing-state 208.78 KB (🟡 +23 B) 299.97 KB
/learn/manipulating-the-dom-with-refs 210.7 KB (🟡 +22 B) 301.89 KB
/learn/passing-data-deeply-with-context 210.21 KB (🟡 +21 B) 301.4 KB
/learn/passing-props-to-a-component 209.64 KB (🟡 +23 B) 300.82 KB
/learn/preserving-and-resetting-state 212.45 KB (🟡 +22 B) 303.64 KB
/learn/queueing-a-series-of-state-updates 207.43 KB (🟡 +22 B) 298.62 KB
/learn/react-developer-tools 203.39 KB (🟡 +25 B) 294.58 KB
/learn/reacting-to-input-with-state 211.9 KB (🟡 +27 B) 303.09 KB
/learn/referencing-values-with-refs 208.95 KB (🟡 +22 B) 300.14 KB
/learn/render-and-commit 205.92 KB (🟡 +22 B) 297.11 KB
/learn/rendering-lists 209.99 KB (🟡 +22 B) 301.17 KB
/learn/responding-to-events 208.98 KB (🟡 +23 B) 300.17 KB
/learn/scaling-up-with-reducer-and-context 207.01 KB (🟡 +22 B) 298.19 KB
/learn/sharing-state-between-components 207.71 KB (🟡 +21 B) 298.9 KB
/learn/start-a-new-react-project 204.36 KB (🟡 +27 B) 295.55 KB
/learn/state-a-components-memory 213.16 KB (🟡 +23 B) 304.34 KB
/learn/state-as-a-snapshot 206.98 KB (🟡 +23 B) 298.16 KB
/learn/thinking-in-react 208.87 KB (🟡 +24 B) 300.05 KB
/learn/updating-arrays-in-state 211.05 KB (🟡 +22 B) 302.24 KB
/learn/updating-objects-in-state 210.76 KB (🟡 +20 B) 301.95 KB
/learn/writing-markup-with-jsx 205.86 KB (🟡 +23 B) 297.05 KB
/learn/your-first-component 206.76 KB (🟡 +23 B) 297.95 KB
/reference 202.82 KB (🟡 +16 B) 294.01 KB
/reference/reactdom 202.96 KB (🟡 +16 B) 294.15 KB
/reference/render 204.3 KB (🟡 +16 B) 295.49 KB
/reference/usestate 210.78 KB (🟡 +16 B) 301.97 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@lex111
Copy link
Member

lex111 commented Nov 10, 2021

@gaearon what if we automatically set a layout based on a content file path? Then we don't have to manually specify layout field in frontmatter of MD file.

@gaearon
Copy link
Member

gaearon commented Nov 10, 2021

Oh yeah that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants