- Notifications
You must be signed in to change notification settings - Fork928
feat: Add "Outdated" tooltip and "Update version" button in the Workspaces page#2322
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
const helpTooltipContext = useContext(HelpTooltipContext) | ||
if (!helpTooltipContext) { | ||
throw new Error("This hook should be used in side of the HelpTooltipContext.") |
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.
❤️
Uh oh!
There was an error while loading.Please reload this page.
@@ -76,6 +84,78 @@ const WorkspaceHelpTooltip: React.FC = () => { | |||
) | |||
} | |||
const OutdatedHelpTooltip: React.FC<{ onUpdateVersion: () => void }> = ({ onUpdateVersion }) => { |
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 think this file is getting really big.
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.
Yes, it is but, for now, I think it is ok. What do you 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.
We can leave it for now. I want to talk about directory structure at the next FE Variety - maybe we can look at pulling stuff apart then.
Uh oh!
There was an error while loading.Please reload this page.
export const workspacesMachine = createMachine( | ||
{ | ||
tsTypes: {} as import("./workspacesXService.typegen").Typegen0, | ||
tsTypes: {} as import("./workspacesXService.typegen").Typegen1, |
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.
What's thisTypegen1
vsTypegen0
?
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 is auto-generated by XState types:https://xstate.js.org/docs/guides/typescript.html#typegen
export const HelpTooltip: React.FC<HelpTooltipProps> = ({ children, open, size = "medium" }) => { | ||
const styles = useStyles({ size }) | ||
const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null) | ||
open = open ?? Boolean(anchorEl) | ||
const id = open ? "help-popover" : undefined | ||
const onClose = () => { | ||
setAnchorEl(null) | ||
} |
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.
Seems like when I click to escape the tooltip, regardless of where I click, I am automatically routed to the workspace page. Sometimes I just want to close the tooltip without leaving the list. Could we suppress navigation on close?
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 think it is because you are clicking on a workspace row when you click outside of the tooltip.
Kira-PilotJun 15, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 does it even if I click somewhere else on the page. I think it is using the initial click into the tooltip to navigate.
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.
Pulled this down and it looks and works great!
Co-authored-by: Kira Pilot <kira@coder.com>
Chromatic deploys are failing, I reviewed the storybooks and they look good. I send a support message tosupport@chromatic.com. |
Demo:
https://user-images.githubusercontent.com/3165839/173636455-33c83eb3-2525-46cd-a198-6d9ec785eb81.mov
Important things:
updateWorkspaceRefs
Closes#2001