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/30 21:35:09 UTC

[GitHub] [superset] michael-s-molina opened a new pull request, #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

michael-s-molina opened a new pull request, #22287:
URL: https://github.com/apache/superset/pull/22287

   ### SUMMARY
   Automatically closes the `DropdownContainer` when scrolling outside of the component.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   https://user-images.githubusercontent.com/70410625/204912730-974ed14f-ec05-443f-b6c2-5236ba12eaaf.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] github-actions[bot] commented on pull request #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22287:
URL: https://github.com/apache/superset/pull/22287#issuecomment-1333618223

   @kgabryje Ephemeral environment spinning up at http://34.217.43.34:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


-- 
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 #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22287:
URL: https://github.com/apache/superset/pull/22287#issuecomment-1332831280

   # [Codecov](https://codecov.io/gh/apache/superset/pull/22287?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 [#22287](https://codecov.io/gh/apache/superset/pull/22287?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1bc6e29) into [master](https://codecov.io/gh/apache/superset/commit/3ffe7828a75eeb16af88798ab6ae01bbb835d770?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3ffe782) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #22287   +/-   ##
   =======================================
     Coverage   66.79%   66.79%           
   =======================================
     Files        1846     1846           
     Lines       70286    70290    +4     
     Branches     7683     7683           
   =======================================
   + Hits        46948    46952    +4     
     Misses      21346    21346           
     Partials     1992     1992           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `53.80% <100.00%> (+<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/22287?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/22287/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) | `80.00% <100.00%> (+1.42%)` | :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] michael-s-molina merged pull request #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
michael-s-molina merged PR #22287:
URL: https://github.com/apache/superset/pull/22287


-- 
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 #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
kgabryje commented on PR #22287:
URL: https://github.com/apache/superset/pull/22287#issuecomment-1333612868

   /testenv up FEATURE_HORIZONTAL_FILTER_BAR=true


-- 
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 #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #22287:
URL: https://github.com/apache/superset/pull/22287#discussion_r1036942753


##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -249,6 +249,14 @@ const DropdownContainer = forwardRef(
       [ref],
     );
 
+    // Closes the popover when scrolling on the document
+    useEffect(() => {
+      document.onscroll = () => setPopoverVisible(false);

Review Comment:
   Can we add throttling? Or call it only if popover is open?



-- 
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 #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #22287:
URL: https://github.com/apache/superset/pull/22287#discussion_r1037023826


##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -249,6 +249,14 @@ const DropdownContainer = forwardRef(
       [ref],
     );
 
+    // Closes the popover when scrolling on the document
+    useEffect(() => {
+      document.onscroll = () => setPopoverVisible(false);

Review Comment:
   Or we could even add the scroll listener when popover opens and remove it when popover closes



-- 
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 #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on code in PR #22287:
URL: https://github.com/apache/superset/pull/22287#discussion_r1037138783


##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -249,6 +249,14 @@ const DropdownContainer = forwardRef(
       [ref],
     );
 
+    // Closes the popover when scrolling on the document
+    useEffect(() => {
+      document.onscroll = () => setPopoverVisible(false);

Review Comment:
   Good suggestion. I changed the code to remove the listener when closing the popover and tested that it does not require throttling.



-- 
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] github-actions[bot] commented on pull request #22287: feat: Automatically closes the DropdownContainer when scrolling outside of the component

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22287:
URL: https://github.com/apache/superset/pull/22287#issuecomment-1333980208

   Ephemeral environment shutdown and build artifacts deleted.


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