Project

General

Profile

Actions

Bug #16951

closed

Can refresh listing when opening context menu, resulting in wrong item being operated on.

Added by Peter Amstutz about 4 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-
Release relationship:
Auto

Description

Observed in integration test:

Between when the right-click event happens and the context menu pops up on the project panel, it is possible for the list to be refreshed. When this happens, the wrong item may be selected.

In this integration test specifically, the sequence of events seems to be:

  1. Refresh button is clicked, refresh starts
  2. Find item in list, initial right-click event happens
  3. The refresh event completes, refreshing the list in DOM
  4. The context menu click event selects the wrong thing.

This particular test should probably wait until the refresh is completed. However, we should come up with a general approach to defer refreshing the UI unexpectedly if the user seems to be interacting with it.


Files

refresh-button-project-listing.mov (6.3 MB) refresh-button-project-listing.mov Lucas Di Pentima, 01/19/2022 08:09 PM

Subtasks 1 (0 open1 closed)

Task #16963: Review 16951-Can-refresh-listing-when-opening-context-menu-resulting-in-wrong-item-being-operated-onClosedLucas Di Pentima01/18/2022Actions

Related issues

Related to Arvados - Bug #18207: Workbench2 is not clearing the project content when switchingResolvedDaniel Kutyła11/04/2021Actions
Related to Arvados - Bug #18769: Test & confirm no stale data or flickering during data table refreshesResolvedLucas Di Pentima02/17/2022Actions
Actions #1

Updated by Peter Amstutz about 4 years ago

  • Description updated (diff)
  • Subject changed from Can refresh listing while context menu is open, resulting in wrong item being operated on. to Can refresh listing when opening context menu, resulting in wrong item being operated on.
Actions #2

Updated by Peter Amstutz about 4 years ago

  • Assigned To set to Daniel Kutyła
Actions #3

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2020-10-21 Sprint to 2020-11-04 Sprint
Actions #4

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2020-11-04 Sprint to 2020-11-18
Actions #5

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2020-11-18 to 2020-12-02 Sprint
Actions #6

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2020-12-02 Sprint to 2020-12-16 Sprint
Actions #7

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2020-12-16 Sprint to 2021-01-06 Sprint
Actions #8

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2021-01-06 Sprint to 2021-01-20 Sprint
Actions #9

Updated by Peter Amstutz almost 4 years ago

  • Target version changed from 2021-01-20 Sprint to 2021-02-03 Sprint
Actions #10

Updated by Peter Amstutz over 3 years ago

  • Release set to 31
  • Target version deleted (2021-02-03 Sprint)
Actions #11

Updated by Daniel Kutyła over 3 years ago

  • Status changed from New to In Progress
Actions #12

Updated by Daniel Kutyła about 3 years ago

New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/7f80f22374711ce0c55d7a1657b9039fe84a2c1f
Test run: developer-tests-workbench2: #488
Branch: 16951-Can-refresh-listing-when-opening-context-menu-resulting-in-wrong-item-being-operated-on

Added overlay to prevent modifications while refreshing page contents

Actions #13

Updated by Daniel Kutyła about 3 years ago

New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/7ebf70dc266ce6a01f930d89e599120641f248da
Test run: developer-tests-workbench2: #489
Branch: 16951-Can-refresh-listing-when-opening-context-menu-resulting-in-wrong-item-being-operated-on

Fixed failing unit tests

Actions #14

Updated by Peter Amstutz about 3 years ago

  • Target version set to 2021-09-29 sprint
Actions #15

Updated by Peter Amstutz about 3 years ago

Commit 7ebf70dc266ce6a01f930d89e599120641f248da seems to be based on a really old branch, could you rebase or merge with main?

Actions #16

Updated by Daniel Kutyła about 3 years ago

New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/dd63617d23cd24703e9847a8971af8b069e3ce38
Test run: developer-tests-workbench2: #491
Branch: 16951-Can-refresh-listing-when-opening-context-menu-resulting-in-wrong-item-being-operated-on

Rebased with newest main

Actions #17

Updated by Peter Amstutz about 3 years ago

This makes sense. I like that it dims the user interface to indicate you can't interact with it. As a minor note, I did notice that because the overlay apparently has no mouse click handler, if I right click on the page while it is in the disabled state, I get the browser's context menu, which was a little surprising.

I'm am concerned that if a reload takes a long time or has an unhandled error, the whole user interface would be unresponsive and force the user to reload the page. Perhaps it could just disable the center panel and leave the left hand tree clickable?

Related to this, when clicking on something on the left hand tree to switch the center panel, it often shows the old content (for a different object) for a few moments until new content is loaded. Given a slow load, the user could mistakenly start interacting with the old content. It would be better if it first cleared the panel and/or disabled it (using the feature in this branch) until the new content was loaded.

Actions #18

Updated by Peter Amstutz about 3 years ago

  • Target version changed from 2021-09-29 sprint to 2021-10-13 sprint
Actions #19

Updated by Daniel Kutyła about 3 years ago

New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/d332a55872ab05bc5ce53c3e62f6e8102d573962
Test run: developer-tests-workbench2: #493
Branch: 16951-Can-refresh-listing-when-opening-context-menu-resulting-in-wrong-item-being-operated-on

Context menu should not be available when refreshing

Actions #20

Updated by Peter Amstutz about 3 years ago

  • Target version changed from 2021-10-13 sprint to 2021-10-27 sprint
Actions #21

Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2021-10-27 sprint to 2021-11-10 sprint
Actions #22

Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2021-11-10 sprint to 2021-11-24 sprint
Actions #23

Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2021-11-24 sprint to 2021-12-08 sprint
Actions #24

Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2021-12-08 sprint to 2022-01-05 sprint
Actions #25

Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2022-01-05 sprint to 2022-01-19 sprint
Actions #26

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2022-01-19 sprint to 2022-02-02 sprint
Actions #27

Updated by Lucas Di Pentima over 2 years ago

From experimenting a bit while reviewing #18207, it seems that on the particular case of the project listing, the DataExplorer/DataTable's working prop that relies on the app's general progress indicator is somehow detached from the contents loading action, so that's why previous contents were on display (for example, from the parent project) while waiting for new content. In those cases I think a right-click action would show the context menu of a soon-to-be-removed item.
With #18207 merged, I think this case won't be an issue anymore.

Actions #28

Updated by Peter Amstutz over 2 years ago

Lucas Di Pentima wrote:

From experimenting a bit while reviewing #18207, it seems that on the particular case of the project listing, the DataExplorer/DataTable's working prop that relies on the app's general progress indicator is somehow detached from the contents loading action, so that's why previous contents were on display (for example, from the parent project) while waiting for new content. In those cases I think a right-click action would show the context menu of a soon-to-be-removed item.
With #18207 merged, I think this case won't be an issue anymore.

That seems like a better solution than effectively disabling the entire interface while operations are happening.

Actions #29

Updated by Peter Amstutz over 2 years ago

From discussion: confirm that the refresh button clears the data table before loading new content so that you can't click on the old content by accident.

Actions #30

Updated by Lucas Di Pentima over 2 years ago

I've tested the current version from main and I'm seeing a couple of things that may need improvement if we want to make this the solution:

  • The refresh button as it does go back & forward the app's router history, it makes the app do double the work, and now it's super evident.
  • For other projects than the "Home", it seems that the behavior of "loading and then clearing the list" is still happening when using the refresh button or just clicking on the current project's breadcrumb (but doesn't happen when changing projects while browsing, so this may be super easy to fix because the loading prop is tied to the fact that the browser's url changes)

Attached is a 49 secs demo video.

Actions #31

Updated by Peter Amstutz over 2 years ago

Lucas Di Pentima wrote:

I've tested the current version from main and I'm seeing a couple of things that may need improvement if we want to make this the solution:

  • The refresh button as it does go back & forward the app's router history, it makes the app do double the work, and now it's super evident.

I am surprised this was not visible before, but that's pretty bad. Seems like it's waiting for the page to load from the back navigation, before even starting the forward navigation to reload the page? There must be a better way to do this.

  • For other projects than the "Home", it seems that the behavior of "loading and then clearing the list" is still happening when using the refresh button or just clicking on the current project's breadcrumb (but doesn't happen when changing projects while browsing, so this may be super easy to fix because the loading prop is tied to the fact that the browser's url changes)

Attached is a 49 secs demo video.

I'm not quite following but if browsing is doing the right thing, we just need to do that everywhere?

Actions #32

Updated by Peter Amstutz over 2 years ago

  • Related to Bug #18207: Workbench2 is not clearing the project content when switching added
Actions #33

Updated by Peter Amstutz over 2 years ago

I played with ce8i5 cluster a bit.

  • Regular navigation works fine under "Projects" seems to mostly work fine. On click it clears the table, and loads the contents when ready as expected.

Here are the issues I'm seeing:

  • Hitting the refresh button on a project causes it to load twice resulting in a flicker (it clears the contents, the contents show up, then it clears them again, then the content shows up a 2nd time).
  • Navigating to a collection, then navigating back to the parent project or using the browser back button still seems to be showing old results as well as flickering:
    • It displays the project view with the old project contents
    • It clears the contents and shows the loading graphic
    • Then it shows the newly loaded contents
  • I went into "Shared with me" and clicked on a project. It showed the old contents, then the loading graphic, then the new contents.
Actions #34

Updated by Peter Amstutz over 2 years ago

  • Target version changed from 2022-02-02 sprint to 2022-02-16 sprint
Actions #35

Updated by Peter Amstutz over 2 years ago

  • Assigned To changed from Daniel Kutyła to Lucas Di Pentima
Actions #36

Updated by Peter Amstutz over 2 years ago

  • Related to Bug #18769: Test & confirm no stale data or flickering during data table refreshes added
Actions #37

Updated by Peter Amstutz over 2 years ago

  • Status changed from In Progress to Resolved

Follow up in #18769

Actions

Also available in: Atom PDF