Bug #16951
closedCan refresh listing when opening context menu, resulting in wrong item being operated on.
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:
- Refresh button is clicked, refresh starts
- Find item in list, initial right-click event happens
- The refresh event completes, refreshing the list in DOM
- 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
Related issues
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.
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-10-21 Sprint to 2020-11-04 Sprint
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-11-04 Sprint to 2020-11-18
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-11-18 to 2020-12-02 Sprint
Updated by Peter Amstutz almost 4 years ago
- Target version changed from 2020-12-02 Sprint to 2020-12-16 Sprint
Updated by Peter Amstutz almost 4 years ago
- Target version changed from 2020-12-16 Sprint to 2021-01-06 Sprint
Updated by Peter Amstutz almost 4 years ago
- Target version changed from 2021-01-06 Sprint to 2021-01-20 Sprint
Updated by Peter Amstutz almost 4 years ago
- Target version changed from 2021-01-20 Sprint to 2021-02-03 Sprint
Updated by Peter Amstutz almost 4 years ago
- Release set to 31
- Target version deleted (
2021-02-03 Sprint)
Updated by Daniel Kutyła almost 4 years ago
- Status changed from New to In Progress
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
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
Updated by Peter Amstutz about 3 years ago
- Target version set to 2021-09-29 sprint
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?
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
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.
Updated by Peter Amstutz about 3 years ago
- Target version changed from 2021-09-29 sprint to 2021-10-13 sprint
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
Updated by Peter Amstutz about 3 years ago
- Target version changed from 2021-10-13 sprint to 2021-10-27 sprint
Updated by Peter Amstutz about 3 years ago
- Target version changed from 2021-10-27 sprint to 2021-11-10 sprint
Updated by Peter Amstutz about 3 years ago
- Target version changed from 2021-11-10 sprint to 2021-11-24 sprint
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2021-11-24 sprint to 2021-12-08 sprint
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2021-12-08 sprint to 2022-01-05 sprint
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-01-05 sprint to 2022-01-19 sprint
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-01-19 sprint to 2022-02-02 sprint
Updated by Lucas Di Pentima almost 3 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.
Updated by Peter Amstutz almost 3 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.
Updated by Peter Amstutz almost 3 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.
Updated by Lucas Di Pentima almost 3 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.
Updated by Peter Amstutz almost 3 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?
Updated by Peter Amstutz almost 3 years ago
- Related to Bug #18207: Workbench2 is not clearing the project content when switching added
Updated by Peter Amstutz almost 3 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.
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-02-02 sprint to 2022-02-16 sprint
Updated by Peter Amstutz almost 3 years ago
- Assigned To changed from Daniel Kutyła to Lucas Di Pentima
Updated by Peter Amstutz almost 3 years ago
- Related to Bug #18769: Test & confirm no stale data or flickering during data table refreshes added
Updated by Peter Amstutz almost 3 years ago
- Status changed from In Progress to Resolved
Follow up in #18769