-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
report(redesign): order gauges - default, pwa, plugins #8529
Conversation
defaultGauges.push(categoryGauge); | ||
if (Util.isPluginCategory(category.id)) { | ||
pluginGauges.push(categoryGauge); | ||
} else if (renderer.renderScoreGauge === categoryRenderer.renderScoreGauge) { |
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 seems like an interesting way to tell, I guess the point is "do we render this gauge exactly like the others or does the gauge look different"?
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.
i 100% don't understand renderer.renderScoreGauge === categoryRenderer.renderScoreGauge
.
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.
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.
if it's confusing, should keep the comment :) (or make it more informative!)
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.
done
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.
Like this. Good for API, eventually I still want a set order in the renderer 😉
// Group gauges that aren't default at the end of the header | ||
if (renderer.renderScoreGauge === categoryRenderer.renderScoreGauge) { | ||
defaultGauges.push(categoryGauge); | ||
if (Util.isPluginCategory(category.id)) { |
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.
Lol great Util
function!
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.
LGTM
}); | ||
|
||
assert.notEqual(-1, indexOfPwaGauge); | ||
assert.notEqual(-1, indexOfPluginGauge); |
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.
seems like we also want to assert that indexOfPwaGauge
is less than indexOfPluginGauge
? and/or that they're the last two gauges?
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.
done
const defaultGauges = []; | ||
const customGauges = []; | ||
// Group gauges in this order: mainstream, pwa, plugins. | ||
const mainstreamGauges = []; |
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.
can we still use "deault" (from default-config.js
) or "core" for these?
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.
done
defaultGauges.push(categoryGauge); | ||
if (Util.isPluginCategory(category.id)) { | ||
pluginGauges.push(categoryGauge); | ||
} else if (renderer.renderScoreGauge === categoryRenderer.renderScoreGauge) { |
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.
if it's confusing, should keep the comment :) (or make it more informative!)
#8185