kiwix / kiwix-desktop

Kiwix for Windows and GNU/Linux desktops
https://download.kiwix.org/release/kiwix-desktop/
GNU General Public License v3.0
766 stars 100 forks source link

Tune search suggestions overlay #413

Open kelson42 opened 4 years ago

kelson42 commented 4 years ago

Here is how it should looks like (from the mockup):

image

Without implementing everything now, I want:

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

kelson42 commented 2 years ago

For the "endless" suggestion, @juuz0 has given this link as POC https://doc.qt.io/qt-5/qtwidgets-itemviews-fetchmore-example.html

ShaopengLin commented 2 months ago

@kelson42 This is a visual mockup using C++ code showing we can achieve the behavior. Internal code will just be creating the endless model and retrieving the icons from zim URLs. Screenshot from 2024-08-11 12-33-49

kelson42 commented 2 months ago

@ShaopengLin This sounds like a good start, I guess you will have to work on the CSS to have exac;tly the good rendering. What about the settings on the right? You need to have a way to easily allow the user to choose on which ZIM file he wants to run the search.

ShaopengLin commented 2 months ago

@kelson42 I think this Issue's description doesn't include multi-zim. We either combine #315 or add #315 as follow up.

kelson42 commented 2 months ago

@ShaopengLin Oh! Right now I don't understand (anymore) why we have two tickets! But both tickets are about multizim because otherwise it does not make sense to display ZIM icons. We probably should implement both together (I will give me a few days, but if I still can not remember why I have open two tickets, I will close one of them as duplicate).

ShaopengLin commented 2 months ago

@kelson42 Sounds good. The checkbox from #315 can be done similarly. I will go ahead and tackle this issue as next step then.

ShaopengLin commented 2 months ago

@kelson42 We have multi-zim search but don't believe we have multi-zim suggestion. How should we do manual interleaving to the suggestions results from each zim searched? Would like your opinion on this.

kelson42 commented 2 months ago

@ShaopengLin You are perfectly fine, I had forgotten about this "detail". The full implementation of this issue is blocked by https://github.com/kiwix/libkiwix/issues/479. In the meantime, please implement fully this ticket modulo the fact that you replace checkbox in the ZIM selection by radiobox (so only one ZIM can be selected at a time) @veloman-yunkan Would you be able to implement https://github.com/kiwix/libkiwix/issues/479 to make suggestion multizim ready? That would unblock in the issue.

kelson42 commented 2 months ago

@ShaopengLin Here the mockup for the ZIM selector: image image

ShaopengLin commented 2 months ago

Edit: I eventually found the stylesheet is due to minute detail in QCompleter's internal implementation. All Good and sorry for the debugging pain. They did not mention they assign new delegates to Views at setPopup, which resets their style.

~@veloman-yunkan @mgautierfr I have a question about ContentManager's model/view. The CSS ::item subcontrol works on the contentmanagerview but it doesn't apply on views attached to QCompleter (I am working on improving the search bar completer). I am wondering if we made any special changes to allow for css styles onto individual items of the view? This problem doesn't exist on Qt6.~

~It would be best if we can just use CSS for the QCompleter Styling. If not, I believe the only way is to make a special drawing delegate for Qt5 only.~

kelson42 commented 2 months ago

@ShaopengLin I can't answer to your technical questions, but if getting things working fine on Qt5 needs significant additional work, then this is fine if the full feature is only available with Qt6.

ShaopengLin commented 2 months ago

@kelson42 Things works in Qt5, only the styling is the issue. Without it we loss a tiny bit of UI consistency in Qt5. The additional work isn't significant but I don't want to add unnecessary redundancy. It will also be easier to edit in the future if things are in CSS.

ShaopengLin commented 2 months ago

@kelson42 This is more of a design decision qeustion:

The POC comment loads the content whenever the user scrolls to the end. Do we want that or a "load more" button for the user to click or press for the endless? I don't think browser users are used to mouse action and auto loading (since Chrome searches uses naive paging..). This could more easily signal that there are more to come.

veloman-yunkan commented 1 month ago
  • "Endless" suggestion

I doubt the usefulness of endless suggestions (openzim/libzim#728 has been filed based on that point of view). From a usability perspective, suggestions don't make sense above what can be observed in a single glance. OK, I admit that if the user doesn't remember anything but a single word from the phrase that she is trying to recall he may resort to scrolling through the full list of matches. However, although the range of human patience is quite vast, I don't think that we should encourage infinite scrolling.

Another potential use of endless suggestions is exploring the content rather than searching for something specific (e.g. let's find out how common "qwerty" is in the article titles). However this would be an abuse of the functionality provided by infinite scrolling and beyond the primary use of suggestions.

We can instead increase the limit on the number of suggestions shown, but otherwise keep the suggestion system aimed at users wishing to find something specific. If we want to support content exploration we should design a separate UI for it.

kelson42 commented 1 month ago

From a usability perspective, suggestions don't make sense above what can be observed in a single glance. OK, I admit that if the user doesn't remember anything but a single word from the phrase that she is trying to recall he may resort to scrolling through the full list of matches. However, although the range of human patience is quite vast, I don't think that we should encourage infinite scrolling.

@veloman-yunkan I disagree and I don't see how not using it impairs your UX. If you have a serious concern about the UX, I recommend to open an other issue as this has been requested in the issue since very long and this is now a bit late and I don't want to reboostrap this here.

veloman-yunkan commented 1 month ago

@kelson42 My point was not about impaired UX. I am concerned about the implementation complexity due to the more sophisticated UI.

kelson42 commented 1 month ago

@kelson42 My point was not about impaired UX. I am concerned about the implementation complexity due to the more sophisticated UI.

@veloman-yunkan We will discuss soon the libzim part of the problem because this is scheduled for the next release. Here, we will have to go with rhis for the moment I guess except if you have a feature-iso alternative in mind?