Ticket #5207 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

[C2E] EnTran - Disable Run Button While Finding Files

Reported by: Peter Parker Owned by: Peter Parker
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Dereck Kachere

Description

Since the changes made under #5036, all MWRunFiles widgets find files asynchronously, in a background thread.

This means it is now possible to enter a range of runs into the MWRunFiles widget of the Energy Transfer tab, and then click "Run" before the files have been found. This results in a "Please check the input highlighted in red." message, which is very unintuitive for the user who then has to click Ok, work out what the problem is, wait for the files to be found, then click Run again.

To alleviate this problem, change the interface so that the "Run" button is disabled while the widget is finding the files.

Change History

comment:1 Changed 8 years ago by Peter Parker

Refs #5207 - Change "Run" to "Run Energy Transfer".

While we're here, let's make the "Run" button display "Run Energy Transfer", to better match the other tabs - it ends up displaying it anyway once a user changes tab and then changes back again so may as well nudge it along when we start up the interface.

Changeset: 70f81db37c7ec524e9abfec90a06bededa1eb44c

comment:2 Changed 8 years ago by Peter Parker

Refs #5207 - Disable run button while finding files in C2E.

Added an extra signal in MWRunFiles to make this possible - "FindingFiles".

The run button is now disabled when a user starts to change the files to be loaded, and enabled when the file finder has finished. Its text also changes to "Editing..." and "Finding files..." appropriately.

The MWRunFiles widget itself is disabled when the FileFinder is running. This is a quick way to solve the problem of a user spamming the field with multiple requests, and spawning multiple - and potentially computationally intensive - background file finder threads. I think a change to how FileFinder is called within the widget is needed to better enable the thread to stop and a new one to take over.

Changeset: f99e05e5e045bbefb4b73e60fc2fd67f857420f0

comment:3 Changed 8 years ago by Peter Parker

  • Status changed from new to accepted

comment:4 Changed 8 years ago by Peter Parker

  • Status changed from accepted to verify
  • Resolution set to fixed

Closing.

To test, make sure that the Run button of the (C2E) Energy Transfer tab updates with a message and is enabled/disabled appropriately when typing in run numbers.

Using a range of runs from the archive will slow the FileFinder down enough so that this can be tested a little better. Alternatively, generate a folder with several thousand runs and ask the MWRunFiles widget to find them all.

comment:5 Changed 8 years ago by Dereck Kachere

  • Status changed from verify to verifying
  • Tester set to Dereck Kachere

comment:6 Changed 8 years ago by Dereck Kachere

  • Status changed from verifying to closed

'Finding Files' appears when files are being loaded and 'Editing...' when the first character input is received. User can only Run Energy Transfer after focus is no longer on the input box.

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6053

Note: See TracTickets for help on using tickets.