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

progressive web app changes for lighthouse 100% score #5926

Closed
wants to merge 2 commits into from

Conversation

dstroot
Copy link

@dstroot dstroot commented Nov 30, 2018

The project has done great work to create a progressive web app - however if you scaffold an app and deploy it "as is" you score low on the lighthouse test from Google. Why not make it awesome from the start! I know people have to change these files to make the app their own, but we should give them the best possible start. (of course they need to enable the service worker too).

screen shot 2018-11-29 at 5 00 58 pm

I needed to:

  • add two images and tweak the manifest.json file
  • add a robots.txt file
  • tweak the index.html file to add <meta name="description" content="Web site created using create-react-app">

That's it! BOOM 100%!

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@iansu
Copy link
Contributor

iansu commented Nov 30, 2018

This looks great. Can you post the lighthouse score before these changes for comparison?

@ianschmitz
Copy link
Contributor

Do you mind running the images through tiny png?

@dstroot
Copy link
Author

dstroot commented Nov 30, 2018

I already ran PNG Crush on the images but happy to run them through tiny png to see what else we can squeeze out.

Also happy to get a “before” image of the lighthouse score. It will take me a day or two.

@dstroot
Copy link
Author

dstroot commented Dec 1, 2018

OK, I ran tiny png on the images. I missed the typescript template since I don't use it but it's fixed now.

Files:

  • Lighthouse Report 1 (base case)
  • Lighthouse Report 2 (just enabled the service worker)
  • Lighthouse Report 3 (with suggested changes)

Lighthouse Report 3.pdf
Lighthouse Report 2.pdf
Lighthouse Report 1.pdf

@stale
Copy link

stale bot commented Dec 31, 2018

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 31, 2018
@ianschmitz ianschmitz removed the stale label Jan 1, 2019
@ianschmitz ianschmitz added this to the 2.1.4 milestone Jan 6, 2019
@ianschmitz ianschmitz closed this Jan 7, 2019
@ianschmitz ianschmitz reopened this Jan 7, 2019
@ianschmitz ianschmitz modified the milestones: 2.1.4, 2.1.5 Feb 10, 2019
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<main>
Copy link

Choose a reason for hiding this comment

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

Is it possible to put #root on main instead of having an extra DOM node?

Copy link
Contributor

@hnordt hnordt Mar 15, 2019

Choose a reason for hiding this comment

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

it's not a good idea to use main here. According to W3C spec we should have only one main per document. CRA should not have an opinion on what's the main content of the page.

<noscript>
You need to enable JavaScript to run this app.
</noscript>
<main>
Copy link

Choose a reason for hiding this comment

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

Is it possible to put #root on main instead of having an extra DOM node?

Copy link
Contributor

Choose a reason for hiding this comment

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

it's not a good idea to use main here. According to W3C spec we should have only one main per document. CRA should have an opinion on what's the main content of the page.

@@ -0,0 +1,2 @@
User-agent: *
Copy link

Choose a reason for hiding this comment

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

I'd put a comment link as the very first line

http://www.robotstxt.org/robotstxt.html

@iansu iansu modified the milestones: 2.1.6, 2.1.x, 3.0 Mar 6, 2019
@iansu iansu modified the milestones: 3.0, 3.x Apr 3, 2019
@mrmckeb mrmckeb modified the milestones: 3.x, 3.1 Jul 24, 2019
@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 24, 2019

Hi @dstroot, I'm sorry it's been a long time. Are you still interested in getting this in? If so, let me know and we can try to get it into the next release.

@mrmckeb mrmckeb self-assigned this Jul 24, 2019
@dscanlan
Copy link
Contributor

dscanlan commented Aug 5, 2019

If this is open to be completed. I can take a look?

@mrmckeb
Copy link
Contributor

mrmckeb commented Aug 5, 2019

@dscanlan, that sounds great. Let's give @dstroot a few more days to respond, if not, it would be great if you could pick this up and we could aim for 3.2.

@dstroot
Copy link
Author

dstroot commented Aug 6, 2019

Sorry all for the delay in responding. I'd be happy if @dscanlan picks this up. I am in a new role and I don't have the cycles to take this over the finish line at this time.

@ianschmitz
Copy link
Contributor

Thanks for your original PR and for getting back to us @dstroot. Closing in favor of #7482.

@ianschmitz ianschmitz closed this Aug 7, 2019
@lock lock bot locked and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants