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 2022/11/03 19:47:41 UTC
[GitHub] [superset] michael-s-molina opened a new pull request, #22031: feat: Adds more customization properties to DropdownContainer
michael-s-molina opened a new pull request, #22031:
URL: https://github.com/apache/superset/pull/22031
### SUMMARY
Adds more customization properties to `DropdownContainer`:
- `popoverRef` to enable additional behaviors such as scrolling to a position when opening
- `popoverTriggerCount ` to modify the default counting behavior
- Custom `ref` with an `open` function to programmatically open the popover
Follow-up of https://github.com/apache/superset/pull/21974
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
https://user-images.githubusercontent.com/70410625/199819435-69cd7446-6496-489f-aade-4be9a6a1dd2e.mov
### TESTING INSTRUCTIONS
Check the video for instructions.
### ADDITIONAL INFORMATION
- [ ] 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] michael-s-molina commented on a diff in pull request #22031: feat: Adds more customization properties to DropdownContainer
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on code in PR #22031:
URL: https://github.com/apache/superset/pull/22031#discussion_r1014064984
##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -68,10 +71,18 @@ export interface DropdownContainerProps {
* Option to customize the content of the popover.
*/
popoverContent?: (overflowedItems: Item[]) => ReactElement;
+ /**
+ * Popover ref.
+ */
+ popoverRef?: RefObject<HTMLDivElement>;
/**
* Popover additional style properties.
*/
popoverStyle?: CSSProperties;
+ /**
+ * Displayed count in the popover trigger.
+ */
+ popoverTriggerCount?: number;
Review Comment:
External components will know which filters are in the dropdown using `onOverflowingStateChange` 😉
--
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 #22031: feat: Adds more customization properties to DropdownContainer
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22031:
URL: https://github.com/apache/superset/pull/22031#issuecomment-1302772647
# [Codecov](https://codecov.io/gh/apache/superset/pull/22031?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 [#22031](https://codecov.io/gh/apache/superset/pull/22031?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8fa18de) into [master](https://codecov.io/gh/apache/superset/commit/97e3e790a3627ff7e291865807bbe3634cc3a291?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (97e3e79) will **increase** coverage by `0.00%`.
> The diff coverage is `34.02%`.
> :exclamation: Current head 8fa18de differs from pull request most recent head 5fae326. Consider uploading reports for the commit 5fae326 to get more accurate results
```diff
@@ Coverage Diff @@
## master #22031 +/- ##
=======================================
Coverage 66.99% 66.99%
=======================================
Files 1814 1815 +1
Lines 69485 69528 +43
Branches 7473 7480 +7
=======================================
+ Hits 46549 46579 +30
- Misses 21012 21019 +7
- Partials 1924 1930 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `53.45% <33.33%> (+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/22031?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...rontend/src/components/DropdownContainer/index.tsx](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRHJvcGRvd25Db250YWluZXIvaW5kZXgudHN4) | `0.00% <0.00%> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `37.09% <ø> (ø)` | |
| [superset-frontend/src/dashboard/actions/hydrate.js](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2h5ZHJhdGUuanM=) | `1.78% <ø> (ø)` | |
| [...omponents/nativeFilters/FilterBar/Header/index.tsx](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0hlYWRlci9pbmRleC50c3g=) | `95.45% <0.00%> (+4.15%)` | :arrow_up: |
| [...set-frontend/src/dashboard/util/permissionUtils.ts](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL3Blcm1pc3Npb25VdGlscy50cw==) | `90.00% <ø> (ø)` | |
| [...et-frontend/src/dashboard/actions/dashboardInfo.ts](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZEluZm8udHM=) | `59.18% <69.56%> (+9.18%)` | :arrow_up: |
| [...ilters/FilterBar/FilterBarLocationSelect/index.tsx](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlckJhckxvY2F0aW9uU2VsZWN0L2luZGV4LnRzeA==) | `92.85% <92.85%> (ø)` | |
| [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <100.00%> (ø)` | |
| [...t-frontend/src/dashboard/reducers/dashboardInfo.js](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9yZWR1Y2Vycy9kYXNoYm9hcmRJbmZvLmpz) | `80.00% <100.00%> (+5.00%)` | :arrow_up: |
| [superset/dashboards/schemas.py](https://codecov.io/gh/apache/superset/pull/22031/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9zY2hlbWFzLnB5) | `99.46% <100.00%> (+<0.01%)` | :arrow_up: |
: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 a diff in pull request #22031: feat: Adds more customization properties to DropdownContainer
Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #22031:
URL: https://github.com/apache/superset/pull/22031#discussion_r1014053804
##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -68,10 +71,18 @@ export interface DropdownContainerProps {
* Option to customize the content of the popover.
*/
popoverContent?: (overflowedItems: Item[]) => ReactElement;
+ /**
+ * Popover ref.
+ */
+ popoverRef?: RefObject<HTMLDivElement>;
/**
* Popover additional style properties.
*/
popoverStyle?: CSSProperties;
+ /**
+ * Displayed count in the popover trigger.
+ */
+ popoverTriggerCount?: number;
Review Comment:
I think that we need to display the number of active filters in the dropdown. Since I don't think that the outside components now which filters are in the dropdown, I think that `popoverTriggerCount` needs to be a function that takes the elements in popover as an argument and returns a number. WDYT?
--
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 #22031: feat: Adds more customization properties to DropdownContainer
Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #22031:
URL: https://github.com/apache/superset/pull/22031#discussion_r1014066108
##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -68,10 +71,18 @@ export interface DropdownContainerProps {
* Option to customize the content of the popover.
*/
popoverContent?: (overflowedItems: Item[]) => ReactElement;
+ /**
+ * Popover ref.
+ */
+ popoverRef?: RefObject<HTMLDivElement>;
/**
* Popover additional style properties.
*/
popoverStyle?: CSSProperties;
+ /**
+ * Displayed count in the popover trigger.
+ */
+ popoverTriggerCount?: number;
Review Comment:
Oh nice!
--
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] michael-s-molina merged pull request #22031: feat: Adds more customization properties to DropdownContainer
Posted by GitBox <gi...@apache.org>.
michael-s-molina merged PR #22031:
URL: https://github.com/apache/superset/pull/22031
--
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