-
Notifications
You must be signed in to change notification settings - Fork 12
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 smartPicker for file embeddings #108
add smartPicker for file embeddings #108
Conversation
Edit: Removed the other comment as i missed the smart picker part from the screenshots, but the code makes it clear |
Looks great otherwise 👍 |
Signed-off-by: grnd-alt <[email protected]>
b3b681d
to
d874915
Compare
@juliushaertl I've hacked it a little bit so the button is in the tool bar. It is not supported by the lib to add custom elements to that bar. It is though, also required by some other people: excalidraw/excalidraw#7583 |
@@ -72,6 +76,16 @@ export default function App({ fileId, isEmbedded, fileName }: WhiteboardAppProps | |||
|
|||
if (excalidrawAPI && !collab) setCollab(new Collab(excalidrawAPI, fileId)) | |||
if (collab && !collab.portal.socket) collab.startCollab() | |||
useEffect(() => { | |||
const extraTools = document.getElementsByClassName('App-toolbar__extra-tools-trigger')[0] | |||
const smartPick = document.createElement('label') |
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.
Can we add a tooltip as well?
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.
Tooltip already exists for me because of the title attribute in renderSmartPicker
on line 188
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.
Very nice, works well, just had a few more polishing comments :)
Signed-off-by: grnd-alt <[email protected]>
d874915
to
a4160d4
Compare
resolves: #74
smart picker button top right (same icon as in text from material design)
open smart picker selecting files
multiple file embeddings added via smart picker