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: use a drawer for the streaks tooltip on mobile #2920

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

DragosIorgulescu
Copy link
Contributor

@DragosIorgulescu DragosIorgulescu commented Apr 4, 2024

Changes

Screenshot 2024-04-04 at 11 01 04
Screenshot 2024-04-04 at 11 01 20
Screenshot 2024-04-04 at 11 01 33

Events

N / A

Manual Testing

On those affected packages:

  • Have you done sanity checks in the webapp?
  • Have you done sanity checks in the extension?
  • Does this not break anything in companion?

Did you test the modified components media queries?

  • MobileL (420px)
  • Tablet (656px)
  • Laptop (1020px)

Did you test on actual mobile devices?

  • iOS (Chrome and Safari)
  • Android

MI-267 #done

Preview domain

https://mi-267-streaks-drawer-mobile.preview.app.daily.dev

Copy link

vercel bot commented Apr 4, 2024

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

Name Status Preview Comments Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 10:47am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
storybook ⬜️ Ignored (Inspect) Apr 4, 2024 10:47am

Copy link
Contributor

@nensidosari nensidosari 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

}
<>
<ConditionalWrapper
condition={!isMobile}
Copy link
Member

Choose a reason for hiding this comment

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

Since there is content when it is not compact, I think we should also include the condition.

Suggested change
condition={!isMobile}
condition={!isMobile && compact}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow your comment here, the conditional wrapper is only for the Tooltip, which dictates wether it's wrapped around the button on non-mobile resolutions. It should have nothing to do with the compact property 🤔

Copy link
Member

@sshanzel sshanzel Apr 4, 2024

Choose a reason for hiding this comment

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

Yep, but the thing is, we only display tooltip for buttons without text. Which when compact is applied, there is no text, and only when should be applied.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but tooltips are not a thing on mobile, right? so including compact here would not really matter.

Also, since the Tooltip or CustomStreaksTooltip is not dictated by compact, I feel like we could mistakenly create a situation where someone uses the compact version and ends up displaying both the main streaks tooltip and the drawer. I would suggest we tinker with this only if the situation arises that requires it, WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay, I misunderstood, I thought this is only for tooltip to display a text. In that case, feel free to ignore and move on.

<div
className={classNames(
'mt-6 flex flex-row gap-2',
fullWidth && 'justify-between',
Copy link
Member

Choose a reason for hiding this comment

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

We could've maybe used a className object prop here, but I really don't have a strong opinion here. Just makes it more flexible. Not necessary, this is optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since it's a classname specific to the streak days list, we would have to create a className prop which allows passing classnames to each section of the component internals. My suggestion would be to only do that if we need to control this component's UI further in the future 🙏

Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

Looks great! Just had one optional comment, not really required. Up to you on that end 🚀

@DragosIorgulescu DragosIorgulescu merged commit 5efa9d7 into main Apr 4, 2024
10 checks passed
@DragosIorgulescu DragosIorgulescu deleted the MI-267-streaks-drawer-mobile branch April 4, 2024 11:53
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