Aliro icon indicating copy to clipboard operation
Aliro copied to clipboard

No action for cancelled experiment.

Open weixuanfu opened this issue 6 years ago • 3 comments

image image image

Cancelled experiment in Experiments page should not have any action once you click it. However, now the action is to go to a result page that not exists and keep showing "Retrieving results...".

weixuanfu avatar Jun 11 '19 17:06 weixuanfu

changed behavior of clicking on 'cancelled' experiment to have no action, closing ticket

If a different behavior/feature is preferable then I will re-open issue

joshc0044 avatar Jun 13 '19 14:06 joshc0044

I just found that I could click a "running" experiment and go to a result page with "Retrieving results...". I this this action should also disabled for running experiment. @joshc0044

weixuanfu avatar Aug 09 '19 18:08 weixuanfu

There are a couple solutions for preventing user action when an experiment is 'cancelled' or 'running'

A simple naive approach is to change this piece to check for the experiment status and essentially return url for the current page, almost a no-op but I believe still technically redirecting to current page

Alternatively, it is possible to disable user interaction for the table rows when the experiment status is 'cancelled' or 'running' - in this case it is a proper no-op in that a user action does nothing

Two small things after implementing this change to disable a row if the experiment status is running or cancelled:

  1. there is a small issue in the experiment result page here on line 41 when clicking on an experiment after it has transitioned from running to success, the link to the code in the link will attempt to access a property of undefined, specifically this line if(typeof expScores[scoreKey].toFixed === 'function') And can get stuck on the broken 'Retrieving results...' loading page (going back or manually refreshing the page fixes it) I added a basic check that expScores[scoreKey] is defined before checking for toFixed and that helps prevent the loading page for a specific experiment result page from breaking, so the change is this: if(expScores[scoreKey] && typeof expScores[scoreKey].toFixed === 'function')

  2. this is a small style thing - when disabling the table row I can disable the popup (this still allows the user to click on the entry and go to a blank result page) it looks like this

image

if the row is disabled the user can not click on it and the row is greyed out like this image

Both unit & integration tests passed, this update is not on any branch at the moment (changes are on local copy of master on my desktop), I'll wait for a go ahead before I push anything

joshc0044 avatar Aug 12 '19 18:08 joshc0044