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
feat(web): better UX when creating a new album #8270
feat(web): better UX when creating a new album #8270
Conversation
9d12c50
to
bb721cb
Compare
The way this pattern works in google photos is a notification is shown, which has a button/link you can click to "View X". Our actions already have the ability to perform and action when they are clicked, so maybe that would be a better implementation. |
That would indeed be way better, less intrusive. However it seems notification cards cannot display a button (unlike Google Photos' ones), they can only be clickable, without any obvious hint to the user. I'll add a way to display a button then. |
It would be nice to se new album name instead of "to new album" in the toast as well. Added 11 assets into My new album |
I edited the PR description. The notification card now looks like this when a button is added: To do this: notificationController.show({
// ...
action: {
type: 'link',
button: 'Button Text',
target: '/route/stuff'
}
}); If the |
Looks great but can it be View Album instead? |
Yep, done! |
web/src/lib/components/shared-components/notification/notification.ts
Outdated
Show resolved
Hide resolved
button: { | ||
text: 'View Album', | ||
onClick() { | ||
return goto(`${AppRoute.ALBUMS}/${albumId}`); | ||
}, |
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.
Nice! This looks pretty clean to me. Although you could also do:
onClick: () => goto(...)
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.
LGTM. I can try to test it out later unless someone picks it up first.
This PR fixes something if find annoying:
Imagine you are sorting your thousands of photos into albums. You select
Add to... > Album
, then using the modal, you create a new album. You will be redirected to this album without being prompted. Now you have to go back and find yourself at the top of the "Photos" page, and have scroll again thousands of photos to where you previously were.To fix this, a notification is now sent when adding assets to a new album, with a "View Album" button:
I also updated the search function to ignore accents: