This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Svelte: more welcome banner behavior updates#64311
Merged
camdencheek merged 12 commits intomainfrom Aug 7, 2024
Merged
Conversation
bd2abf3 to
052c939
Compare
fkling
approved these changes
Aug 7, 2024
| }) | ||
|
|
||
| return ( | ||
| <dialog ref={dialogRef} className={styles.dialog}> |
Contributor
There was a problem hiding this comment.
In React we also have Modal that you could use. https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@3680503eab63865155744c34681a21ad2f8cc142/-/blob/client/wildcard/src/components/Modal/Modal.tsx
Contributor
There was a problem hiding this comment.
+1 that shoud support closing, esc and clicking outside the modal.
Member
Author
There was a problem hiding this comment.
Skipping this for now because getting the open behavior right was not trivial
0xnmn
reviewed
Aug 7, 2024
|
|
||
| const isLightTheme = useIsLightTheme() | ||
|
|
||
| const show = (): void => dialogRef.current?.showModal() |
Contributor
There was a problem hiding this comment.
useCallback? purely an over-optimization but because we do everywhere else as well so...
Member
Author
There was a problem hiding this comment.
Skipping for now since this is just a static component
0xnmn
approved these changes
Aug 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes some requested changes to the welcome banner.
Notably:
Apologies for the messy code. I reimplemented the dialog in React so we could show it before the user decides to switch. In a world where I had more time, I'd try to get the "svelte in react" stuff working so that's a tool we can use.
Video walkthrough
Figma with updated designs
Test plan
See video