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 2021/02/13 21:32:26 UTC

[GitHub] [superset] ktmud opened a new pull request #13109: fix(FilterBox): treat empty defaultValues as null

ktmud opened a new pull request #13109:
URL: https://github.com/apache/superset/pull/13109


   ### SUMMARY
   
   Fixes #13099 
   
   `FilterBox` will send empty string as filter values when a column's `defaultValue` is empty string, causing no-results for filtered charts.
   
   The default value for filter column's `defaultValue` is `null`, but if users have edited it, it will be updated to an empty string. 
   
   <img src="https://user-images.githubusercontent.com/335541/107862149-8fb4a200-6dff-11eb-9009-3b57e249b227.png" width="500">
   
   This empty string is then propagated to `extra_filters` of the affected charts. This PR will treat empty strings as `null` when constructing filter values for the dashboard.
   
   This is the preferred fix because there may be existing `FilterBox` charts already have `defaultValue: ""` saved in their metadata.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   See  #13099 how to reproduce the bug.
   
   ### TEST PLAN
   
   1. Manual verification following steps in #13099
   2. Added a unit test 
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [x] 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] [superset] ktmud edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778928053


   @junlincc This is because the default time range filter ("Last week") was applied to your FilterBox chart. This is a legacy behavior I'm also not a fan of, but it is unrelated to this bug.
   
   At Airbnb, we've discussed whether to allow setting a default Time Range filter per datasource as removing this default filter may have performance impact on some datasets, but we never had the time to follow it though. Could be a nice roadmap item, though.


----------------------------------------------------------------
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] [superset] junlincc edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-779323228


   > I would vote for not putting effort into implementing default values in Explore view unless it's trivial, as the native select filter is almost ready for prime time and IMO provides a much cleaner UX than this component.
   
   I agree with @villebro . Grace and Zuzana, native filter is reaching feature parity in about 1 week. at that point, we will have our main focus on the new feature set and may not actively maintain FilterBox anymore(i don't think we will ever deprecate it though). Now is a good time to start the migration script as we discussed before.
   @graceguo-supercat @zuzana-vej @ktmud 
   
   cc @amitmiran137 @simcha90 


----------------------------------------------------------------
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] [superset] junlincc removed a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc removed a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-779324660


   > This is a known issue and also a separate bug.
   
   actually it's an inconsistent behavior, I'm inclined not to fix it. 


----------------------------------------------------------------
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] [superset] codecov-io edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778695004


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=h1) Report
   > Merging [#13109](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=desc) (390eb31) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `0.36%`.
   > The diff coverage is `57.98%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13109/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13109      +/-   ##
   ==========================================
   + Coverage   53.06%   53.42%   +0.36%     
   ==========================================
     Files         489      494       +5     
     Lines       17314    17373      +59     
     Branches     4482     4503      +21     
   ==========================================
   + Hits         9187     9281      +94     
   + Misses       8127     8092      -35     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `53.42% <57.98%> (+0.36%)` | :arrow_up: |
   
   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/superset/pull/13109?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `52.77% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `75.67% <0.00%> (-1.04%)` | :arrow_down: |
   | [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `50.00% <ø> (ø)` | |
   | [...rontend/src/components/ListView/CardSortSelect.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQ2FyZFNvcnRTZWxlY3QudHN4) | `78.94% <ø> (ø)` | |
   | [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `75.00% <0.00%> (ø)` | |
   | [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
   | [...rset-frontend/src/components/URLShortLinkModal.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rTW9kYWwudHN4) | `77.77% <ø> (ø)` | |
   | [...src/dashboard/components/FiltersBadge/selectors.ts](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9zZWxlY3RvcnMudHM=) | `90.00% <ø> (ø)` | |
   | [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `68.49% <ø> (+0.92%)` | :arrow_up: |
   | ... and [61 more](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13109?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/superset/pull/13109?src=pr&el=footer). Last update [bc4c837...390eb31](https://codecov.io/gh/apache/superset/pull/13109?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] [superset] junlincc edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778913892


   Thanks for the fix and house keeping! 
   After I select a default filter, there's no option showing in dropdown in Filterbox or Dashboard.  not sure this is related to your change. 
   <img width="1920" alt="Screen Shot 2021-02-14 at 7 21 29 PM" src="https://user-images.githubusercontent.com/67837651/107901973-fddd8f80-6ef9-11eb-9f23-14bb69cfc6cf.png">
   <img width="1918" alt="Screen Shot 2021-02-14 at 7 21 15 PM" src="https://user-images.githubusercontent.com/67837651/107901981-00d88000-6efa-11eb-85ad-600dfc70a291.png">
   


----------------------------------------------------------------
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] [superset] codecov-io commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778695004


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=h1) Report
   > Merging [#13109](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=desc) (390eb31) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **decrease** coverage by `9.09%`.
   > The diff coverage is `43.22%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13109/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13109?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13109      +/-   ##
   ==========================================
   - Coverage   53.06%   43.97%   -9.10%     
   ==========================================
     Files         489      492       +3     
     Lines       17314    17323       +9     
     Branches     4482     4479       -3     
   ==========================================
   - Hits         9187     7617    -1570     
   - Misses       8127     9706    +1579     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `43.97% <43.22%> (-9.10%)` | :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/superset/pull/13109?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `52.77% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `72.97% <0.00%> (-3.74%)` | :arrow_down: |
   | [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `50.00% <ø> (ø)` | |
   | [...rontend/src/components/ListView/CardSortSelect.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQ2FyZFNvcnRTZWxlY3QudHN4) | `78.94% <ø> (ø)` | |
   | [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `75.00% <0.00%> (ø)` | |
   | [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
   | [...rset-frontend/src/components/URLShortLinkModal.tsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rTW9kYWwudHN4) | `77.77% <ø> (ø)` | |
   | [...src/dashboard/components/FiltersBadge/selectors.ts](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9zZWxlY3RvcnMudHM=) | `62.50% <ø> (-27.50%)` | :arrow_down: |
   | [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `68.49% <ø> (+0.92%)` | :arrow_up: |
   | ... and [189 more](https://codecov.io/gh/apache/superset/pull/13109/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13109?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/superset/pull/13109?src=pr&el=footer). Last update [bc4c837...390eb31](https://codecov.io/gh/apache/superset/pull/13109?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] [superset] junlincc commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-779324660


   > This is a known issue and also a separate bug.
   
   actually it's an inconsistent behavior, I'm inclined not to fix it. 


----------------------------------------------------------------
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] [superset] ktmud edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778928053


   @junlincc This is because the default time range filter ("Last week") was applied to your FilterBox chart. This is a legacy behavior I'm also not a fan of, but it is unrelated to this bug.
   
   At Airbnb, we've discussed whether to allow setting a default Time Range filter per datasource as simply removing this default filter may have performance impact on some datasets, but we never had the time to follow it though. Could be a nice roadmap item, though.


----------------------------------------------------------------
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] [superset] ktmud commented on a change in pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #13109:
URL: https://github.com/apache/superset/pull/13109#discussion_r575716755



##########
File path: superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
##########
@@ -336,10 +328,12 @@ class FilterBox extends React.PureComponent {
     // Add created options to filtersChoices, even though it doesn't exist,
     // or these options will exist in query sql but invisible to end user.
     Object.keys(selectedValues)
-      .filter(
-        key => selectedValues.hasOwnProperty(key) && key in filtersChoices,
-      )
+      .filter(key => key in filtersChoices)
       .forEach(key => {
+        // empty values are ignored
+        if (!selectedValues[key]) {
+          return;
+        }

Review comment:
       This will fix this bug:
   
   ### Before
   
   <img width="382" alt="has-empty-value" src="https://user-images.githubusercontent.com/335541/107862200-0d78ad80-6e00-11eb-9771-ae67c11058f5.png">
   
   ### After
   
   <img width="386" alt="no-empty-value" src="https://user-images.githubusercontent.com/335541/107862203-12d5f800-6e00-11eb-8ef3-303fea3d56ee.png">
   

##########
File path: superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
##########
@@ -356,21 +350,21 @@ class FilterBox extends React.PureComponent {
             });
           });
       });
-    const { key, label } = filterConfig;
+    const {
+      key,
+      label,
+      [FILTER_CONFIG_ATTRIBUTES.MULTIPLE]: isMultiple,
+      [FILTER_CONFIG_ATTRIBUTES.DEFAULT_VALUE]: defaultValue,
+      [FILTER_CONFIG_ATTRIBUTES.CLEARABLE]: isClearable,
+      [FILTER_CONFIG_ATTRIBUTES.SEARCH_ALL_OPTIONS]: searchAllOptions,
+    } = filterConfig;

Review comment:
       I also did some light refactoring to make the code easier to read.

##########
File path: superset-frontend/src/visualizations/constants.js
##########
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-export const TIME_CHOICES = [
-  '1 hour ago',
-  '12 hours ago',
-  '1 day ago',
-  '7 days ago',
-  '28 days ago',
-  '90 days ago',
-  '1 year ago',
-];

Review comment:
       Bycatch: this constant is not used anywhere. 




----------------------------------------------------------------
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] [superset] junlincc commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778913892


   Thanks for the fix and sweeping the code. 
   After I select a default filter, there's no option showing in dropdown in Filterbox or Dashboard.  
   <img width="1920" alt="Screen Shot 2021-02-14 at 7 21 29 PM" src="https://user-images.githubusercontent.com/67837651/107901973-fddd8f80-6ef9-11eb-9f23-14bb69cfc6cf.png">
   <img width="1918" alt="Screen Shot 2021-02-14 at 7 21 15 PM" src="https://user-images.githubusercontent.com/67837651/107901981-00d88000-6efa-11eb-85ad-600dfc70a291.png">
   


----------------------------------------------------------------
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] [superset] ktmud commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778937045


   In Explore view, default values are not displayed in the rendered chart, but they will be applied in the dashboard. This is a separate bug. Feel free to create a new issue to track it, or I'll do some investigation when I have time.


----------------------------------------------------------------
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] [superset] villebro commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-779188696


   @ktmud @junlincc I was also quite surprised by the default values not showing up on Explore (I haven't used them that much). I would vote for not putting effort into implementing default values in Explore view unless it's trivial, as the native select filter is almost ready for prime time and IMO provides a much cleaner UX than this component.


----------------------------------------------------------------
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] [superset] ktmud commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778928053


   @junlincc This is because the default time range filter ("Last week") was applied to your FilterBox chart. This is a legacy behavior I'm also not a fan of, but it is unrelated to this chart.
   
   At Airbnb, we've discussed whether to allow setting a default Time Range filter per datasource as removing this default filter may have performance impact on some datasets, but we never had the time to follow it though. Could be a nice roadmap item, though.


----------------------------------------------------------------
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] [superset] junlincc merged pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc merged pull request #13109:
URL: https://github.com/apache/superset/pull/13109


   


----------------------------------------------------------------
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] [superset] junlincc commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-779323228


   > I would vote for not putting effort into implementing default values in Explore view unless it's trivial, as the native select filter is almost ready for prime time and IMO provides a much cleaner UX than this component.
   
   I agree with @villebro . Grace and Zuzana, native filter is reaching feature parity in about 1 week. at that point, we will have our main focus on the new feature set and may not actively maintain FilterBox anymore. Now is a good time to start the migration script as we discussed before.
   @graceguo-supercat @zuzana-vej @ktmud 
   
   cc @amitmiran137 @simcha90 


----------------------------------------------------------------
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] [superset] ktmud edited a comment on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
ktmud edited a comment on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778937045


   In Explore view, default values are not displayed in the rendered chart, but they will be applied in the dashboard. This is a known issue and also a separate bug. Feel free to create a new issue to track it, or I'll do some investigation when I have time.


----------------------------------------------------------------
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] [superset] junlincc commented on pull request #13109: fix(FilterBox): treat empty defaultValues as null

Posted by GitBox <gi...@apache.org>.
junlincc commented on pull request #13109:
URL: https://github.com/apache/superset/pull/13109#issuecomment-778930758


   hmm. i removed time filter but still not able to see the default value in country. @ktmud 


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