Skip to content

web: improve attaching attachments UX#9718

Open
01zulfi wants to merge 5 commits intomasterfrom
web/improve-bulk-attachment-attach-ux
Open

web: improve attaching attachments UX#9718
01zulfi wants to merge 5 commits intomasterfrom
web/improve-bulk-attachment-attach-ux

Conversation

@01zulfi
Copy link
Copy Markdown
Member

@01zulfi 01zulfi commented Apr 16, 2026

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

  • Bug fix
  • Feature

Visuals

  • Attached relevant screenshots / screen recording / GIF
  • N/A (not a feature or no UI changes)

Testing

  • Ran all E2E tests
  • Ran all integration tests
  • Added/updated tests for this change (if needed)
  • N/A (tests not needed — explanation provided below)

If tests were not added, explain why

Platform

  • Web
  • Mobile
  • Desktop

Sign-off

  • QA passed
  • UI/UX passed

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Cloudflare Pages Preview

https://7a69453c.notesnook-app.pages.dev

Commit: d81bc08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Desktop Previews

Commit: d81bc08

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@thecodrr thecodrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use intl strings here.

export async function attachFiles(
export async function attachFilesWithBatchDialog(
files: File[],
editorId: string,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the editor logic outside. It'll keep things explicit.

@01zulfi
Copy link
Copy Markdown
Member Author

01zulfi commented Apr 18, 2026

using the TaskManager to show progress for multiple attachments.

I did not think about that, will look into it

we can just add support for multiple files in our ImagePickerDialog.

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

@01zulfi 01zulfi changed the title web: improve attaching bulk attachments UX web: improve attaching attachments UX Apr 21, 2026
@01zulfi 01zulfi force-pushed the web/improve-bulk-attachment-attach-ux branch from 1257170 to fcbf6c0 Compare April 21, 2026 07:17
@01zulfi 01zulfi requested a review from thecodrr April 21, 2026 07:19
@01zulfi 01zulfi force-pushed the web/improve-bulk-attachment-attach-ux branch from 4e905a9 to b37e7b4 Compare April 27, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants