-
Notifications
You must be signed in to change notification settings - Fork 5
feat: shreds slot labels #151
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
base: amliu/navigation1
Are you sure you want to change the base?
Conversation
a82c21e to
ebd5a6d
Compare
2cd592b to
0e728a3
Compare
src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts
Outdated
Show resolved
Hide resolved
src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts
Outdated
Show resolved
Hide resolved
src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts
Outdated
Show resolved
Hide resolved
src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts
Outdated
Show resolved
Hide resolved
src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts
Outdated
Show resolved
Hide resolved
cb6e063 to
609e5d3
Compare
609e5d3 to
7ab605a
Compare
a11b865 to
c528ff6
Compare
| background-color: #080b13; | ||
| border-radius: 2px; | ||
| border: 1px solid #3c4652; | ||
| will-change: transform, width; |
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.
why is width needed here and below?
|
|
||
| const uplotRef = useRef<uPlot>(); | ||
| const lastRedrawRef = useRef(0); | ||
| const labelPositionsRef = useRef<LabelPositions>(); |
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.
don't get why we need this ref? This isn't used anywhere but the plugin right?
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.
This is so I can compare the last + current draw label positions, and not update width / x position if it hasn't changed
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.
but why a ref vs just making some vars in your plugin? Since you're not consuming the ref from anywhere outside the plugin
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.
or are you re-initializing your plugin and you need a stable reference?
| overflow="hidden" | ||
| position="relative" | ||
| // extra space for borders | ||
| height={`${height + 2}px`} |
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.
changing box sizing to border-box would work too i think?
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.
It doesn't seem to work with position: absolute 😢
No description provided.