You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/02/05 19:24:27 UTC
[GitHub] [incubator-pinot] zhangloo333 opened a new pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
zhangloo333 opened a new pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551
## Description
Fix eslint reported warning and errors under the authenticators, helpers, and mirage folder
### Test
Pass: Yarn test
1..376
tests 376
pass 374
skip 2
fail 0
ok
Pass: e2e
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551#discussion_r571249201
##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-color.js
##########
@@ -11,9 +11,8 @@ export function computeColor([value = 0]) {
if (value > 0) {
return `rgba(0,0,234,${opacity})`;
- } else{
- return `rgba(234,0,0,${opacity})`;
}
+ return `rgba(234,0,0,${opacity})`;
Review comment:
would it be cleaner to have a ternary ?
i.e. return value>0 ? `rgba(0,0,234,${opacity})` : `rgba(234,0,0,${opacity})`;
##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-text-color.js
##########
@@ -7,13 +7,12 @@ import { helper } from '@ember/component/helper';
* @return {String} Text color (HEX)
*/
export function computeTextColor([value = 0]) {
- const opacity = Math.abs(value/25);
+ const opacity = Math.abs(value / 25);
if (opacity < 0.5) {
- return "#000000";
- } else{
- return "#ffffff" ;
+ return '#000000';
}
+ return '#ffffff';
Review comment:
same as above "ternary"?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] jihaozh merged pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
Posted by GitBox <gi...@apache.org>.
jihaozh merged pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551#issuecomment-774356250
Looks good to me
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] zhangloo333 commented on a change in pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
Posted by GitBox <gi...@apache.org>.
zhangloo333 commented on a change in pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551#discussion_r571265960
##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-text-color.js
##########
@@ -7,13 +7,12 @@ import { helper } from '@ember/component/helper';
* @return {String} Text color (HEX)
*/
export function computeTextColor([value = 0]) {
- const opacity = Math.abs(value/25);
+ const opacity = Math.abs(value / 25);
if (opacity < 0.5) {
- return "#000000";
- } else{
- return "#ffffff" ;
+ return '#000000';
}
+ return '#ffffff';
Review comment:
ditto
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] zhangloo333 commented on a change in pull request #6551: [TE]: fix eslint reported issue under the authenticators, helpers, and mirage folder
Posted by GitBox <gi...@apache.org>.
zhangloo333 commented on a change in pull request #6551:
URL: https://github.com/apache/incubator-pinot/pull/6551#discussion_r571265862
##########
File path: thirdeye/thirdeye-frontend/app/helpers/compute-color.js
##########
@@ -11,9 +11,8 @@ export function computeColor([value = 0]) {
if (value > 0) {
return `rgba(0,0,234,${opacity})`;
- } else{
- return `rgba(234,0,0,${opacity})`;
}
+ return `rgba(234,0,0,${opacity})`;
Review comment:
Yes, it could be. I haven't changed it because my purpose is fixing eslint error in the codebase and changing the code structure will involve more risk. I need to test it again. For this suggestion, I can change it because the logic is simple. Thanks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org