Skip to content

Conversation

@ttaylor-stack
Copy link
Collaborator

@ttaylor-stack ttaylor-stack commented Jan 14, 2026

SPARK-127

Figma

This PR covers part 2 of the User Card component which includes:

  • States:
    • New contributor
    • Original poster
    • Deleted
  • Additional bling
    • Recognized member (collectives)
    • top 3 leaderboard (collectives)

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

🦋 Changeset detected

Latest commit: b4ac81d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ttaylor-stack ttaylor-stack changed the base branch from develop to beta January 14, 2026 14:23
@netlify
Copy link

netlify bot commented Jan 14, 2026

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit b4ac81d
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/696a4f18b15c890008923e81
😎 Deploy Preview https://deploy-preview-2123--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 14, 2026

Deploy Preview for stacks-svelte ready!

Name Link
🔨 Latest commit b4ac81d
🔍 Latest deploy log https://app.netlify.com/projects/stacks-svelte/deploys/696a4f18fea0930008cbfd9c
😎 Deploy Preview https://deploy-preview-2123--stacks-svelte.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ttaylor-stack ttaylor-stack requested review from CGuindon, dancormier, giamir and mukunku and removed request for dancormier January 16, 2026 09:59
@ttaylor-stack ttaylor-stack marked this pull request as ready for review January 16, 2026 11:58
Copy link
Contributor

@giamir giamir left a comment

Choose a reason for hiding this comment

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

Thanks Tavian for the PR. As you can see I am asking for few changes. Hopefully they are all understandable if not let me know and we can pair.

For the svelte component I suggest to create a UserCardAdditionalBling subcomponent so that we don't have to add a lot of logic and props in the existing root UserCard component but just a snippet.

Sidenote
I think AdditionalBling is a pretty poor name to describe the little extra icons that can be added to between the badges and the blings but it is what we have in Figma so I guess we can roll with it. I don't have a better name for now. cc @CGuindon

&:before {
height: var(--_ba-before-h);
margin-top: 0;
margin-left: calc(var(--su2) * -1); // -2px margin
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have --sun2 now after Dan's PR got merged

color: var(--black-400);
}

& &--original-poster {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be named s-user-card--username__op? cc @dancormier

word-break: break-all;
}

& &--awarded-third {
Copy link
Contributor

Choose a reason for hiding this comment

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

How are those used? I cannot find them in the docs snippets?

color: var(--black-400);
}

& &--original-poster {
Copy link
Contributor

Choose a reason for hiding this comment

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

The design differ compared to figma

PR
Screenshot 2026-01-16 at 15 47 38

Figma
Screenshot 2026-01-16 at 15 49 11

import Popover from "../Popover/Popover.svelte";
import PopoverReference from "../Popover/PopoverReference.svelte";
import PopoverContent from "../Popover/PopoverContent.svelte";
import avatarDeleted16 from "../../assets/img/avatar-deleted-16.svg?url";
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this inline the asset otherwise it won't work after things get bundled?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could probably create an AvatarDeleted16.svelte and an AvatarDeleted24.svelte components in the UserCard folder for now with the svg in it.

{@render badges()}
</ul>
{/if}
{#if award}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we would be better off to create UserCardAdditionalBling subcomponent here for consumer to use. We are inferring too much from the value of award (tooltip text, class, etc...). And then just have a additionalBling snippet in the root UserCard component.


{#snippet userCardMainContent()}
{@render avatarAndName()}
{#if recognition && size === "sm"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need recognitionHref?
Can we actually make the UserCardAdditionalBling subcomponent generic so that the consumer can decide if they want to show the "little cup icon" bling or the "recognition icon" bling instead? It would be nice to keep the additions on the UserCard.svelte component to a minimum. As I said in a previous comment maybe just a additionalBling (or additionalBlings) snippet depending if more than one bling can be displayed together or not. Keep things generic and then have any additional logic in the UserCardAdditionalBling subcomponent.

},
{
"name": "New Contributor",
"class": "s-user-card--new-contributor",
Copy link
Contributor

Choose a reason for hiding this comment

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

This class does not exist in less, we should probably remove it from the docs and the examples

<svelte:element
this={recognitionHref ? "a" : "div"}
href={recognitionHref}
class="s-user-card--group s-user-card--recognition"
Copy link
Contributor

Choose a reason for hiding this comment

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

The same s-user-card--recognition is used for 2 purposes:

  • for the container element "Recognized by..."
  • for the recognition icon in the additional blings section

I think this is confusing, we are probably better off create another class for the additional blings part

</ul>
{/if}
{#if award}
<Popover id="user-card-award-popover" tooltip>
Copy link
Contributor

Choose a reason for hiding this comment

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

popover ids need to be unique for the whole page so if we generate them inside svelte we need to either create a random text we can append to them or ask the consumer to do that

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.

4 participants