Skip to content

Feature: User Card Avatar image #690

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 4 commits into from
Dec 13, 2023

Conversation

madsrasmussen
Copy link
Contributor

This PR adds an avatar slot to the user card component

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 change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Motivation and context

Currently, it is not possible to render a user image as part of the user card. I have added an avatar slot to render an avatar. We already have an avatar as part of the element, but I have decided to use a slot instead of passing in all props from the avatar. I have made the feature non-breaking so it replaces the current avatar element if an avatar is inserted into the avatar slot.

How to test?

  • Make sure an avatar is rendered when using the avatar slot

Screenshots (if appropriate)

Screenshot 2023-12-11 at 22 15 06

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-690.westeurope.azurestaticapps.net

@JesmoDev JesmoDev self-requested a review December 12, 2023 07:52
Copy link
Contributor

@JesmoDev JesmoDev left a comment

Choose a reason for hiding this comment

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

Nice addition! LGTM

Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

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

Looks good

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) December 13, 2023 08:13
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-690.westeurope.azurestaticapps.net

@nielslyngsoe nielslyngsoe merged commit 4ca5066 into v1/contrib Dec 13, 2023
@nielslyngsoe nielslyngsoe deleted the feature/User-Card-Avatar-image branch December 13, 2023 08:51
@iOvergaard iOvergaard added the enhancement New feature or request label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants