-
Notifications
You must be signed in to change notification settings - Fork 11
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
PoC: uploading files to nextcloud #278
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: grnd-alt <[email protected]>
e05b3b8
to
e26b418
Compare
Signed-off-by: grnd-alt <[email protected]>
c6db63d
to
b7c29c8
Compare
Signed-off-by: grnd-alt <[email protected]>
b7c29c8
to
2aea305
Compare
(@nextcloud/designers do you have input for the file element?, we can use any excalidraw element to display the file, but no html, maybe you can create a design in excalidraw?) |
@grnd-alt what is needed here exactly? Could you give a bit more context? |
Update after call with @grnd-alt
|
add designed download button Signed-off-by: grnd-alt <[email protected]>
src/files/files.ts
Outdated
if (Date.now() - lastPointerDown > 200) { | ||
lastPointerDown = Date.now() | ||
return | ||
} else { | ||
lastPointerDown = Date.now() | ||
} | ||
this.downloadFile(clickedElement.customData.meta) |
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'm not sure if double click is what we should do here, was rather confusing to me in the first run. We talked about a popup to download the file, maybe that is something to reconsider when we cannot easily have a nice button click behaviour.
Could also be a small bar at the bottom maybe if the "file node" is selected similar to https://m1.material.io/components/snackbars-toasts.html# with a dedicated Download button?
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 that the popup is the best option for now. The snack bar is great for mobile devices but I'm worried that it wouldn't work well on larger displays.
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.
@marcoambrosini
I've now implemented it using the toast messages we already have in nextcloud when you click on them the file is downloaded... I don't think it's the best solution, but we can't draw entirely over the canvas with a popup or something because the file-elements are not movable anymore if something is in front of them. Do you think we should design a small new popup or stick with the nextcloud toast message as in the screenshot?
Signed-off-by: grnd-alt <[email protected]>
Signed-off-by: grnd-alt <[email protected]>
Signed-off-by: grnd-alt <[email protected]>
Signed-off-by: grnd-alt <[email protected]>
Signed-off-by: grnd-alt <[email protected]>
Proof of concept to show how we could intercept the excalidraw drag'n'drop handling to support more filetypes.
Current state:
Drag and drop from explorer into whiteboard.
image file supported by excalidraw -> normal image render
other filetype -> filename + icon
on click on other filetypes -> sidebar opened with download button