deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
952 stars 170 forks source link

Search should only search non archived #396

Closed ralphtheninja closed 5 years ago

ralphtheninja commented 5 years ago

Currently the search functionality also searches archived chats, so it's possible to search and then select an archived chat, but when you delete the search query (backspace) the chat goes away. I think we should limit the search to the active chat list, e.g. search only non archived or search archived.

r10s commented 5 years ago

i think the global search should search unarchived chats as well as archived chats (in fact, in the mid-term, it would be great if also contacts and messages are searched).

i would also not make a difference if the global search is started from the archived list or from the normal list.

the archived state is a rather weak state, eg. chats are automatically unarchived when new messages come in. so i think it would be confusing if chats/messages are found or not depending on this state.

however, i understand the ui problem.

but maybe we can just ignore it and mitigate the issue by clearly showing the that chat is an archived chat - in android, we show the text [Archived] below the date for archived chats (instead of the delivery indicators).

this way, the user at least knows where he can find the chat.

okdistribute commented 5 years ago

makes sense. I am going to label this as a feature not a bug then.

ralphtheninja commented 5 years ago

I don't mind that the search is also quering archived chats, I'm more against the ui quirk, where when you delete your search (after have selected an archived chat) makes the chat disappear. I'm thinking we just need to tweak the ux a bit.

r10s commented 5 years ago

maybe it is totally sufficient to not change the selected search when the chat list changes. i would recommend to make the chatlist from the selected chat anyway. i think there may be situations where a strict requirement that the selected chat has to be in the chatlist may cause problems esp. on multi-device.

together with an "archived" label in the chatlist everything should be fine imo, this is how the label looks like on android (btw. the screenshot was transferred using deltachat-android and deltachat-desktop :). image-5

Simon-Laux commented 5 years ago

I think we need a better way of displaying search results, maybe using the chatview and having the search results temporarily taking up a slot in the chatsList.

Also advanced searches with filters like from:[name] would be awesome, but that's an idea for the future. (Discord has a good UI for those searches - it makes visible what filters belong together and gives you a drop-down menu with suggestion)

r10s commented 5 years ago

hm, i think showing the search results on the left instead of the chatlist is okay, at least for now. i would think of it as a filter of the chatlist. however, of course this can be improved, but i think for now it is fine :)

okdistribute commented 5 years ago

Yeah I agree, keeping it in the chatlist makes sense for now.

nicodh commented 5 years ago

I would propose: rename the "search" to "filter" which makes it more obvious that only the current list (archived or non archived chats) is filtered. Later we should have a real search which searches in chats, contacts and messages

Jikstra commented 5 years ago

This is actually a missing feature in the core. The core only allows to search if we we're not filtering for archived chats.