feat: view Collections on profiles, notifications, and a new Collections page - #3685
Conversation
✅ Deploy Preview for elk-docs canceled.
|
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Exciting! 🚀 |
|
I've refined notification page styles and updated the Issue description. It's ready to review! 🙂 |
| }, | ||
| "error": { | ||
| "account_not_found": "Account {0} not found", | ||
| "collection_not_found": "Collection not found", |
There was a problem hiding this comment.
Maybe we can add a new key collections_not_supported for "This server doesn't support collections." -- when the collections endpoint gives us Error404, it means the server doesn't have the feature
| </div> | ||
| </div> | ||
| </template> | ||
| <template v-else-if="notification.type === 'added_to_collection' && notification.collection"> |
There was a problem hiding this comment.
We can reduce the big block here by collapsing to one v-else-if like so:
<template
v-else-if="(notification.type === 'added_to_collection'
|| notification.type === 'collection_update') && notification.collection"
>
<NuxtLink :to="getCollectionRoute(notification.collection)">
<div flex="~ col" p4 bg-shaded gap-3>
<div flex>
<div i-ri:shapes-line text-xl me-3 color-blue />
<AccountHoverWrapper :account="notification.account">
<!-- ...unchanged... -->
</AccountHoverWrapper>
<!-- the only line that differs -->
<span>{{ notification.type === 'added_to_collection'
? $t('notification.added_you_to_collection')
: $t('notification.collection_updated') }}</span>
</div>
<!-- ...collection name + description block, unchanged... -->
</div>
</NuxtLink>
</template>|
I also found a few things that are better in a next PR. I was looking into the |
Co-authored-by: ayo <ayo@ayco.io> Signed-off-by: TAKAHASHI Shuuji <id@shuuji3.xyz>
Signed-off-by: TAKAHASHI Shuuji <id@shuuji3.xyz>
|
Sorry, it took while to implement "collection not supported" message fallback in the profile page but finally managed to show it.
Hmm, Mastodon Collections API might handle self-account differently? 🤔 Let me check what is actually returned. |
Signed-off-by: TAKAHASHI Shuuji <id@shuuji3.xyz>
|
OK, it's now fixed. It returns a list of accounts where the first item if the owner of the collection. The previous code didn't assume the case where the owner is appeared in an array twice and just filtered out all owner Account objects. 😅 |
|
Ah, one more thing @shuuji3 we need to hide "No collections yet." if there is a collection
|
Signed-off-by: TAKAHASHI Shuuji <id@shuuji3.xyz>
|
Oops, I just fixed that too 🙏🏻 |
c6d41d4 to
273d658
Compare




resolve #3662
This is initial implementation of feature collections. This PR mainly covers basic collections view. The edit feature is out of scope.
Screenshots