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

Improve contributorlist.jsx and zones.json #4081

Merged

Conversation

VIKTORVAV99
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 commented May 3, 2022

In this PR:

  • removes the https://github.com/ prefix from the contributors in zone.json.
  • changes the contributorlist.jsx component to handle the new zone.json changes.
  • makes some improvements to contributorlist.jsx like lazy loading and adding srcset.

This will reduce the main bundle size and give users a better overall experience.

Copy link
Member

@madsnedergaard madsnedergaard left a comment

Choose a reason for hiding this comment

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

Makes sense - and I hope all new contributors will understand how to add their username :)

@madsnedergaard madsnedergaard enabled auto-merge (squash) May 5, 2022 09:30
@madsnedergaard madsnedergaard merged commit 41fab9f into electricitymaps:master May 5, 2022
@VIKTORVAV99 VIKTORVAV99 deleted the improve_contributorlist.jsx branch May 5, 2022 09:37
srcSet={`https://avatars.githubusercontent.com/${contributor}?s=40 2x`} // loads the avatar image at a default size of 40px for high resolution displays
alt={contributor}
height="20px"
width="20px"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure using px in these attributes is allowed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh crap you are right, according to MDN they are supposed to be without units...
It works just fine with for me with units in Firefox and Chrome though but might be best to change it.

@VIKTORVAV99 VIKTORVAV99 restored the improve_contributorlist.jsx branch May 10, 2022 13:38
@VIKTORVAV99 VIKTORVAV99 deleted the improve_contributorlist.jsx branch May 10, 2022 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants