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

PopoverEducational: Add Experimental Prop for Notification (background color change) #3818

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

andorjen
Copy link
Contributor

@andorjen andorjen commented Oct 23, 2024

Summary

This PR adds an experimental prop to the component PopoverEducational so we can test out using it for notification purposes on web. This simply changes the background color of the current component.

light mode

Screenshot by Dropbox Capture

dark mode

Screenshot by Dropbox Capture

Approved contribution doc: https://docs.google.com/document/d/1uhpW2DmYsMWXMba0J0xkJrUyg8YnPrUdLTyNN2eergs/edit

What changed?

Added prop: _experimentalVariant?: 'notification' | 'education'
If _experimentalVariant set to 'notification', set bgColor to be 'darkGray', otherwise default to 'blue'.

Why?

In August 2024, the Social Growth team shipped this experiment to show users a notification message on dWeb app start if they have unread messages and saw overall success on messaging engagement. At that time, we used a component that is not standard to Gestalt. For a long term solution, it would be ideal if we could have a standardized Gestalt component for use cases like this.

Links

@andorjen andorjen requested a review from a team as a code owner October 23, 2024 04:51
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for gestalt ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fc7e79c
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/671880d1ea580e0008d538e8
😎 Deploy Preview https://deploy-preview-3818--gestalt.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 site configuration.

@@ -137,6 +142,7 @@ export default function PopoverEducational({
shouldFocus = false,
size = 'sm',
zIndex,
_experimentalVariant,
Copy link
Contributor

@AlbertCarreras AlbertCarreras Oct 23, 2024

Choose a reason for hiding this comment

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

super nit: let's set the default to 'education'

@AlbertCarreras AlbertCarreras added the minor release Minor release label Oct 23, 2024
@AlbertCarreras
Copy link
Contributor

We need to fix Text
Screenshot by Dropbox Capture

@AlbertCarreras AlbertCarreras merged commit a8c0edb into pinterest:master Oct 23, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor release Minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants