RFR: 8236935: Improve UX of the search control
Hannes Wallnoefer
HANNES.WALLNOEFER at ORACLE.COM
Fri Jun 19 15:54:03 UTC 2020
Thanks for the reviews, Jon!
> Am 18.06.2020 um 22:25 schrieb Jonathan Gibbons <jonathan.gibbons at oracle.com>:
>
> I played with the posted APIs again. It seems to be the case that the "loading" message only appeared briefly, for only as long as no search results are found. Once some results are found, even if not all have been found, the message goes away. After the message goes away, the search results may still get updated when other files have been loaded. It is reasonable to continue updates, but I think it would be nicer if the 'loading' message persisted until all the files have been loaded.
You are right, it’s a bit odd that the „loading…“ message goes away as soon as there are any search results.
My initial solution was to keep the message at the top of the results until the last index file had been loaded. However that caused the problem that the existing results would jump up one row when the message was removed after the last index file had been loaded. If the user had already started to select a result using the mouse pointer it would suddenly point to the wrong item.
Thinking about this some more now I realize the better solution might have been to append the „loading…“ message to the end of the results until all index files have been loaded. If you think that’s a viable solution I’ll update the webrev and upload noew API docs to give it a try.
Hannes
> The behavior I observe seems to be confirmed by this extract from the code:
>
> 311 if (result.length === 0) {
> 312 result.push(loading);
> 313 }
> Does it work to just remove the `if (expr)` ? It is already the case that this code is protected inside `if (!indexFilesLoaded()) ...`
>
> -- Jon
More information about the javadoc-dev
mailing list