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

feat: update v-avatar to v3 #13265

Merged
merged 6 commits into from
Mar 16, 2021
Merged

feat: update v-avatar to v3 #13265

merged 6 commits into from
Mar 16, 2021

Conversation

nekosaur
Copy link
Member

@nekosaur nekosaur commented Mar 14, 2021

Description

update v-avatar to v3

Breaking Changes

  • tile prop is removed, use rounded="0" instead
  • dimension props (width, height etc) are removed. imo these do not fit with the expected usage of an avatar. what's the use case of making an avatar e.g. width=50 height=400 or something similar? for anyone that does need to set explicit non-equal width/height, they can do it with css.

Motivation and Context

How Has This Been Tested?

playground and unit tests

Markup:

<template>
  <v-app class="fill-height">
    <div>
      <v-avatar
        color="info"
        size="x-small"
      >
        <span>32</span>
      </v-avatar>

      <v-avatar
        color="warning"
        size="small"
      >
        <span>40</span>
      </v-avatar>

      <v-avatar
        color="primary"
      >
        <span>48</span>
      </v-avatar>

      <v-avatar
        color="secondary"
        size="large"
      >
        <span>56</span>
      </v-avatar>

      <v-avatar
        color="error"
        size="x-large"
      >
        <span>64</span>
      </v-avatar>

      <v-avatar
        color="error"
        size="128"
      >
        <span>128</span>
      </v-avatar>
    </div>
    <div>
      <v-avatar
        color="error"
        rounded="0"
      >
        40
      </v-avatar>

      <v-avatar
        color="error"
        rounded="lg"
      >
        40
      </v-avatar>

      <v-avatar size="x-large">
        <img
          src="https://cdn.vuetifyjs.com/images/john.jpg"
          alt="John"
        >
      </v-avatar>
    </div>
  </v-app>
</template>

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)

@nekosaur nekosaur merged commit 18ef431 into next Mar 16, 2021
@nekosaur nekosaur deleted the feat/v3-avatar branch March 16, 2021 20:59
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.

None yet

2 participants