Open BenoitTallandier opened 3 years ago
@romanesko technically speaking this is the workflow:
(1) On message is saved we push an object to elasticsearch with all the searchable fields. The message is missing information about the workspace_ids, company_ids and the channel_ids it is into, this information must be added just before it is pushed to elasticsearch (we can add a "cache" field for the messages like we did for the users entity).
(2) Then we apply filters to elasticsearch when running a message search
(3) Then for each messages in the result, the backend must verify the user has access to the channel the message is into
(4) And finally we return this to the frontend
The cache field will help us in the future add more fields that can be used as additional filters, also it helps us reduce the number of results from elastic search if we already have all the filters in elastic search.
Here is my proposal following our discussion this morning. "All" will be for later so the default view is "Discussions" (previously "Chats"). This is now a popup for web with the usual right "X" button to be consistant with the rest of the app. I did not modify anything else, but @romanesko please create reusable components for the new "icons" of channels, for now we will keep the emojis in the center of the circles instead of the first letter of the channel on web.
@BenoitTallandier please validate this (or not) and also we need an idea to choose if we are searching in:
Great job! It's ok for me 👏 We are searching in the current company :)
Tested on QA, for me I have a small issue when doing search and stern clear the input. I get fatal error something == null Of course I'm unable to reproduce it now as soon as I get it again I'll send you the image
Other bug, highlight for content with accent not working (we have a function in frontend utils to remove accents, simply do Strings.removeAccents(the string)
)
There is too many requests to the backend, you should use the utils function called delayRequest
in src/app/features/global/utils/managedSearchRequest.ts
@romanesko three stuff to fix on my 3 previous messages
Found the reason of fatal error — that's goes from elastic if you trying to search only one symbol. Fixed
done
Tested in canary: Houston error in some of the channel. Please check this channel for example https://canary.twake.app/client/bDxmFx1KPWhhJeetsVj12J/w/w31iupjuCFvvbf8ewYcYg7/c/hdqHJUcBH1cBWghSoFz93y
https://www.notion.so/linagora/Search-for-Web-89d99d8bf4c64e8aa63421efd02212d9
User story summary
Definition
Business case
Criteria
UI/UX Design
Notes
Related
Definition
Business case
Criteria
UI UX Design
https://www.figma.com/file/uLw3iWnOEGaRlJnfPz4Pv0/Twake.new?node-id=718%3A53947
Notes
Related