DEV Community

cychu42
cychu42

Posted on

1

Dealign With A Magical Number: A Follow-Up PR

This one is going to be pretty short. To follow-up on a previous work where I handled some text overflow, I made a new PR to tackle the magic number I used for max width of an element. The goal was to at least make sure the number comes from somewhere reasonable. Because I can't use real percentage without messing up the UI in some way, I decided to "sort of do" it instead. I look up the closest parent element's and based the max width on the parent element's by a percentage. The parent element's max width was 510px, so I picked 60% of that, which is 306px.

This is my first follow-up PR, which introduce to me the idea of merging a PR and then follow it with related issues arise during the PR. Before, I would lean more toward fixing connected issue in the same PR, but one can just merge the PR if it covers the basci of the goals and then follow-up with more issues/PRs to tackle the rest.

I try to measure my growth by the complexity and volume of the code I work on, as well as whether I lean something new.
While this is simple, I at least learned something new.

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay