Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Svelte: welcome banner followups#64222

Merged
camdencheek merged 2 commits into
mainfrom
cc/fix-welcome-overlay
Aug 1, 2024
Merged

Svelte: welcome banner followups#64222
camdencheek merged 2 commits into
mainfrom
cc/fix-welcome-overlay

Conversation

@camdencheek

@camdencheek camdencheek commented Aug 1, 2024

Copy link
Copy Markdown
Member

A few followups from #64163. Comments inline.

Test plan

Manual local testing

@cla-bot cla-bot Bot added the cla-signed label Aug 1, 2024
@camdencheek camdencheek requested a review from a team August 1, 2024 18:07
</main>

<WelcomeOverlay
show={(process.env.PW_TEST === 'true' && !$welcomeOverlayDismissed) ?? false}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This PW_TEST thing wasn't actually doing what I thought it was, and caused the banner to not be shown at all when deployed.

}
:global(.theme-dark) & {
background: var(--color-background, #f9fafb);
background: var(--color-background, #0f111a);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Used the wrong color for dark mode.

})
await this.page.addInitScript(() =>
window.localStorage.setItem('temporarySettings', '{"webNext.welcomeOverlay.dismissed": true}')
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In playwright tests, don't ever show the overlay


const showDeparture = !departureDismissed
// only show if the welcome message has been dismissed so we know they have been introduced to the new webapp
const showDeparture = !departureDismissed && welcomeDismissed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When a user is not in a default-on environment, we do not want to show the departure message if they have never activated the rewrite

@camdencheek camdencheek marked this pull request as ready for review August 1, 2024 18:07
@camdencheek camdencheek merged commit eb1a76e into main Aug 1, 2024
@camdencheek camdencheek deleted the cc/fix-welcome-overlay branch August 1, 2024 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants