Docs for how pages work #391
Labels
No Label
a11y
Backlog
Blocked
Bug
Content
Dependencies
Design
Feature Request
Good First Issue
In Progress
Performance
Priority - High
Priority - Low
Priority - Medium
Untriaged
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: www/www-new#391
Loading…
Reference in New Issue
No description provided.
Delete Branch "adi-initial-pages-docs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#128
CI doesn't need to run/pass for this to be merged. No code changes.
@ -0,0 +68,4 @@
}) as GetShapesConfig
```
Note that background shapes are not rendered into html files during build time because it is impossible to know the window dimensions. This means that you can safely use `window.innerWidth` and `window.innerHeight` as well use the width and height of the shapes container inside the `getShapesConfig` function to change the shapes based on size of the screen.
Sidenote: @a258wang do you remember why we almost never use the container's width and height in our codebase? Should this be removed?
I'm not 100% sure why we don't use the container's width/height in our codebase... do such calculations work if JS is disabled in the browser?
shapes are not loaded at all if JS is disabled
Oh I thought you were asking about why we don't use the container width/height in the other parts of the codebase... as for why the container width/height aren't used more in the shapes component, I'm not entirely sure, but I think they're used when they're needed.
@ -0,0 +9,4 @@
Most pages are wrapped with the [`DefaultLayout`](../components/DefaultLayout.tsx) component which limits the page width and adds the necessary margins and paddings. However, some pages need to override these default styles to accomodate for their specific design. For example:
- The [home page](../pages/index.tsx) is wider than all the other pages.
- The [about us](../pages/about/index.tsx) needs the entire screen width to properly render the bubbles.
Maybe include a link to the
Bubble
component, and/or provide a description of what the bubbles look like (ie. they are horizontal hot dog shaped highlights that surround some paragraphs of the text)? For someone who hasn't seen what the About Us page looks like, it might be unclear what the bubbles are.@ -0,0 +2,4 @@
All pages are a separate React component in our repository, under the [pages](../pages) folder. This is a [special directory](https://nextjs.org/docs/tag/v11.0.0/basic-features/pages) used by Next.js which maps a React component exported from this directory to a page on a url.
The React component exported by these files are wrapped by the [`App` component](../pages/_app.tsx). This lets us reuse code in between pages which makes it a good place to render the [navbar](../components/Navbar.tsx), [footer](../components/Footer.tsx), [background shapes](../components/ShapesBackground.tsx), and the general css layout of a page.
We could change:
component -> components (to prevent confusion in case people think it's one giant component)
css -> CSS (to be consistent with the entire readme)
Should we talk about when we used // eslint-disable-next-line @typescript-eslint/no-non-null-assertion in the dynamic pages or is that too minor?
While more details about
Title
component probably deserve its own docs page, should we at least mention it inpages.md
since every page needs a (custom) Title?Overall, it was very comprehensive and intuitive. LGTM!
LGTM (with Jared/Amy's changes made)!
4fcf90a8ad
to9d33a5b834
No need to pass CI for this, merging.