Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search result list jumps back to top #1606

Open
UWinch opened this issue Jan 28, 2020 · 3 comments
Open

Search result list jumps back to top #1606

UWinch opened this issue Jan 28, 2020 · 3 comments
Assignees
Labels
🐛Bug Something isn't working Module: Project Search
Projects

Comments

@UWinch
Copy link
Contributor

UWinch commented Jan 28, 2020

Describe the bug
The search results list jumps back to the top when multiple documents are displayed in the list and one clicks on a result at the bottom.

To Reproduce
Steps to reproduce the behavior:

  1. E.g. import the example project (https://webanno.github.io/webanno/examples/demo-de.zip)
  2. Search for "der"
  3. Scroll down the result list and click on a result
  4. The result list jumps back to the top of the results

Expected behavior
The result list should stop at the place where the user scrolled to.

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Version and build ID: 0.14.2, 0.15.0
  • OS: Ubuntu
  • Browser: Chrome

Additional context
Add any other context about the problem here.

@UWinch UWinch added 🐛Bug Something isn't working Module: Project Search labels Jan 28, 2020
@UWinch UWinch added this to the Bug backlog milestone Jan 28, 2020
@UWinch
Copy link
Contributor Author

UWinch commented Jan 29, 2020

@reckart I'm sure the results list jumps because the sidebar is refreshed when a new document is loaded. I have two ideas to solve this: add some javascript because in js we can to my knowledge change the scrollbar position, I would save it when the result is clicked and then restore the position.
Another idea is to just not refresh the sidebar, I would flag the sidebar to not be refreshed when all children of the annotation page are refreshed on document load. Because I just learned that you can set component metadata, I would add a flag as metadata to the sidebar. The second idea needs a check in the corresponding webanno method that refreshes a page. What do you think?

@reckart
Copy link
Member

reckart commented Jan 30, 2020

You wanted to implement the tab for the new "curation" sidebar panel such that it shows only if the user has curator permissions. Would showing/hiding that tab still work if the sidebar is no longer refreshed?

Since curation is a project-level permission and we switch between documents within a project... I guess it would?

What about if documents are switched e.g. in active learning mode? Does that somehow rely on the sidebar refreshing behavior we have right now?

I think it makes sense to not refresh the sidebar on switching documents, but maybe some sidebar panels need it and then they might have to "listen" to a relevant event and refresh themselves.

@reckart reckart modified the milestones: 🦟 Bug backlog, 20.2, 20.3 Aug 14, 2021
@reckart reckart modified the milestones: 20.3, 20.4 Sep 1, 2021
@reckart reckart modified the milestones: 20.4, 20.5, 21.1 Sep 12, 2021
@reckart reckart modified the milestones: 21.1, 21.2 Oct 18, 2021
@reckart reckart modified the milestones: 21.2, 21.3, 🦟 Bug backlog Nov 30, 2021
@reckart reckart modified the milestones: 🦟 Bug backlog, 24.0 Jul 19, 2022
@reckart reckart added this to 🔖 To do in Kanban via automation Jul 19, 2022
@reckart reckart self-assigned this Jul 19, 2022
reckart added a commit that referenced this issue Jul 19, 2022
- Fixes jumping to the top when (un)selecting a checkbox in the results list after scrolling down - when clicking on a result triggers a switch of the document, it still jumps
- Only show group-level checkbox if there are any editable results in the group
- Ignore non-editable results in a group when determining the group-level checkbox state
reckart added a commit that referenced this issue Jul 19, 2022
…sult-list-jumps-back-to-top

#1606 - Search result list jumps back to top
reckart added a commit that referenced this issue Jul 19, 2022
…ons-on-closed-document

* main:
  #1606 - Search result list jumps back to top
@reckart
Copy link
Member

reckart commented Jul 19, 2022

This has been fixed for the case of clicking on a checkbox in the lower parts of the search results. However, when clicking on a result causes a switch to another document, this causes the whole page to re-render and in this case the sidebar still jumps.

@reckart reckart removed this from the 24.0 milestone Jul 19, 2022
@reckart reckart added this to the 🦟 Bug backlog milestone Jul 19, 2022
reckart added a commit that referenced this issue Jul 19, 2022
…t-into-view

* main:
  #3201 - Can still accept/reject suggestions on closed document
  #1606 - Search result list jumps back to top
  #3096 - New PDF editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Project Search
Projects
Kanban
  
🔖 To do
Development

No branches or pull requests

2 participants