Skip to content

ui: Remove padding from icons #1134

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

Merged
merged 23 commits into from
Apr 18, 2024
Merged

ui: Remove padding from icons #1134

merged 23 commits into from
Apr 18, 2024

Conversation

backspace
Copy link
Contributor

@backspace backspace commented Apr 3, 2024

This removes padding from icons so they’ll be sized consistently, see the results in the preview. It started off just being about the inconsistency in alignment of the pencil icon here in the chat session menu, where it looked like this:

image

Now:

Boxel 2024-04-15 14-42-03

I used SVG Crop to crop the icons. I looked at using svgo-autocrop and svg-autocrop but neither worked because of mysterious Puppeteer problems, it didn’t seem worth the added complexity, but it does mean that we have to manually ensure new icons don’t have padding.

I’ve adjusted the use of icons to make things look the same but there are slight differences!

For the special case where there’s a “crossed out” version (realm write permissions), I added icon-pencil-not-crossed-out which is icon-pencil-crossed-out with the crossing-out stroke hidden, the pencil is slightly smaller to allow for the stroke to cover it.

@backspace backspace added the bug Something isn't working label Apr 3, 2024
@backspace backspace self-assigned this Apr 3, 2024
Copy link

github-actions bot commented Apr 3, 2024

Test Results

586 tests  ±0   582 ✔️ ±0   8m 34s ⏱️ +31s
    1 suites ±0       4 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 0db24ab. ± Comparison against base commit c220289.

♻️ This comment has been updated with latest results.

@backspace
Copy link
Contributor Author

Thanks for checking this out, @lukemelia, I kept it in draft because the size change has cascading effects, did you see the Percy diffs?

screencast 2024-04-10 18-17-16

IconX similarly has padding around its edge. Should we standardise on not having that padding except in cases like the crossed-out-ness needing it?

@backspace backspace changed the title ui: Fix pencil icon alignment ui: Remove padding from icons Apr 15, 2024
@backspace backspace force-pushed the ui/pencil-alignment-cs-6656 branch from f9cf273 to fbd8b24 Compare April 16, 2024 12:52
@backspace backspace marked this pull request as ready for review April 16, 2024 19:04
@backspace backspace requested a review from a team April 16, 2024 19:04
@backspace backspace merged commit dd75e87 into main Apr 18, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants