-
Notifications
You must be signed in to change notification settings - Fork 428
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: archive conversations (frontend) #13358
base: main
Are you sure you want to change the base?
Conversation
5538bee
to
a807cbc
Compare
a807cbc
to
34392f4
Compare
Signed-off-by: Maksim Sukharev <[email protected]>
Signed-off-by: Maksim Sukharev <[email protected]>
34392f4
to
1e76d5f
Compare
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.
Functionality is good but a few notes about how we will implement it in LS.
|| (conversation.notificationLevel === PARTICIPANT.NOTIFY.ALWAYS && hasUnreadMessages(conversation)) | ||
|| (conversation.notificationLevel === PARTICIPANT.NOTIFY.MENTION && hasUnreadMentions(conversation)) |
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.
notification level can be ALWAYS
or (DEFAULT
and it is 1-1 conv) for unread messages
can be ALWAYS
or DEFAULT
or MENTION
for unread mentions
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.
I think we discussed to not make it dependant on the level for now? Direct mention will show it again, regardless of notification setting ?
@@ -904,7 +927,7 @@ const actions = { | |||
async setNotificationLevel({ commit }, { token, notificationLevel }) { | |||
try { | |||
await setNotificationLevel(token, notificationLevel) | |||
commit('setNotificationLevel', { token, notificationLevel }) | |||
commit('setNotificationLevel', { token, notificationLevel: +notificationLevel }) |
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.
Was there an issue you noticed?
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.
Yes, we receive a number from server, and change it to string then update
await archiveConversation(token) | ||
} | ||
|
||
const conversation = Object.assign({}, getters.conversations[token], { isArchived: !isArchived }) |
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.
const conversation = Object.assign({}, getters.conversations[token], { isArchived: !isArchived }) | |
const conversation = { | |
...getters.conversations[token], | |
isArchived: !isArchived | |
} |
@@ -45,6 +45,15 @@ | |||
{{ t('spreed', 'Filter unread messages') }} | |||
</NcActionButton> | |||
|
|||
<NcActionButton close-after-click |
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.
Capability support check?
<NcButton v-if="isFiltered" | ||
type="tertiary" | ||
wide | ||
@click="handleFilter(null)"> | ||
<template #icon> | ||
<FilterRemoveIcon :size="20" /> | ||
</template> | ||
{{ t('spreed', 'Clear filters') }} | ||
</NcButton> | ||
<NcButton v-else | ||
type="tertiary" | ||
wide | ||
@click="handleFilter('archived')"> | ||
<template #icon> | ||
<IconArchive :size="20" /> | ||
</template> | ||
{{ t('spreed', 'Archived conversations') }} | ||
</NcButton> |
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.
I am not sure if we need another clear filter button here.
Yet, Archived conversations should be shown ONLY if there are archived ones indeed.
I think you put filter button here so it undoes what archived conversation button do? in that case, we show return to conversations
or sthg like that (we don't show to user this feature as a filter but as another page/tab in left sidebar ;) ). Also, we won't show it in filters action.
☑️ Resolves
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
🏁 Checklist