You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/18 08:39:05 UTC
[GitHub] [incubator-superset] ktmud opened a new pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
ktmud opened a new pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116
### SUMMARY
Fixes #12106 #12105
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
#### After Fix
In FilterBox:
![image](https://user-images.githubusercontent.com/335541/102593086-40851600-40c9-11eb-8c4e-5b3210e0fadd.png)
In data preview:
<img src="https://user-images.githubusercontent.com/335541/102592828-e71ce700-40c8-11eb-89d5-ee9c5ba2b850.png" width="600">
### TEST PLAN
Manual verification.
1. Try create a calculated column that returns boolean values in the `wb_health_population` dataset
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747999631
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=h1) Report
> Merging [#12116](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=desc) (2abf3fd) into [master](https://codecov.io/gh/apache/incubator-superset/commit/49ec13c68c183b110b5c7ad18dfb829ce9f34245?el=desc) (49ec13c) will **decrease** coverage by `2.58%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12116/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12116 +/- ##
==========================================
- Coverage 65.86% 63.28% -2.59%
==========================================
Files 972 481 -491
Lines 48051 29669 -18382
Branches 4716 0 -4716
==========================================
- Hits 31650 18776 -12874
+ Misses 16259 10893 -5366
+ Partials 142 0 -142
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.28% <ø> (-0.93%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `32.65% <0.00%> (-59.19%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `59.64% <0.00%> (-22.81%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.95% <0.00%> (-12.45%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/dao.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
| [superset/views/database/validators.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvdmFsaWRhdG9ycy5weQ==) | `78.94% <0.00%> (-5.27%)` | :arrow_down: |
| ... and [509 more](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=footer). Last update [49ec13c...2abf3fd](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] etr2460 commented on a change in pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
etr2460 commented on a change in pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#discussion_r545976544
##########
File path: superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
##########
@@ -216,7 +216,13 @@ class FilterBox extends React.PureComponent {
const color = 'lightgrey';
const backgroundImage = `linear-gradient(to right, ${color}, ${color} ${perc}%, rgba(0,0,0,0) ${perc}%`;
const style = { backgroundImage };
- return { value: opt.id, label: opt.id, style };
+ let label = opt.id;
+ if (label === true) {
+ label = t('True');
+ } else if (label === false) {
+ label = t('False');
Review comment:
I'm actually not sure we want translations here (I know, goes against my usual comments!).
The reason being, we want to display the data as it exists in the table, and I don't know of any SQL dialects that translate the keywords for boolean values. I think `"TRUE"` and `"FALSE"` are probably best here, although would also accept `"true"` and `"false"`
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io commented on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747999631
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=h1) Report
> Merging [#12116](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=desc) (5a57ae3) into [master](https://codecov.io/gh/apache/incubator-superset/commit/35addee3ae158b92bc886083626ab7e108861cfd?el=desc) (35addee) will **decrease** coverage by `3.30%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12116/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12116 +/- ##
==========================================
- Coverage 66.63% 63.33% -3.31%
==========================================
Files 972 481 -491
Lines 48034 29680 -18354
Branches 4743 0 -4743
==========================================
- Hits 32009 18798 -13211
+ Misses 15901 10882 -5019
+ Partials 124 0 -124
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.33% <ø> (-0.84%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `85.22% <0.00%> (-6.28%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.63% <0.00%> (-3.26%)` | :arrow_down: |
| ... and [500 more](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=footer). Last update [35addee...5a57ae3](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#discussion_r545667471
##########
File path: superset-frontend/src/explore/components/DataTableControl.tsx
##########
@@ -95,11 +96,30 @@ export const useFilteredTableData = (
);
}, [data, filterText]);
-export const useTableColumns = (data?: Record<string, any>[]) =>
+export const useTableColumns = (
+ data?: Record<string, any>[],
+ moreConfigs?: { [key: string]: Partial<Column> },
Review comment:
Extends the possibility of overriding column configs. Not used anywhere for now.
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] kgabryje commented on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
kgabryje commented on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747958946
> LGTM. I'm surprised the lack of this logic wasn't causing trouble before (apparently booleans weren't proper booleans before?).
Apparently not displaying booleans is a known bug in react-table https://github.com/tannerlinsley/react-table/issues/799
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747999631
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=h1) Report
> Merging [#12116](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=desc) (5a57ae3) into [master](https://codecov.io/gh/apache/incubator-superset/commit/35addee3ae158b92bc886083626ab7e108861cfd?el=desc) (35addee) will **decrease** coverage by `2.78%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12116/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12116 +/- ##
==========================================
- Coverage 66.63% 63.85% -2.79%
==========================================
Files 972 481 -491
Lines 48034 29682 -18352
Branches 4743 0 -4743
==========================================
- Hits 32009 18954 -13055
+ Misses 15901 10728 -5173
+ Partials 124 0 -124
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.85% <ø> (-0.32%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.90% <0.00%> (-2.99%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `72.89% <0.00%> (-2.48%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.75% <0.00%> (-1.85%)` | :arrow_down: |
| [superset/datasets/api.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YXNldHMvYXBpLnB5) | `89.44% <0.00%> (-1.84%)` | :arrow_down: |
| ... and [494 more](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=footer). Last update [35addee...5a57ae3](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on a change in pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#discussion_r545982183
##########
File path: superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
##########
@@ -216,7 +216,13 @@ class FilterBox extends React.PureComponent {
const color = 'lightgrey';
const backgroundImage = `linear-gradient(to right, ${color}, ${color} ${perc}%, rgba(0,0,0,0) ${perc}%`;
const style = { backgroundImage };
- return { value: opt.id, label: opt.id, style };
+ let label = opt.id;
+ if (label === true) {
+ label = t('True');
+ } else if (label === false) {
+ label = t('False');
Review comment:
I thought it made sense to translate as the FilterBox is a user-facing interface, but I agree maybe more data-savvy users would want them to display as what the database displays.
I'm going to extra them as constants so that customized Superset could easily override.
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud commented on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747952388
> LGTM. I'm surprised the lack of this logic wasn't causing trouble before (apparently booleans weren't proper booleans before?).
Maybe they were returned as strings by the API? I'm not sure...
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] ktmud merged pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
ktmud merged pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12116: fix: properly render booleans in FilterBox and explore page data preview
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12116:
URL: https://github.com/apache/incubator-superset/pull/12116#issuecomment-747999631
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=h1) Report
> Merging [#12116](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=desc) (5a57ae3) into [master](https://codecov.io/gh/apache/incubator-superset/commit/35addee3ae158b92bc886083626ab7e108861cfd?el=desc) (35addee) will **decrease** coverage by `2.79%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12116/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12116 +/- ##
==========================================
- Coverage 66.63% 63.84% -2.80%
==========================================
Files 972 481 -491
Lines 48034 29682 -18352
Branches 4743 0 -4743
==========================================
- Hits 32009 18951 -13058
+ Misses 15901 10731 -5170
+ Partials 124 0 -124
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `63.84% <ø> (-0.33%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `96.42% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.90% <0.00%> (-2.99%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `72.89% <0.00%> (-2.48%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.75% <0.00%> (-1.85%)` | :arrow_down: |
| [superset/datasets/api.py](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YXNldHMvYXBpLnB5) | `89.44% <0.00%> (-1.84%)` | :arrow_down: |
| ... and [495 more](https://codecov.io/gh/apache/incubator-superset/pull/12116/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=footer). Last update [35addee...5a57ae3](https://codecov.io/gh/apache/incubator-superset/pull/12116?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org