-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add tooltips to the note detail toolbar #599
Add tooltips to the note detail toolbar #599
Conversation
}: NoteDetailFolderNavigatorProps) => { | ||
interface FolderNavItemProps { | ||
path: string | ||
children?: React.ReactNode |
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.
Should not accept children
noteFolderPathname, | ||
}: NoteDetailFolderNavigatorProps) => { | ||
interface FolderNavItemProps { | ||
path: string |
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.
storageId, storageName, noteId, noteFolderPathname are already resolved from parent component. We don't need to parse again. It will make our app slower.
? getFolderTooltip(folderName) | ||
: getStorageTooltip(storageName) | ||
|
||
const isActive = |
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.
active
return ( | ||
<FolderNavItemButton | ||
title={tooltip} | ||
href={path} |
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 a button, not an anchor element
|
||
const tooltip = folderName | ||
? getFolderTooltip(folderName) | ||
: getStorageTooltip(storageName) |
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 a folder nav item, not a storage item.
> | ||
{storageName} | ||
</FolderNavItem> | ||
<FolderNavItem path={`/app/storages/${storageId}/notes/${noteId}`} /> |
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'd like to introduce another component
I'll resolve the change requests by myself! Thanks for contributing! |
See #552