-
Notifications
You must be signed in to change notification settings - Fork 4
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: minimap active state #263
Changes from 6 commits
5392da5
3b26cd7
1199ad0
0881f70
b9ab23e
5784cee
2284007
a84d8e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
/* disabled general */ | ||
.svg-linker-root__button.svg-linker-root__button--disabled { | ||
cursor: default; | ||
} | ||
|
||
/* disabled variant-regular */ | ||
.svg-linker-root__button.svg-linker-root__button--disabled.svg-linker-root__button--regular rect:first-child { | ||
fill: transparent; | ||
stroke: var(--color-border); | ||
|
@@ -15,6 +17,8 @@ | |
fill: transparent; | ||
} | ||
|
||
|
||
/* disabled - variant: shadow */ | ||
.svg-linker-root__button.svg-linker-root__button--disabled.svg-linker-root__button--drop-shadow > g > g > rect { | ||
fill: var(--mp-brand-secondary-3); | ||
} | ||
|
@@ -27,6 +31,7 @@ | |
filter: none; | ||
} | ||
|
||
/* disabled - variant: black */ | ||
.svg-linker-root__button.svg-linker-root__button--disabled.svg-linker-root__button--black rect:first-child { | ||
fill: var(--mp-brand-secondary-6); | ||
} | ||
|
@@ -35,14 +40,30 @@ | |
fill: var(--mp-brand-secondary-6); | ||
} | ||
|
||
/* general - variant: shadow */ | ||
.svg-linker-root__button.svg-linker-root__button--drop-shadow:hover { | ||
filter: drop-shadow(0px 9px 28px rgba(0, 0, 0, 0.05)) drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.12)) drop-shadow(0px 6px 16px rgba(0, 0, 0, 0.08)); | ||
} | ||
|
||
/* general - variant: black */ | ||
.svg-linker-root__button.svg-linker-root__button--regular:hover rect:first-child { | ||
fill: var(--mp-brand-primary-2); | ||
} | ||
|
||
.svg-linker-root__button.svg-linker-root__button--black:hover rect:first-child { | ||
fill: var(--mp-brand-secondary-7); | ||
} | ||
|
||
/* for the active state */ | ||
.svg-linker-root__button--active > g > rect + rect { | ||
stroke: var(--mp-brand-primary-6); | ||
stroke-width: var(--line-width-bold) | ||
} | ||
|
||
/* some fixes so the shadow on hover looks good without changing the svg */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question Is this going to break when we change the SVG? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if they make edits on the minimap following the current svg, it should be good... |
||
#clip0_5505_13516 { | ||
display: none; | ||
} | ||
#Frame\ 481773 > #Frame\ 481772 > rect { | ||
display: none; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react' | ||
|
||
export const minimap = ( | ||
<svg width="385" height="374" viewBox="0 0 385 374" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<svg width="385" height="374" viewBox="0 0 385 374" fill="none" xmlns="http://www.w3.org/2000/svg" className="u-overflow-visible"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question How are we going to remember to keep this here when we replace the SVG? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can add it though css maybe its better |
||
<g id="mini map content" clipPath="url(#clip0_5505_13516)"> | ||
<rect width="385" height="374" fill="white" /> | ||
<g id="Frame 481773" clipPath="url(#clip1_5505_13516)"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this will work in CDP, because I believe the MiniMap is been unmounted and mounted again when switching suites (would need to confirmate)
If that's true, you probably need to receive the
active
as a prop, probably as a field in the link objThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, when opening/refreshing the app using the full URL, you will not set the active suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GlobalNav already knows the current route. We don't have to couple to the Nav, but just like the Nav is getting the route, MiniMap should to. Because:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you're curious, this is where the current route comes from, and it updates whenever the route changes.