Skip to content
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

[Doc] add static route tutorial #2249

Merged
merged 10 commits into from
Mar 17, 2020

Conversation

jcalcaben
Copy link
Contributor

Description

Revise and publish a tutorial for adding a new static route based on the intial content contributed by @rossmc

Related Issue

Closes PWA-301

Acceptance

Any developer

Verification Stakeholders

Any develop

Specification

Verification Steps

  1. Navigate to the pwa-docs directory
  2. Run linter on new topic: npm run lint src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
  3. Verify no linting errors
  4. Start HTML preview server: npm run develop
  5. Verify no build failures
  6. Navigate to the Tutorials section
  7. Verify entry for adding static route tutorial appears on left nav
  8. Click on that link and verify it loads the correct page

Screenshots / Screen Captures (if appropriate)

Checklist

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

@jcalcaben jcalcaben added the version: Patch This changeset includes backwards compatible bug fixes. label Mar 13, 2020
@m2-community-project m2-community-project bot added this to Ready for Review in Pull Request Progress Mar 13, 2020
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Mar 13, 2020

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Associated JIRA tickets: PWA-301.

Generated by 🚫 dangerJS against 5297048

Copy link
Contributor

@supernova-at supernova-at left a comment

Choose a reason for hiding this comment

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

Very cool, thanks for doing this!

const Foo = () => {

useEffect(() => {
document.title = 'Foo Test Page';
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is a simple example for a tutorial but Venia uses react-head to things like this. Here's an example: https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/lib/components/CartPage/cartPage.js#L59.

Not sure if you really want to get into that here though, I might just drop the manipulation of title in this file.

+ const CartPage = lazy(() => import('../CartPage'));
+ const CheckoutPage = lazy(() => import('../CheckoutPage'));
+ const CreateAccountPage = lazy(() => import('../CreateAccountPage'));
+ const Search = lazy(() => import('../../RootComponents/Search'));
Copy link
Contributor

Choose a reason for hiding this comment

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

What actually changed with these lazy imports? Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops I forgot to actually update it 😅

+ import Main from '@magento/venia-ui/lib/components/Main';
+ import Mask from '@magento/venia-ui/lib/components/Mask';
+ import MiniCart from '@magento/venia-ui/lib/components/MiniCart';
+ import Navigation from '@magento/venia-ui/lib/components/Navigation';
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a thought as I read all of these: should we be doing this in Venia already?

Co-Authored-By: Andy Terranova <13182778+supernova-at@users.noreply.github.com>
@dpatil-magento dpatil-magento merged commit 44d176c into develop Mar 17, 2020
@m2-community-project m2-community-project bot moved this from Review in Progress to Done in Pull Request Progress Mar 17, 2020
@dpatil-magento dpatil-magento deleted the jimothy/gh-301_add-static-route-tutorial branch March 17, 2020 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version: Patch This changeset includes backwards compatible bug fixes.
Development

Successfully merging this pull request may close these issues.

None yet

4 participants