Skip to content

feat: add link to file location#13285

Open
steven-mpawulo wants to merge 5 commits into
nextcloud:mainfrom
steven-mpawulo:feature/13166-add-link-to-file-location
Open

feat: add link to file location#13285
steven-mpawulo wants to merge 5 commits into
nextcloud:mainfrom
steven-mpawulo:feature/13166-add-link-to-file-location

Conversation

@steven-mpawulo

@steven-mpawulo steven-mpawulo commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Adds a clickable link to the saved file's location in the confirmation shown after saving a message attachment to Files.
Fixes #13166

Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
@steven-mpawulo steven-mpawulo changed the title feat: 13166-add-link-to-file-location feat: add link to file location Jul 13, 2026
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
@GretaD

GretaD commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

it works well, but i think it should not be a link that is shown on the popup, but maybe something like - Attachement saved to Files - Go to Files (and this has the link)

Screenshot from 2026-07-14 12-53-18

Gmail has this option:

Screenshot from 2026-07-14 12-51-01

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

Hello @GretaD
Great suggestion.
Let me update.

@steven-mpawulo steven-mpawulo self-assigned this Jul 14, 2026
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
Comment thread src/components/MessageAttachment.vue Outdated
Comment on lines +243 to +248
showSuccess(t('mail', '<div><p>Attachment saved to files</p><p><strong><u>Go to Files</u></strong></p></div>'), {
isHTML: true,
onClick: () => {
window.open(fileLocationUrl, '_blank')
},
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have the impression that this is problematic for accessibility. Is there any way to display a real anchor element that appears clickable (also for screen readers) and has the native _blank target without a JavaScript handler?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You're absolutely right the onClick/window.open approach won't be announced as a link by screen readers. It'd be best to use a real anchor tag instead. Let me update.

Comment thread src/components/MessageAttachment.vue Outdated

showSuccess(t('mail', `Attachment saved to Files
${fileLocationUrl}`), {
showSuccess(t('mail', '<div><p>Attachment saved to files</p><p><strong><u>Go to Files</u></strong></p></div>'), {

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.

"Files" has to be capitalized to indicate the app.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ohh, I hadn't seen that.
I'm modifying.

Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
Comment thread src/components/MessageAttachment.vue Outdated
dir: saved?.path,
})

showSuccess(t('mail', '<div><p>Attachment saved to Files</p><p><a href="{fileLocationUrl}" target="_blank" rel="noopener noreferrer"><strong><u>Go to Files</u></strong></a></p></div>', {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a tricky string for translators. I suggest to translate Attachment saved to Files and Go to Files without any HTML and build the HTML with these two translated strings. Don't forget to run them through HTML encoding so any special characters are handled.

…ion toast

Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add link to file location in confirmation dialog

3 participants