Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Automatic reloading of results does not work as expected #225

Closed
6 tasks done
ruKurz opened this issue Mar 17, 2018 · 19 comments
Closed
6 tasks done

Automatic reloading of results does not work as expected #225

ruKurz opened this issue Mar 17, 2018 · 19 comments
Assignees
Labels
Milestone

Comments

@ruKurz
Copy link
Collaborator

ruKurz commented Mar 17, 2018

bildschirmfoto_2018-03-17_um_07_33_42

Expected Behaviour

After scrolling down the search results, next results should be loaded dynamically.

Actual Behaviour

In some cases the lazy loading stops, even there are results left.

Steps to Reproduce

  1. Open a request
  2. Open the Smarti widget
  3. Make sure the "Close Chat" Button is displayed
  4. Scroll down the results

Observations

  • Most often I have observed this behavior in request mode
  • The result set should contain hits whose preview is displayed in different sizes.
  • The behavior occurs particularly frequently in search results of the Solr query builder.
  • A search query is made via XHR when scrolled to the very bottom, but no further results are displayed.
  • Even if the number of search hits found is reached, further search queries are executed. Example: numfound=13 but a Solr query with start=16 is executed
  • By fixing problem [Bug] Paging is missing #210, the number of hits is set to 6 (rows=6) on the client side by default to completely fill the hit display area. However, the hits per page are configured on the server side by design, whereby a separate value can be set for each Smarti client configuration. Therefore, the value for rows is always overwritten by the server-side configuration. (BTW: To fill the area of the result display completely, the available space for the hit display and the size of the individual results should be calculated/considered.
  • Since the the widget-footer is positioned absolute and overlays the widget-body, the scrollbar is behind the "Close Chat" button. Moreover the space between the "Close Chat" button and the results is much to large.

Acceptance criteria

  • the automatic reloading of results is triggered when the end of the results is reached
  • the presentation of the results in the UI is complete
  • it does not attempt to load further results if the number of hits found is already displayed in full.
  • initially, so many hits are always loaded that the available display area is fully utilized (provided there are enough hits).
  • the scrollbar is not covered by other elements (e.g. by the "Close Chat" button)
  • basic design decisions are taken into account in the client-side implementation (the page size should be configurable either server-side or client-side)

Environment

  • Smarti-Version: 0.7.0
  • Java-Version: 1.8
@ruKurz ruKurz added this to the v0.7.1 milestone Mar 17, 2018
@ruKurz ruKurz changed the title lazy result loading does in some cases Automatic reloading of results does not work as expected Mar 17, 2018
@ruKurz ruKurz added the ready label Mar 17, 2018
@Peym4n Peym4n added in progress and removed ready labels Mar 20, 2018
Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Mar 20, 2018
Peym4n pushed a commit that referenced this issue Mar 20, 2018
Peym4n pushed a commit that referenced this issue Mar 21, 2018
@Peym4n
Copy link
Contributor

Peym4n commented Mar 21, 2018

I removed the hard-coded minimum number of initial rows. The server-side config will always be used.
The widget can now detect if all the results are loaded already, and won't try to load more.
After loading the initial data, the widget will check if the results area is filled. If not, it will try to load more when remaining results exist.
And the results area is now fully shown and the lower part is not hidden behind the button anymore.

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 10, 2018

There are still some issues when automatically loading further results.

  • The displayed number of results does not fit the effective found results (solr response server numfound)
  • The number of results changes unexpectedly when the lazy loading is triggered
  • When scrolling to the very bottom of a large result list, there are displayed less results than number of results is displayed on top (client e.g. rendering)
  • Sometimes there is displayed 0 (zero) results even there are results shown
  • Sometimes the last search result is covered by the "Finish Conversation" button

@ruKurz ruKurz modified the milestones: v0.7.1, 0.7.2 May 10, 2018
@ruKurz
Copy link
Collaborator Author

ruKurz commented May 11, 2018

Sometimes there is displayed 0 (zero) results even there are results shown

bildschirmfoto_2018-05-11_um_09_43_11

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 11, 2018

The displayed number of results does not fit the effective found results.
When scrolling to the very bottom of a large result list, there are displayed less results than number of results is displayed on top

Here 71 results have been found:
bildschirmfoto_2018-05-11_um_09_47_25

After scrolling to the very bottom, there are displayed some 10 results (compare with 71):
bildschirmfoto_2018-05-11_um_09_47_37

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 11, 2018

Sometimes the last search result is covered by the "Finish Conversation" button.
And the scrollbar is covered by some elements.

bildschirmfoto 2018-05-11 um 09 54 59

@Peym4n
Copy link
Contributor

Peym4n commented May 11, 2018

Sometimes there is displayed 0 (zero) results even there are results shown

This has not happened to me. Is it reproducable?

After scrolling to the very bottom, there are displayed some 10 results (compare with 71)

The displayed number is the number of all available results which can be loaded by lazy loading, not the number of loaded results.

Sometimes the last search result is covered by the "Finish Conversation" button. And the scrollbar is covered by some elements.

Are you sure you are using the respective Rocket.Chat branch with the changes? (smarti-widget-0.7.1)
I already fixed this bug here.

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 11, 2018

All this can be reproduced on out test env where you have access to.

The displayed number is the number of all available results which can be loaded by lazy loading, not the number of loaded results.

Yes, I understand. But when 71 results are possible why does the lazy loading stop at round about 10?

Are you sure you are using the respective Rocket.Chat branch with the changes?

Yes I am. Have a look at our test env: smarti-0.7.2 and rc-0.63.3

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 11, 2018

Which browsers did you test?
And did you test the widget within the Rocket.Chat app?

@Peym4n
Copy link
Contributor

Peym4n commented May 14, 2018

Yes I am. Have a look at our test env: smarti-0.7.2 and rc-0.63.3

I checked the code on the test env and I couldn't find my rocket.chat changes.
So I think the changes are not merged yet. I will inform @mrsimpson.

@ruKurz
Copy link
Collaborator Author

ruKurz commented May 14, 2018

We have deployed the Smarti artifact from https://github.com/redlink-gmbh/smarti/releases/tag/smarti-0.7.1

So this is independent from RC version

@Peym4n
Copy link
Contributor

Peym4n commented May 14, 2018

And regarding the 0 results:
I checked the test env. This happens when the widget is not able to load the next page of the conversations. Sometimes after sending a request to the widget backend, the widget receives no response, which means that there has been a problem between rocket.chat and smarti.
Anytime that happens (some results are loaded but 0 is displayed) one should check the RC logs for errors to find out what went wrong.
@mrsimpson

When the displayed number is not 0 and no more results are loaded, it's most probably because of a horizontal scrollbar on the bottom which prevents lazy loading. That's a UI bug and I will fix it.

@westei westei modified the milestones: 0.7.2, v0.7.3 May 14, 2018
mrsimpson pushed a commit to assistify/Rocket.Chat that referenced this issue May 14, 2018
* Smarti-203: Flag widget messages
* Smarti-203: Rename widget message flag to skipAnalysis
* Smarti-52: Add support for edited messages
* redlink-gmbh/smarti#221: Set room topic as support area for conversation
* Revert "redlink-gmbh/smarti#221: Set room topic as support area for conversation"
 This reverts commit c7966a3.
* redlink-gmbh/smarti#225: Fix widget footer styling
* redlink-gmbh/smarti#220: Improve error handling
* SmartiWidgetBackend: Improve error handling
Peym4n pushed a commit that referenced this issue May 14, 2018
@westei westei modified the milestones: v0.7.3, v0.7.4 May 15, 2018
@Peym4n
Copy link
Contributor

Peym4n commented May 15, 2018

I'm working on an improved error handling in the widget.

Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue May 15, 2018
Peym4n pushed a commit that referenced this issue May 15, 2018
@ruKurz
Copy link
Collaborator Author

ruKurz commented Jun 4, 2018

The problems regarding the lazy loading behavior and the displayed result count are still persistent.
On our test env we have currently installed:

@Peym4n Can you please verify, that those versions include you expected changes?

@Peym4n
Copy link
Contributor

Peym4n commented Jun 12, 2018

@Peym4n Can you please verify, that those versions include you expected changes?

Yes, the changes are correctly deployed.

@Peym4n
Copy link
Contributor

Peym4n commented Jun 12, 2018

Referring to this comment:

The displayed number of results does not fit the effective found results (solr response server numfound).
When scrolling to the very bottom of a large result list, there are displayed less results than number of results is displayed on top (client e.g. rendering)

See #255

The number of results changes unexpectedly when the lazy loading is triggered

See #256

Closing in favor of new issues.

@ruKurz
Copy link
Collaborator Author

ruKurz commented Jun 12, 2018

I would like to let this issue opened until we have tested the upcoming release.

@ruKurz ruKurz reopened this Jun 12, 2018
@ruKurz
Copy link
Collaborator Author

ruKurz commented Jun 12, 2018

Moved the issue in: Needs Review
on: https://waffle.io/redlink-gmbh/smarti

@Peym4n
Copy link
Contributor

Peym4n commented Jun 12, 2018

@ruKurz ok. makes sense.

Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Jun 13, 2018
@ruKurz
Copy link
Collaborator Author

ruKurz commented Jun 13, 2018

There are still some issues when automatically loading further results.

  • When scrolling to the very bottom of a large result list, there are displayed less results than number of results is displayed on top (client e.g. rendering)
  • Sometimes there is displayed 0 (zero) results even there are results shown
  • Sometimes the last search result is covered by the "Finish Conversation" button

Consider open points, that are not yet tested as done within this issue:

  • The displayed number of results does not fit the effective found results (solr response server numfound)
  • The number of results changes unexpectedly when the lazy loading is triggered

Those will be continued here:

@ruKurz ruKurz closed this as completed Jun 13, 2018
@ruKurz ruKurz removed the in review label Jun 13, 2018
ruKurz added a commit to assistify/Rocket.Chat that referenced this issue Jun 14, 2018
* Fixing #345 - where outdated conversation id could not be found in smarti

* Made serveral changes regarding the review.
Added an admin option to re-synch completely.

* Remove conversations from mapping cache, if a room is being ereased.
Ordered private dunctions and added some comments.

* Fixed i18n keys.

* Get analysis and notify room after deleting a message.

* Removed rate limiter and explicitly perform an conversation analysis.

* Fixed several synchronisation issues related to the LivechatExternalMessage cache.

* Removed interface method getRoomId.

* removed unused SystemLogger

* Improved error handling and debug/error messages.

* Added missing _ definition

* Resynch Limiter optimizied
Restricted resynch access for admins
Extracted synch to Smartiadapter
Using getProperties instead legacy impl when sync

* Refactored SmartiRelaod

* Moved hooks to Assistify AI.
Simplified clear method.

* Make sure conversations being created when a new request, topic or thread is created

* fixed system messages in smarti conversations

* better rely on cache as long as the "legacy rc endpoint" does not work.

* - Extracted functions
- Increased readability
- Code cleanups
- Added comments

* Fixing undefined vars & trailing-spaces

* fixing undefined rid

* Don't flush the cache if legacy webservice is not used

* auto resync on message, resync livechat rooms

* redlink-gmbh/smarti#225: Improve error handling

(cherry picked from commit 406eca9)

* fix duplicated room creation on new room

* fixed test and minor bug in smarti adapter

* fix linting

* Use leagcy rocket.chat endpoint again when getting conversations

* fixed assistify tests

* removed redundant error logging from proxy

* Improved health check before resynch

* fix tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants