-
Notifications
You must be signed in to change notification settings - Fork 90
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
Consolidate the channels + channel-labels #625
Conversation
Staging instance deployed by Travis CI! |
This is great! I could quite easily use it get a view of Chrome+Edge+Firefox stable and Safari experimental, which was a URL I was trying to make manually just yesterday. I also think I've found a bug, so before I review here are steps to repro:
|
Oh, it also looks like "Add product" is broken. It also strikes me that it won't be too obvious to people how to close the query builder. In addition to being able to toggle it with the pen, maybe ad an × to dismiss it? Or a "Done" button? |
I'll add the collapse behaviour in a separate PR. |
e0dc256
to
cda9a02
Compare
Trying the steps in #625 (comment) I think there's still a bug, at the end I'm still left at |
Confirmed there's a bug; looks like the collapsed label isn't being updated correctly. EDIT: That took a while to diagnose; turned out to be a mutation of array of labels on the global DEFAULT_PRODUCTS helper; wrote a test that was failing for the same reason and fixed. |
PTAL |
@@ -132,7 +132,7 @@ | |||
} | |||
|
|||
clearQuery() { | |||
this.products = Array.from(DEFAULT_PRODUCTS); | |||
this.products = DEFAULT_PRODUCTS.map(p => Object.assign({}, p)); |
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.
Aha. Subtle bug there.
if ('product' in params) { | ||
this.products = params.product.map(p => this.parseProductSpec(p)); | ||
} | ||
// Expand a global channel label into the separate products | ||
let sharedChannel = (params.label || []).find(l => CHANNELS.has(l)); |
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: if you just let sharedChannel
here you can move params.label.find(l => CHANNELS.has(l))
into the if body. Minimally clearer, take your pick :)
Description
Further work on #535
Changes the TestRunQuery to expand channel-labels onto the products during the building phase, and collapse them off of the products when producing the query-string.
Review Information
Stable
for all products