Ticket #8938 (closed: fixed)
Improve usability of catalog publish interface
Reported by: | Jay Rainey | Owned by: | Jay Rainey |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | GUI | Keywords: | ICAT |
Cc: | Blocked By: | #9007 | |
Blocking: | Tester: | Samuel Jackson |
Description
Currently, it is possible to select both a datafile and a workspace to publish, which then throws an error (as you can publish one or the other).
A better approach (which was mentioned by Sam), is to use a stack widget similar to that on the Indirect inelastic interface.
E.g. a combo-box on the left that has File: and Workspace. Depending on the option chosen, the related fields to the right are displayed.
Change History
comment:2 Changed 7 years ago by Jay Rainey
Set data selector properties. Refs #8938.
- It's not possible to simply tie the dataSelector field with the properties. Instead, I set the properties for each (filename/workspace) depending on that chosen by the user.
Changeset: 375864bbeaf28b85188e883b88be2ebf19d56e0c
comment:4 Changed 7 years ago by Jay Rainey
Merge 'origin/master'. Refs #8938.
Changeset: 7c51efc832754a3250297d6c9501d93fca132f4d
comment:5 Changed 7 years ago by Jay Rainey
- Status changed from inprogress to verify
- Resolution set to fixed
This was a minor ticket that deals with improving the usability of the publishing dialog. I have replaced the two separate input fields (fileName & input workspace) with DataSelector, which allows the user to select one field, and never both.
To test
I recommend testing the ticket from master, and in the branch to see the changes in the dialog.
- Log into the catalog.
- Open the publishing dialog. Note that you can now only select a workspace or a file. Not both. (previously you could, but then an error message would be displayed).
- Verify that the publishing functionality still works.
comment:6 Changed 7 years ago by Jay Rainey
- Summary changed from Improve publish interface to Improve publish interface usability
comment:7 Changed 7 years ago by Jay Rainey
- Summary changed from Improve publish interface usability to Improve usability of catalog publish interface
comment:8 Changed 7 years ago by Samuel Jackson
- Status changed from verify to verifying
- Tester set to Samuel Jackson
comment:9 follow-up: ↓ 12 Changed 7 years ago by Samuel Jackson
- Status changed from verifying to reopened
- Resolution fixed deleted
I found that if I pass it a file name which isn't valid, publishing still appears to work. We need an error message if the file doesn't exist.
comment:10 Changed 7 years ago by Jay Rainey
- Status changed from reopened to inprogress
Validate dataSelector. Refs #8938.
- Although there is a dataSelector specific validator class (UserInputValidator), it is not possible to access it from MantidQtCustomDialogs.
Changeset: b5e930cabe6145b402a7e893b3fb5ec98b970764
comment:11 Changed 7 years ago by Jay Rainey
Add better message by default. Refs #8938.
Changeset: e114fac1e03512a0a9ec0bee5d2dee31c417c456
comment:12 in reply to: ↑ 9 Changed 7 years ago by Jay Rainey
- Status changed from inprogress to verify
- Resolution set to fixed
Replying to Samuel Jackson:
I found that if I pass it a file name which isn't valid, publishing still appears to work. We need an error message if the file doesn't exist.
That's because I was using DataSelector and not validating the input field. I have manually added the validation in comment:10 & comment:11. I was going to use the related validator class (UserInputValidator), but was unable to do so from MantidQtCustomDialogs. This should be addressed in a separate ticket if we decide it's sensible to allow all dialogs/interfaces to make use of this class.
The publishing functionality worked as the path you previously input to the catalogpublish dialog was used as the algorithm's property is set when you select a file inside fileSelected().
Note: The underlying algorithm (CatalogPublish) does not accept invalid paths, and throws an error as such:
Error in execution of algorithm CatalogPublish: Error on opening file at: in /home/justauser/Desktop/GEM
To test
- Verify that the changes made above address the issue noted by Sam in comment:9. That is, the filePath can no longer be invalid, and an appropriate error message is displayed if it's invalid.
comment:13 Changed 7 years ago by Jay Rainey
Remove unnecessary returns. Refs #8938.
Changeset: 1502563e592690104fafadb41b13affad8a1772b
comment:14 Changed 7 years ago by Samuel Jackson
- Status changed from verify to closed
Merge remote-tracking branch 'origin/feature/8938_improve_icat_publish_gui'
Full changeset: efcd7743386741c74765675ebc09b216c26c4ae1
comment:15 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9781
Added dataSelector field. Refs #8938.
Changeset: 66f19876ec0ac73891a621c66908df615296c10c