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

docs(auth): running Lighthouse on authenticated pages #9628

Merged
merged 60 commits into from
Sep 19, 2019
Merged

Conversation

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

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

Thoughts on the wording of the README tutorial.

I think it is great, makes sense and is easy to follow. I have mainly only small nits for understandability. I think @kaycebasques might be better at that than me though!

docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
Co-Authored-By: Shane Exterkamp <[email protected]>
@brendankenny
Copy link
Member

if we follow the pattern of other docs (which has seemed good but certainly can change), it might make sense to split this into a docs/authenticated-pages.md (or whatever) that has mostly what's in the "Other Approaches" section with a new bullet point for using puppeteer with a link to docs/recipes/auth/ that has the example project and explanation

docs/auth/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@kaycebasques kaycebasques left a comment

Choose a reason for hiding this comment

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

Only had time for a brief review, but in general LGTM. I didn't see any instructional issues with the content. I didn't usability test it, though.

docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

looks great! ❤️

docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/README.md Outdated Show resolved Hide resolved
docs/auth/example-lh-auth.test.js Outdated Show resolved Hide resolved
docs/auth/example-lh-auth.test.js Outdated Show resolved Hide resolved
docs/auth/example-lh-auth.test.js Outdated Show resolved Hide resolved
docs/auth/server/server.js Outdated Show resolved Hide resolved
docs/auth/server/server.js Outdated Show resolved Hide resolved
@connorjclark
Copy link
Collaborator Author

stashed the jest stuff in a branch, will open a new PR with that later.

This is ready for final review.

docs/recipes/auth/example-lh-auth.js Show resolved Hide resolved
docs/recipes/auth/example-lh-auth.js Show resolved Hide resolved
docs/recipes/auth/server/public/dashboard.html Outdated Show resolved Hide resolved
docs/recipes/auth/server/public/unauthenticated.html Outdated Show resolved Hide resolved
docs/recipes/auth/server/public/unauthenticated.html Outdated Show resolved Hide resolved
docs/recipes/auth/README.md Outdated Show resolved Hide resolved
docs/recipes/auth/README.md Show resolved Hide resolved
docs/recipes/auth/server/server.js Outdated Show resolved Hide resolved
if (req.session.user) {
res.sendFile('./dashboard.html', {root: PUBLIC_DIR});
} else {
res.status(401).sendFile('./unauthenticated.html', {root: PUBLIC_DIR});
Copy link
Member

Choose a reason for hiding this comment

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

if this remains a file, it should probably be named dashboard-unauthenticated.html to distinguish from an auth'd / login page.

docs/recipes/auth/server/server.js Show resolved Hide resolved
@vercel vercel bot temporarily deployed to staging September 16, 2019 19:09 Inactive
@connorjclark
Copy link
Collaborator Author

Thoughts on using the local Lighthouse code?

diff --git a/docs/recipes/auth/package.json b/docs/recipes/auth/package.json
index 1dcdb4625..b632de6bb 100644
--- a/docs/recipes/auth/package.json
+++ b/docs/recipes/auth/package.json
@@ -5,7 +5,7 @@
   "dependencies": {
     "express": "^4.17.1",
     "express-session": "^1.16.2",
-    "lighthouse": "^5.2.0",
+    "lighthouse": "file:../../..",
     "morgan": "^1.9.1"
   }
 }

plus, adding a sanity test that this works in CI?

cd docs/recipes/auth
yarn
yarn concurrently start "node example-lh-auth.js"

@paulirish
Copy link
Member

Thoughts on using the local Lighthouse code?

sure. sg.

plus, adding a sanity test that this works in CI?

can you add that in a followup PR?

docs/recipes/auth/README.md Show resolved Hide resolved
docs/recipes/auth/example-lh-auth.js Show resolved Hide resolved
@connorjclark
Copy link
Collaborator Author

@patrickhulce i think you're change requests were all addressed so I am dismissing your review since you are on vacation :)

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

Successfully merging this pull request may close these issues.

7 participants