You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kgabryje (via GitHub)" <gi...@apache.org> on 2023/04/04 15:18:54 UTC

[GitHub] [superset] kgabryje opened a new pull request, #23575: feat: Drill by open in Explore

kgabryje opened a new pull request, #23575:
URL: https://github.com/apache/superset/pull/23575

   ### SUMMARY
   This PR enables opening Drill By chart in Explore. The feature is similar to "Edit chart" in Dashboard, except in this case we treat the drill by result as a completely new chart - which means that we don't preserve the original chart's id or name. Additionally, the filters inherited from dashboard (native filters, cross filters) are not treated as "extra" filters, which means they will get saved with the chart (as opposed to editing an existing chart from the dashboard).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   https://user-images.githubusercontent.com/15073128/229819841-96b70a63-3d48-451b-a4c7-40d96c5e545a.mov
   
   
   
   ### TESTING INSTRUCTIONS
   0. Enable `DRILL_BY` ff
   1. Right click on a series -> drill by -> column
   2. In drill by modal, click (or right click to open in new tab) "Edit chart"
   3. You should see exactly the same chart in Explore as it was in the drill by modal. Compared to original chart, the adhoc filters have additional filter equal to clicked series appended, and groupby is replaced by clicked column.
   4. If there were any native filters or cross filters in the dashboard, they are added as adhoc filters in Explore, but NOT as "extra" filters - they don't have the warning icon and they will get saved with the chart.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje commented on a diff in pull request #23575: feat: Drill by open in Explore

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on code in PR #23575:
URL: https://github.com/apache/superset/pull/23575#discussion_r1158192281


##########
superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts:
##########
@@ -58,6 +58,7 @@ export interface FreeFormAdhocFilter {
   expressionType: 'SQL';
   clause: 'WHERE' | 'HAVING';
   sqlExpression: string;
+  isExtra?: boolean;

Review Comment:
   Good point, done!



##########
superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts:
##########
@@ -58,6 +58,7 @@ export interface FreeFormAdhocFilter {
   expressionType: 'SQL';
   clause: 'WHERE' | 'HAVING';
   sqlExpression: string;
+  isExtra?: boolean;

Review Comment:
   Good point, done!



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 a diff in pull request #23575: feat: Drill by open in Explore

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #23575:
URL: https://github.com/apache/superset/pull/23575#discussion_r1158162635


##########
superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts:
##########
@@ -58,6 +58,7 @@ export interface FreeFormAdhocFilter {
   expressionType: 'SQL';
   clause: 'WHERE' | 'HAVING';
   sqlExpression: string;
+  isExtra?: boolean;

Review Comment:
   HIGHLY optional, but.. While we're at it, I believe `timeGrain` is also a valid prop for `FreeFormAdhocFilter`, similar to `BaseSimpleAdhocFilter` (at least it should be). The fact that this and `timeGrain` was missing here kinda indicates that we might benefit from some added abstraction, like
   
   ```typescript
   interface BaseAdhocFilter = {
     clause: 'WHERE' | 'HAVING';
     timeGrain?: TimeGranularity;
     isExtra?: boolean;
   }
   
   type BaseSimpleAdhocFilter = BaseAdhocFilter & {
     expressionType: 'SIMPLE';
     subject: string;
   }
   
   export type FreeFormAdhocFilter = BaseAdhocFilter & {
     expressionType: 'SQL';
     sqlExpression: string;
   }
   ```



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 a diff in pull request #23575: feat: Drill by open in Explore

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #23575:
URL: https://github.com/apache/superset/pull/23575#discussion_r1158162635


##########
superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts:
##########
@@ -58,6 +58,7 @@ export interface FreeFormAdhocFilter {
   expressionType: 'SQL';
   clause: 'WHERE' | 'HAVING';
   sqlExpression: string;
+  isExtra?: boolean;

Review Comment:
   HIGHLY optional, but.. While we're at it, I believe `timeGrain` is also a valid prop for `FreeFormAdhocFilter`, similar to `BaseSimpleAdhocFilter` (at least it should be). The fact that this and `timeGrain` was missing here kinda indicates that we might benefit from some added abstraction, like
   
   ```typescript
   interface BaseAdhocFilter = {
     clause: 'WHERE' | 'HAVING';
     timeGrain?: TimeGranularity;
     isExtra?: boolean;
   }
   
   type BaseSimpleAdhocFilter =  BaseAdhocFilter & {
     expressionType: 'SIMPLE';
     subject: string;
   }
   
   export type FreeFormAdhocFilter = BaseAdhocFilter & {
     expressionType: 'SQL';
     sqlExpression: string;
   }
   ```



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] commented on pull request #23575: feat: Drill by open in Explore

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23575:
URL: https://github.com/apache/superset/pull/23575#issuecomment-1496417380

   ## [Codecov](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#23575](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (27fdf33) into [master](https://codecov.io/gh/apache/superset/commit/d966db61af5ae6313c5ce171ee99919390c82a01?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d966db6) will **increase** coverage by `0.01%`.
   > The diff coverage is `86.11%`.
   
   > :exclamation: Current head 27fdf33 differs from pull request most recent head 7b1f282. Consider uploading reports for the commit 7b1f282 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #23575      +/-   ##
   ==========================================
   + Coverage   67.71%   67.72%   +0.01%     
   ==========================================
     Files        1916     1916              
     Lines       74020    74029       +9     
     Branches     8041     8040       -1     
   ==========================================
   + Hits        50122    50136      +14     
   + Misses      21848    21845       -3     
   + Partials     2050     2048       -2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `53.96% <84.37%> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ackages/superset-ui-core/src/query/types/Filter.ts](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvRmlsdGVyLnRz) | `100.00% <ø> (ø)` | |
   | [...tend/src/components/Chart/DrillBy/DrillByChart.tsx](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvRHJpbGxCeS9EcmlsbEJ5Q2hhcnQudHN4) | `100.00% <ø> (+7.14%)` | :arrow_up: |
   | [.../nativeFilters/FilterBar/CrossFilters/selectors.ts](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0Nyb3NzRmlsdGVycy9zZWxlY3RvcnMudHM=) | `9.09% <0.00%> (-0.91%)` | :arrow_down: |
   | [...rc/dashboard/components/nativeFilters/selectors.ts](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvc2VsZWN0b3JzLnRz) | `58.26% <ø> (+0.90%)` | :arrow_up: |
   | [superset-frontend/src/views/menu.tsx](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL21lbnUudHN4) | `0.00% <ø> (ø)` | |
   | [...tend/src/components/Chart/DrillBy/DrillByModal.tsx](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvRHJpbGxCeS9EcmlsbEJ5TW9kYWwudHN4) | `86.66% <85.71%> (-5.00%)` | :arrow_down: |
   | [...nd/src/dashboard/components/FiltersBadge/index.tsx](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9pbmRleC50c3g=) | `85.71% <100.00%> (+1.09%)` | :arrow_up: |
   | [...re/controlUtils/getFormDataWithDashboardContext.ts](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFV0aWxzL2dldEZvcm1EYXRhV2l0aERhc2hib2FyZENvbnRleHQudHM=) | `80.59% <100.00%> (+1.56%)` | :arrow_up: |
   | [superset/models/dashboard.py](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2Rhc2hib2FyZC5weQ==) | `78.16% <100.00%> (+0.29%)` | :arrow_up: |
   | [superset/models/slice.py](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL3NsaWNlLnB5) | `87.20% <100.00%> (+0.41%)` | :arrow_up: |
   | ... and [1 more](https://codecov.io/gh/apache/superset/pull/23575?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ... and [2 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23575/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje commented on pull request #23575: feat: Drill by open in Explore

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on PR #23575:
URL: https://github.com/apache/superset/pull/23575#issuecomment-1497104946

   > Very exciting stuff! 😻 LGTM with a very optional typing improvement idea (if it feels like over abstraction it probably is, so feel free to ignore). Also, not something that needs to be addressed in this PR, but... I _really_ wanted to see if I was able to drill further down into the chart 😆, and I was slightly 😿 when the context menu didn't show up: <img alt="image" width="897" src="https://user-images.githubusercontent.com/33317356/230020788-9ca99114-1bd2-409c-958e-0bcdf7d8cff6.png">
   > 
   > Also, it would be nice if the drilling dimensions were somehow displayed in the drill down modal (I assume this is something that's planned for a future PR).
   
   Both coming soon! 🙂 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje merged pull request #23575: feat: Drill by open in Explore

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje merged PR #23575:
URL: https://github.com/apache/superset/pull/23575


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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