-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usability: links to methods and configs [risk: low] #1444
Conversation
first automation run had two failures:
|
@@ -47,6 +48,23 @@ | |||
(defn config->id [config] | |||
(select-keys config [:namespace :name])) | |||
|
|||
(defn- referenced-method-parts [config] | |||
((juxt :sourceRepo :methodNamespace :methodName :methodPath :methodVersion) (:methodRepoMethod config))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This strikes me as a little weird. Maybe:
(replace (:methodRepoMethod config) [:sourceRepo :methodNamespace :methodName :methodPath :methodVersion])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this - the juxt
was cut-paste from the previous table definition and I also found it weird but didn't investigate anything better - I like your suggestion a lot more!
((juxt :sourceRepo :methodNamespace :methodName :methodPath :methodVersion) (:methodRepoMethod config))) | ||
|
||
(defn- method-as-text [config] | ||
(clojure.string/join "/" (referenced-method-parts config))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: import clojure.string :as string
and then string/join
@@ -78,7 +79,12 @@ | |||
"agora" (list | |||
(make-field :namespace "Namespace") | |||
(make-field :name "Name") | |||
(make-field :snapshotId "Snapshot ID" :dropdown? true)) | |||
(make-field :snapshotId "Snapshot ID" :dropdown? true | |||
:render (fn [snapshotId] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kebab case the param
[:span {:style {:fontWeight 500}} (:methodConfigurationName submission)]]) | ||
;; if we were able to retrieve the method config (see :load-details), then display | ||
;; the config's name as a link. Else, display it as text with an informative tooltip. | ||
(if (:ws-config @state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Destructure state and props
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also wrap this in a let and destructure the things you're using from submission
(string/join "/" (referenced-method-parts config))) | ||
|
||
(defn- method-as-maybe-link [config] | ||
(let [redacted? (:redacted? config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use :keys to destructure multiple at once
:sort-by :text | ||
:as-text method-as-text | ||
:render method-as-maybe-link | ||
}]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move these up a line
DataBiosphere/firecloud-app#111
For usability, this PR adds linkifies a few parts of the UI:
I chose to NOT add links from the workspace's list of submissions back to each referenced config. To do this right, I'd have to make an extra ajax call to get all known configs, in order to handle configs that have been updated/deleted since the submission ran. This would be an extra performance hit. If this feature is really desired, I'd do it in a separate PR.
Workspace method config detail (snapshot id value is a link):
![config-detail](https://user-images.githubusercontent.com/6041577/47930973-d9ce1f80-dea3-11e8-898d-b2166c875c96.png)
Workspace method config list:
![config-list](https://user-images.githubusercontent.com/6041577/47930980-dcc91000-dea3-11e8-9e1b-c2343d5f6358.png)
Submission detail, config unavailable:
![submission-detail-deleted](https://user-images.githubusercontent.com/6041577/47930991-e3f01e00-dea3-11e8-9ecf-ff645ad28dfd.png)
Submission detail, config reachable:
![submission-detail-active](https://user-images.githubusercontent.com/6041577/47931003-e783a500-dea3-11e8-8f82-f7606d72cc26.png)