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

[KIcon]: Fix icon alignment in KLabeledIcon and KButton with icons #931

Open
AlexVelezLl opened this issue Feb 5, 2025 · 6 comments
Open
Assignees
Labels
Component: KIconButton Component: KLabeledIcon help wanted Open source contributors welcome product: Kolibri Relevant to a specific issue in Kolibri type: task Something that needs to be done

Comments

@AlexVelezLl
Copy link
Member

🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.

Product

Kolibri

Expected behavior

  • Icons in KLabeledIcon and KButton should be vertically aligned to the center.
  • Once we solve this, we will need to audit how these changes impact Kolibri, ensuring that no regressions are being introduced. See how to preview updates in Kolibri in case you are not familiar with it yet.

Actual behavior

Icons in KLabeledIcon and KButton are not centered vertically:

Image

Image

Steps to reproduce the issue

You can copy this into your playground:

    <KButton
      text="settings"
      appearance="flat-button"
    >
      <template #icon>
        <KIcon
          icon="settings"
          style="font-size: 20px"
        />
      </template>
    </KButton>
    <KLabeledIcon
      label="settings"
    >
      <template #icon>
        <KIcon
          icon="settings"
          style="font-size: 20px"
        />
      </template>
    </KLabeledIcon>
@AlexVelezLl AlexVelezLl added Component: KIconButton Component: KLabeledIcon help wanted Open source contributors welcome product: Kolibri Relevant to a specific issue in Kolibri type: task Something that needs to be done labels Feb 5, 2025
@shruti862
Copy link
Contributor

Hey @AlexVelezLl ,I wanted to contribute to this issue, please assign me.

@karankoder
Copy link
Contributor

Hey @AlexVelezLl, I want to work on this issue.

@lokesh-sagi125
Copy link
Contributor

hey @AlexVelezLl can i work on this?

@AlexVelezLl
Copy link
Member Author

Hey @karankoder, @lokesh-sagi125! Thanks for your interest in picking this issue up, but @shruti862 asked for it first, so will proced to assign it to @shruti862. Please let us know if you have any quesetion :).

@shruti862
Copy link
Contributor

Hey @AlexVelezLl,
I wanted to check whether the icon alignment issue should be addressed by modifying the CSS styling of KIcon, or if the fix should be applied to KButton and KLabeledIcon instead.

@AlexVelezLl
Copy link
Member Author

Hey @shruti862! It should probably be fixed in the KButton and KLabeledIcon components :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: KIconButton Component: KLabeledIcon help wanted Open source contributors welcome product: Kolibri Relevant to a specific issue in Kolibri type: task Something that needs to be done
Projects
None yet
Development

No branches or pull requests

4 participants