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

Icon Label block Icon Gap issue #3126

Closed
andeng1106 opened this issue Apr 2, 2024 · 1 comment · Fixed by #3209
Closed

Icon Label block Icon Gap issue #3126

andeng1106 opened this issue Apr 2, 2024 · 1 comment · Fixed by #3209
Assignees
Labels
[block] Icon Label bug Something isn't working enhancement New feature or request

Comments

@andeng1106
Copy link

Describe the bug
When I set the Icon Gap to 36 or below, it stops immediately and no gap anymore instead of having no gap at 0.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new page
  2. Add an Icon Label block
  3. Move slide to set Icon Gap to 36 or below
  4. Set Icon Gap to 0
  5. Compare the difference between step 3 and 4

Expected behavior
Icon Gap no gap should appear when it's set to 0

Screenshots

Screen.Recording.2024-04-02.at.2.02.47.PM.mov
@andeng1106 andeng1106 added bug Something isn't working enhancement New feature or request [block] Icon Label labels Apr 2, 2024
@bfintal
Copy link
Contributor

bfintal commented Apr 3, 2024

I was checking why this was the case. Our initial idea for the "Icon Gap" option is that it works independently from the icon size, so that you can have the icon any size you want, then the Icon Gap measurement would correspond to the width from the left side of the icon, to the left side of the text.

Image

This looks confusing now that the icon label block has been out for a while.

Implementation

  1. Let's transition this to be a proper "gap" styling rule instead of a "flexbasis" styling rule.

Keep in mind that the value would need to be deprecated and adjusted for the new rule. The new value would now be the gap between the icon and the text. The value should be upgraded to be:

// On deprecation, update value to:
const newValue = oldValue - icon block size
  1. The new default gap should make the block look the same as it is now - this is so that if you have existing icon label blocks and you updated to the new style, inserting a new icon label block would have them both aligned the same way.
  2. Check whether the Icon box block might also need to be updated because of the adjustments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[block] Icon Label bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants