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

Outreachy '20: Optimize Performance and accessibility Project Planning #7883

Open
27 of 40 tasks
Tlazypanda opened this issue May 7, 2020 · 24 comments
Open
27 of 40 tasks

Comments

@Tlazypanda
Copy link
Collaborator

Tlazypanda commented May 7, 2020

Hey everyone! This is a planning issue to map out all the tasks to be covered in the upcoming weeks and create a room for further discussions and improvements.

Note: see original proposal here: https://publiclab.org/notes/itm2017004/03-12-2020/outreachy-proposal-optimize-performance-and-accessibility-of-public-lab-content

Performance Analysis and Improvement:

Tasks:

New work added (not defined in the scope before)

Accessibility

See https://firefox-source-docs.mozilla.org/devtools-user/accessibility_inspector/index.html for firefox accessibility inspector, and WAVE assessment

Tasks

  • Add labels to forms wherever applicable.(break-me-up tag can be used to break it down into several components) (Flagged as missing form label)
  • Add aria-label if we don’t want the label to be visible but accessible.(break-me-up tag can be used to break it down into several components) (Flagged as missing form label for cases where we want hidden form labels)
  • Check and test if on zooming into text all the elements of the page are visible or not and apply changes accordingly.(break-me-up tag can be used to break it down into several components)
  • Add accessible names to button to prevent screen readers from announcing it as “button”.(break-me-up) (Flagged as empty button problem)
  • Add meaningful text into links to promote uniqueness and accessibility.(break-me-up) (Flagged as empty link problem)
  • Add alternative text for images to promote SEO and accessibility.(break-me-up) (wip: Add alternate text for lead images #8106 stuck and not sure how to work on this TBD after printability)

Worked on a route-to-route basis by testing against WAVE assessment (#8054 #8028 #7995 #7989 #7977 #7975 #7968 #7966 #7962 )
FTOs opened (#8094 #8093 #8092 #8055 #8032 #8030 #8029 #8007 #8006 #8005 #8001 #8000 )

Printability

Tasks:

Modified scope to avoid working with additional libraries:-

  • Using js script and DOM manipulations to create the print preview
  • Set topics section display as None in the stylesheet.
  • Add better contrast to the links printed by changing the colour of a tag in the stylesheet.
  • Images can be scaled down in the stylesheet for uniformity across the documents.
  • Add css to display tables in proper tabular format
  • Proper styling done with help of @ebarry
    //more points to be added here as and while developing if more improvements can be made

Documentation

Tasks:
#8057 https://hackmd.io/@itm2017004/BJuqtap6L

  • Creating a proper documentation guide covering all the points above ensuring that contributors abide by it to promote accessibility.
  • The guide will contain sections for adding aria-labels,form-labels,alt text and testing 200% zoom on pages.
    //more points to be added here as and while developing if more improvements can be made

Up for discussion

Tasks:

  • Running Lighthouse CI for pull request to ensure performance and accessibility in further code.More details can be found here. (Discussion issue here Lighthouse ci for performance and accessibility monitoring #8112 awaiting input)
  • Replace will-paginate gem with pagy which is much more memory efficient and can improve performance.
  • Serving assets over HTTP/2 instead of HTTP/1.1
  • Add descriptive text for links for better Search Engine Optimization.
  • Add rel="noopener" to links having target=’_blank’ to allow safety of cross-origin destinations.
  • Allow password copy-pasting since it is flagged as not a secure policy by Lighthouse.
  • Remove error logging into the console in the production environment.
  • The turbolinks gem is present in the gemfile but not used. So needs to be removed assuming we ran into some issue with it ?
@Tlazypanda
Copy link
Collaborator Author

@jywarren @cesswairimu @SidharthBansal This is just an initial draft for the planning. Since all of the features to be implemented require rigorous testing I think it would be better for now to not make this a project 😅 . Please go through all of the tasks I have raised, I have tried to be as elaborate as possible and since these are a not bugs, its entirely upon us if we want to implement it this way or not.

Also since most of these are tasks that would be better tested in the production environment, I will seek your constant support upon merging these to help me test it out 💯

I was also wondering if it is possible for me to start working on them right away since I want to make the most out of it 😄 without breaking anything xD

There are also a couple of issues/questions that I have to discuss after going through the codebase 💭
Thanks a lot!! 🚀

@cesswairimu
Copy link
Collaborator

Great breakdown...Thanks for opening this @Tlazypanda

@ananyaarun ananyaarun added outreachy planning Planning issues! labels May 8, 2020
@emilyashley
Copy link
Member

Yes! Happy to see this.

Also just want to say I'm here to help with any of the steps. I <3 WebPerf!

@Tlazypanda
Copy link
Collaborator Author

@emilyashley Thanks! Will be sure to keep you in the loop 🎉

@SidharthBansal
Copy link
Member

Awesome, there are so many things to cover up this Outreachy!
Which one are you targeting first?

@jywarren
Copy link
Member

This is looking great. Hoping to go through it for some suggestions today! I added a link to your proposal too!

@Tlazypanda
Copy link
Collaborator Author

@SidharthBansal I plan to start with Improving Performance first and have opened some issues for the same 😅 Thanks a lot for reviewing 💯

@jywarren Yeah thanks ✌️ I have opened some issues for the start as well where I have added more details for each issue 😅 And as always looking forward to your suggestions 🚀

@jywarren
Copy link
Member

Awesome to see all this. It seems super well planned out. Perhaps we could pull in some of the PDF generation (in-browser vs. in-app) discussion from your proposal too?

There is some really amazing stuff here! Wow, esp. in the "Up for Discussion" section!

Another thought is that this planning issue (and perhaps a summary later on) could be used as a template to inform similar refinements to our other Rails projects!

Great work!!!

@jywarren
Copy link
Member

Oh, also -- you can also create a milestone for all this as the issues start to be broken out!

@Tlazypanda
Copy link
Collaborator Author

@jywarren Thanks ✌️ 😄
Just have one more exam to go and then I will create the milestone 👍 .

Sure will try to add points about the pdf discussion here as well 😅 . And yeah Really looking forward to making this a template for other rails projects too 🚀

@jywarren
Copy link
Member

Hi @Tlazypanda! Would you mind updating this issue briefly with your recent work/progress, just so it stays current? Thank you!!! Hope your exams went well :-)

For example #7966 and #7963 are AWESOME 🎉

@jywarren
Copy link
Member

Another way you can keep up to date is to also assign all your issues and PRs to a milestone. Then we can track there and you can do a little less manual updating of this issue! Thanks!

@jywarren
Copy link
Member

I see you have https://github.com/publiclab/plots2/milestone/27 so i linked this to it! 🎉

@Tlazypanda
Copy link
Collaborator Author

@jywarren Thanks for the tip 🎉 Will update it in a day or two 😅

@emilyashley
Copy link
Member

Thanks for all the awesome work on this so far!

@jywarren
Copy link
Member

Hi @Tlazypanda i just noticed a route with pretty slow response time and you don't have to prioritize it at all but it was a little unusual and I recall seeing long wait times for it in the past -- posting a comment! It's not even a full page load, it's AJAX, so it should be faster. I wonder -- maybe it's to do with sending the emails? But that should be handled by ActiveJob asynchronously. Here, i'll look in Skylight to see what's up... https://oss.skylight.io/app/applications/GZDPChmcfm1Q/1591890000/6h/endpoints/CommentController%23create?responseType=js (nothing really jumps out but lots of "allocation time"??? however, indeed 4.2 seconds at the /fast/ end doesn't sound good...)

Anyways, this could be broken out into its own issue for analysis but i thought you might want to hear of a particular action on the site that needs your help! No rush at all, i love the work you're doing, and hope this is helpful!

@Tlazypanda
Copy link
Collaborator Author

Hey @jywarren I am planning to modify all the ORM queries that might be slow/repetitive as flagged by skylight so I will take this into consideration 😄 Thanks for letting me know ✌️ I am still learning about the ORM querying system in rails so might take some time to get back on this 😅

@cesswairimu
Copy link
Collaborator

Hi @Tlazypanda. maybe you could update the task list and check the tasks that you have completed

@Tlazypanda
Copy link
Collaborator Author

Ohh yes! I have been meaning to do that for a long time now 😂 Finally gotta get this done xD

@Tlazypanda
Copy link
Collaborator Author

@jywarren @cesswairimu @ebarry Have got some edits into the tasklist 😂 still need to refine this more

Also wanted to share the results for the work done so far:-
Before:-

image

After:-
(on different routes depending on the assets they have/load)

image

image

@ebarry
Copy link
Member

ebarry commented Aug 10, 2020

Wow look at this performance boost!!!!! 🤩🤩🤩🤩🤩🤩🤩🤩

@sagarpreet-chadha
Copy link
Contributor

Wow this is awesome 🎉

@cesswairimu
Copy link
Collaborator

wow fantastic 🚀

@jywarren
Copy link
Member

jywarren commented Sep 8, 2020

Hi @Tlazypanda this is super, by the way, i forgot to comment! I wonder now that a lot more things have been merged and published, if we get an even better score!

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

No branches or pull requests

8 participants