Conversation
|
Cloudflare Pages Preview https://7a69453c.notesnook-app.pages.dev Commit: d81bc08 |
|
Desktop Previews Commit: d81bc08 |
thecodrr
left a comment
There was a problem hiding this comment.
This is a good implementation but I am left wondering about the actual utility of a specially designed batch attachment dialog instead of just using the TaskManager to show progress for multiple attachments. The only difference I see is the ability to toggle compression for each attachment separately but I think we can just add support for multiple files in our ImagePickerDialog.
That will simplify a lot of things without us having to change the whole attachment flow.
| yield { | ||
| type: "error", | ||
| index: i, | ||
| error: (e as Error).message || "Compression failed" |
| export async function attachFiles( | ||
| export async function attachFilesWithBatchDialog( | ||
| files: File[], | ||
| editorId: string, |
There was a problem hiding this comment.
I don't think we should couple the editor logic with this. The previous behavior of returning the attachments array was good. That allowed the user of attachFiles to decide what to do with the attachments.
There was a problem hiding this comment.
The new attachFiles still returns only the attachments. I added the editor coupling to pass the editorId to the dialog as I wanted to have the editor.attachFile happen inside the dialog rather than outside of it
There was a problem hiding this comment.
Let's keep the editor logic outside. It'll keep things explicit.
I did not think about that, will look into it
that is true, when a user uploads multiple images, the ImagePickerDialog can be repurposed to support multiple entries But when user uploads different kind of attachments in bulk, the experience could still be fragmented with these changes suggested. Imagine a user uploads 2 images and 3 text files, the ImagePickerDialog will first open to ask for compression, and then the TaskManager's dialog will open for encryption. With a unified dialog, we can provide a consistent UX |
1257170 to
fcbf6c0
Compare
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi <[email protected]>
Signed-off-by: 01zulfi <[email protected]>
4e905a9 to
b37e7b4
Compare
Signed-off-by: 01zulfi <[email protected]>
Description
This PR improves the UX of attaching bulk attachments by showing a unified dialog with all states of the attaching progress. Single files will also be attached through this flow. Encryption and attaching to editor hasn't been changed as well.
Example of the new dialog: (compression & encryption manually throttled)
notesnook.mp4
Type of Change
Visuals
Testing
If tests were not added, explain why
Platform
Sign-off