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

fix(VBadge): round shape when were used icon prop #15058

Closed

Conversation

volvachev
Copy link

@volvachev volvachev commented May 6, 2022

The badge does not get a round shape when you use an icon prop

fixes #14991

Description

Motivation and Context

How Has This Been Tested?

visually

Markup:

 <v-list
      border
      class="mx-auto"
      max-width="256"
    >
      <v-list-item
        link
        prepend-icon="mdi-inbox-arrow-down"
        title="Inbox"
      >
        <template v-slot:append>
          <v-badge
            color="error"
            content="6"
            inline
          ></v-badge>
        </template>
      </v-list-item>
  
      <v-list-item
        link
        prepend-icon="mdi-send"
        title="Sent Mail"
      ></v-list-item>
  
      <v-list-item
        link
        prepend-icon="mdi-delete"
        title="Trash"
      >
        <template v-slot:append>
          <v-badge
            color="info"
            icon="mdi-instagram"
            inline
          ></v-badge>
        </template>
      </v-list-item>
  
      <v-list-item
        link
        prepend-icon="mdi-alert-circle"
        title="Spam"
      ></v-list-item>
    </v-list>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

packages/vuetify/src/components/VBadge/VBadge.sass Outdated Show resolved Hide resolved
@@ -55,6 +55,9 @@

.v-icon
color: inherit
font-size: $badge-font-size
margin: $badge-icon-margin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value only worked in v2 because badges had 2px extra inline padding and weren't display flex, now it makes icons way too cramped if you also have text next to them.

@nekosaur 87cc5af / 8cd727e

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means the old values for display and padding need to be brought back too, unless @nekosaur had some specific reason otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think so, or I don't remember.

The badge does not get a round shape when you use an icon prop

fixes vuetifyjs#14991
@volvachev volvachev force-pushed the fix/14991-badge-with-icon branch from b9a147d to 3fc5716 Compare May 9, 2022 18:41
@volvachev volvachev requested a review from KaelWD May 11, 2022 05:02
@KaelWD
Copy link
Member

KaelWD commented May 23, 2022

Closing due to inactivity

@KaelWD KaelWD closed this May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants