Skip to content
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

Merged
merged 3 commits into from
Apr 23, 2019

Conversation

connorjclark
Copy link
Collaborator

defaultGauges.push(categoryGauge);
if (Util.isPluginCategory(category.id)) {
pluginGauges.push(categoryGauge);
} else if (renderer.renderScoreGauge === categoryRenderer.renderScoreGauge) {
Copy link
Collaborator

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"?

Copy link
Collaborator Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@connorjclark connorjclark mentioned this pull request Apr 22, 2019
55 tasks
Copy link
Member

@exterkamp exterkamp left a 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)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol great Util function!

Copy link
Collaborator

@patrickhulce patrickhulce left a 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);
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 = [];
Copy link
Member

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?

Copy link
Collaborator Author

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) {
Copy link
Member

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!)

@connorjclark connorjclark changed the title report(redesign): order gauges - mainstream, pwa, plugins report(redesign): order gauges - default, pwa, plugins Apr 23, 2019
@brendankenny brendankenny merged commit 68add80 into master Apr 23, 2019
@brendankenny brendankenny deleted the report-ui-gauge-order branch April 23, 2019 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants