-
Notifications
You must be signed in to change notification settings - Fork 31
feat: left/right tooltips #3071
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
Merged
Merged
Changes from 82 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
f854d27
feat: left/right tooltips
dreamwasp 6dc46ae
Merge branch 'main' into cass-gm-1094
dreamwasp d136884
divide and conquer
dreamwasp 281e809
getting closer to styles
dreamwasp f7af321
start with styles
dreamwasp 7219b32
basic inline alignment
dreamwasp 2795a2e
getting closer to popover solution
dreamwasp 60d615d
tweak stories + removeuseEffects
dreamwasp b33f17f
starting to get things working with beak!
dreamwasp 176282c
popover working and major progress on types
dreamwasp 19778e0
somethings are broken but lets take a look
dreamwasp 4723158
center popovers working again
dreamwasp fa0ec5e
progress progress progress
dreamwasp 96b7e5a
center alignment added - need to tweak left beak
dreamwasp 61ce097
tweaked
dreamwasp e97306a
clean up + to-dos
dreamwasp a604386
review changes
dreamwasp fec78e3
fix margin changes
dreamwasp 712e9bd
widths sorted
dreamwasp 1a1f69d
widths sorted - need to fix InfoTip positioning
dreamwasp 0b51eee
more progress on inline - need to dedupe
dreamwasp 8385469
tempermental commit - revisit
dreamwasp 55c0a12
working styles - lots of restructure needed
dreamwasp a64b2b1
fixing more stuff
dreamwasp 60cf683
put hover isOpen back
dreamwasp 9d72f79
remove duplicated beak styles
dreamwasp 180375c
fix preview + infotip alignment
dreamwasp f5772cf
Merge branch 'main' into cass-gm-1094
dreamwasp 02ded10
turn on hover view + fix floating tooltip offset
dreamwasp bdf22ff
Merge branch 'cass-gm-1094' of ssh://github.com/Codecademy/gamut into…
dreamwasp 3c4f709
better ifs
dreamwasp 9e7c662
figure out whats up with inline center
dreamwasp 4ad8dc6
tooltip center alignments fixed
dreamwasp a1e443f
tweak to pass build + start testing against mono + monolith
dreamwasp 834b3b3
remove unneeded item in alignement arr
dreamwasp 7640e39
merge in main
dreamwasp 260d757
fix popover beak
dreamwasp 02d097e
add tooltip storybook controls
dreamwasp 9ebeec7
fix floatingToolTip offset + story
dreamwasp 39f2813
merge in main
dreamwasp a34a888
remove hard-code;
dreamwasp ea2ce0c
finishing touches!
dreamwasp fc6a150
add better comments
dreamwasp f1a007e
Merge branch 'main' into cass-gm-1094
dreamwasp d5ff390
kenny feedback
dreamwasp 1f69b68
add a beak
dreamwasp f4c7550
to a
dreamwasp ef2a570
rename to position
dreamwasp 77d2398
Merge branch 'main' into cass-gm-1094
dreamwasp 1b7e7ef
fix popover + more stories
dreamwasp 4cb7302
merge in dev
dreamwasp 840ee93
formatted
dreamwasp a19a79d
fix beak type
dreamwasp aebc3a5
split popover into more reasonable files
dreamwasp fe5bc3e
fix iconbutton test
dreamwasp 59b09cd
Merge branch 'main' into cass-gm-1094
dreamwasp 6123cc5
fix popover stories
dreamwasp 4b60e0b
fixed right center popover story"
dreamwasp 791033a
fixed
dreamwasp f4891e7
Merge branch 'main' into cass-gm-1094
dreamwasp 85045f8
more reasonable naming conventions
dreamwasp 76a7894
Merge branch 'cass-gm-1094' of github.com:Codecademy/gamut into cass-…
dreamwasp 3e6e01c
sort imports
dreamwasp 3b19e7c
facepalm
dreamwasp 946a38c
Merge branch 'main' into cass-gm-1094
dreamwasp 390a806
fixed center-left
dreamwasp 05ec7b6
Merge branch 'cass-gm-1094' of github.com:Codecademy/gamut into cass-…
dreamwasp cf44b38
remove console.log
dreamwasp 446ef42
Merge branch 'main' into cass-gm-1094
dreamwasp 5515e68
fix offsets
dreamwasp 6d043d1
Merge branch 'main' into cass-gm-1094
dreamwasp f1462e4
fix tip color for darkmode
dreamwasp df50168
Merge branch 'cass-gm-1094' of github.com:Codecademy/gamut into cass-…
dreamwasp eece796
remove isOpen test
dreamwasp a98e1b8
make new function
dreamwasp ac2902c
use default offset func
dreamwasp 383e5d2
removed after from shared style names
dreamwasp f8fc411
remove after
dreamwasp 8ea380f
remove old story
dreamwasp 799b38b
whoops
dreamwasp 8308807
kenny nits
dreamwasp 3ab9c9d
refactor to transform instead of changing bgcolor 💡
dreamwasp 149e5e8
rename func
dreamwasp c650966
Merge branch 'main' into cass-gm-1094
dreamwasp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { states, variant } from '@codecademy/gamut-styles'; | ||
|
|
||
| import { toolTipBodyCss } from '../../Tip/shared/styles/styles'; | ||
|
|
||
| export const borderStyles = { border: 1 } as const; | ||
| export const popoverPrimaryBgColor = `background`; | ||
|
|
||
| /** | ||
| * For the Popover + Tooltip style files: | ||
| * | ||
| * 'above' + 'below' map to position, 'top' + 'bottom' map to beak alignment | ||
| * variants for both follow this formula: `position`-`beakPosition` | ||
| * Popovers additionally will have `-sml` added to the end of this string if they are the `secondary` variant | ||
| * | ||
| */ | ||
|
|
||
| export const transformValues = { | ||
| right: 'translateX(-100%)', | ||
| left: 'translateX(0%)', | ||
| above: 'translateY(-100%)', | ||
| below: 'translateY(0%)', | ||
| center: '', | ||
| }; | ||
|
|
||
| export const popoverStates = states({ | ||
| widthRestricted: { | ||
| minWidth: '4rem', | ||
| maxWidth: '16rem', | ||
| }, | ||
| }); | ||
|
|
||
| export const raisedDivVariants = variant({ | ||
| base: { | ||
| zIndex: 1, | ||
| }, | ||
| defaultVariant: 'primary', | ||
| variants: { | ||
| primary: { | ||
| bg: popoverPrimaryBgColor, | ||
| borderRadius: 'sm', | ||
| }, | ||
| secondary: { ...toolTipBodyCss }, | ||
| }, | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.