-
Notifications
You must be signed in to change notification settings - Fork 93
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
Feedback implementation #3461
Feedback implementation #3461
Conversation
@@ -7,10 +7,10 @@ export default { | |||
size: 'small', | |||
forestTypes: ['ifl_2013'], | |||
landCategories: ['wdpa', 'landmark', 'mining'], | |||
units: ['ha', '%'], | |||
units: ['ha'], |
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.
not needed if no selector
@@ -6,10 +6,10 @@ export default { | |||
size: 'small', | |||
forestTypes: ['ifl_2013', 'plantations', 'primary_forest'], | |||
landCategories: ['mining', 'wdpa', 'landmark'], | |||
units: ['ha', '%'], | |||
units: ['ha'], |
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.
same here
|
||
const sentence = initial; | ||
const params = { | ||
location: currentLabel, | ||
startYear, | ||
endYear, | ||
lossPhrase, | ||
value: `${format('.3s')(totalOutsideLoss)}t of CO<sub>2</sub> emissions` | ||
value: `${format('.3s')(outsideEmissions)}t`, | ||
percentage: percentage < 0.1 ? '<0.1%' : `${format('.2r')(percentage)}%` |
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.
Shall we start using our format helper?
@@ -62,6 +62,7 @@ export const getSentence = createSelector( | |||
const params = { | |||
year: settings.extentYear, | |||
location: currentLabel || 'global', | |||
location_alt: `${currentLabel}'s`, |
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.
Ideally when it comes to translations, this 's
should be in the sentence so that it can be changed.
Made the changes! 👍 |
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.
One small change extra if you have the energy! Just a syntax improvement.
@@ -93,7 +94,7 @@ export const getSentence = createSelector( | |||
endYear, | |||
lossPhrase, | |||
value: `${format('.3s')(outsideEmissions)}t`, | |||
percentage: percentage < 0.1 ? '<0.1%' : `${format('.2r')(percentage)}%` | |||
percentage: `${formatNumber({ num: percentage, unit: '%' })}` |
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.
You aren't generating a string here outside of the function so you just need to execute the helper, no need for the ` and $ :)
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.
Nice :) Done.
Overview
Last round of feedback implementations.