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: top reader in user short info #3748

Merged
merged 9 commits into from
Nov 4, 2024
Merged

Conversation

omBratteng
Copy link
Member

@omBratteng omBratteng commented Nov 2, 2024

Changes

Depends on dailydotdev/daily-api#2382

image
image
image

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

AS-670

Preview domain

https://as-670-top-reader-user-info.preview.app.daily.dev

Preview inline in comment

https://as-670-top-reader-user-info.preview.app.daily.dev/posts/dream-machine--7agaxxtvx

Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Nov 4, 2024 0:57am
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Nov 4, 2024 0:57am

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

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

Minor comment on abstracting it :)

{topReader && (
<>
<Separator />
<SimpleTooltip
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 tooltip here and not on the other one?
Maybe we can abstract into common component rather?

Copy link
Member Author

Choose a reason for hiding this comment

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

Mostly because UserShortInfo is used in the user lists, where that row already has a tooltip, so adding a second tooltip doesn't really work well 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, I see :) no worries.
We could do generic component and make tooltip optional, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I can do that :)

{transformUsername ? transformUsername(user) : `@${username}`}
</TruncateText>

{topReader && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Re-used again, so component might be good

Copy link
Member Author

Choose a reason for hiding this comment

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

Refactored

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

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

Didn't we have many of these changes already in some PRs?

packages/shared/src/components/badges/TopReaderBadge.tsx Outdated Show resolved Hide resolved
Co-authored-by: Chris Bongers <[email protected]>
@omBratteng omBratteng merged commit 2ab4cbb into AS-510 Nov 4, 2024
8 of 9 checks passed
@omBratteng omBratteng deleted the AS-670-top-reader-user-info branch November 4, 2024 13:10
{topReader && (
<>
<Separator />
<TopReaderIn topReader={topReader} tooltip />
Copy link
Member

Choose a reason for hiding this comment

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

We might have to truncate this whole row? Probably noticeable on mobile devices.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you add these comments to #3739?

Copy link
Member

@sshanzel sshanzel Nov 8, 2024

Choose a reason for hiding this comment

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

Apologies, I just got back to my GH emails 🙈

I will check if this hasn't been resolved.

Comment on lines +113 to +114
<Separator />
<TopReaderIn topReader={author.topReader} />
Copy link
Member

Choose a reason for hiding this comment

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

Same here, we should maybe truncate it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you add these comments to #3739?

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