python-discord / site

pythondiscord.com - A Django and Bulma web application.
https://pythondiscord.com
MIT License
638 stars 127 forks source link

Timeline CSS refactor #1262

Closed hedyhli closed 3 months ago

hedyhli commented 4 months ago

Part of #1235.

Preview: https://deploy-preview-1262--pydis-static.netlify.app/timeline/

Reduction in file size for the CSS file is around 10x (unminified) and 13x (after minifying), whilst keeping pretty much all UI and functionality the same, with a few exceptions listed below.

Reviewing

This PR has some large diffs, sorry about that, however, it's actually quite manageable, as the bulk of the PR lies in the new CSS, which is only ~400 lines long together with a lot of comments.

I recommend first looking at the diff for timeline.html. The first and second entries are representative enough, because I've made sure that the same changes are applied for all entries. The first entry uses an FA icon, and the second uses the pydis logo as its icon - there are no other cases for the icons and all other components for other entries are pretty much similar to these two.

Next, the structure in timeline.html could help when looking at the CSS, which I've tried to make as readable as possible.

Finally, the JS file's changes are just adapting to the new CSS classes, and adding a separate bounce animation for the date components.

That's all you need, and I really appreciate your time!

Changes

Deliberate design changes

Other known changes to the design

Acknowledgements

Special thanks to editor macros; without them, I would probably have given up before finishing the PR.

Todo

netlify[bot] commented 4 months ago

Deploy Preview for pydis-static ready!

Name Link
Latest commit 9af9751467c0bb99a8a73d5bc296b7ac7141049a
Latest deploy log https://app.netlify.com/sites/pydis-static/deploys/6602140664d0a200080715ae
Deploy Preview https://deploy-preview-1262--pydis-static.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

coveralls commented 4 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 9af9751467c0bb99a8a73d5bc296b7ac7141049a on feat/timeline-css-rewrite into f3f78ed14bc7dabcf2aa745e5268df67cbbdb404 on main.

hedyhli commented 3 months ago

@wookie184 that's awful! I was too careless with my inline substitutions. I'll fix it right away, thank you.