Skip to content

feat: add NeAvatar component #91

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: add NeAvatar component #91

wants to merge 6 commits into from

Conversation

andre8244
Copy link
Collaborator

@andre8244 andre8244 commented Jun 24, 2025

  • Add NeAvatar component and storybook
  • NeDropdown: add menuHeader slot
  • NeModal: fix font-weight of title
  • NeCard: fix font-weight of title and spacing for cards with no title

@andre8244 andre8244 self-assigned this Jun 24, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the new NeAvatar component (with stories), extends NeDropdown with a menuHeader slot, and refines typography and layout for NeModal and NeCard.

  • Add NeAvatar component, export, and Storybook stories
  • Enhance NeDropdown to support a menuHeader slot
  • Adjust font-weight in NeModal and NeCard titles and hide empty headers in cards
  • Add story for cards without a title

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
stories/NeDropdown.stories.ts Rename WithSlot to ButtonSlot and add MenuHeaderSlot story
stories/NeCard.stories.ts Add WithoutTitle story with no-title card scenario
stories/NeAvatar.stories.ts New Storybook file for NeAvatar
src/main.ts Export NeAvatar component and AvatarSize type
src/components/NeModal.vue Change dialog title class from font-semibold to font-medium
src/components/NeDropdown.vue Insert <slot name="menuHeader"> before dropdown items
src/components/NeCard.vue Compute when header should show, update font-weight and spacing
src/components/NeAvatar.vue New component implementation with image, initials, and placeholder logic
package.json Bump version to 3.0.6
Comments suppressed due to low confidence (1)

package.json:4

  • Since this release adds a new public component (NeAvatar), consider a minor version bump (e.g., 3.1.0) instead of a patch bump to align with semantic versioning.
  "version": "3.0.6",

@andre8244 andre8244 marked this pull request as ready for review July 1, 2025 09:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

remember to remove the pack pushes

<img
v-if="img && !imageError"
:alt="alt"
:class="`${avatarSizeClasses[size]} ${squared ? 'rounded-sm' : 'rounded-full'}`"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:class="`${avatarSizeClasses[size]} ${squared ? 'rounded-sm' : 'rounded-full'}`"
:class="[avatarSizeClasses[size], squared ? 'rounded-sm' : 'rounded-full']"

<div v-else-if="(imageError || !img) && !initials" :class="placeholderContainerClasses">
<FontAwesomeIcon
:icon="faUser"
:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`"
:class="[placeholderColorClasses, placeholderIconSizeClasses[size]]"

:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`"
/>
</div>
<div v-else :class="`${placeholderContainerClasses} font-medium`">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<div v-else :class="`${placeholderContainerClasses} font-medium`">
<div v-else :class="[placeholderContainerClasses, 'font-medium']">

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.

2 participants