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/07/15 15:28:50 UTC

[GitHub] [superset] geido opened a new pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

geido opened a new pull request #15709:
URL: https://github.com/apache/superset/pull/15709


   ### SUMMARY
   It removes the `edit` param from the URL when discarding the changes of a newly created dashboard in order to exist the edit mode.
   
   Fixes #15673 
   
   ### BEFORE
   
   https://user-images.githubusercontent.com/60598000/125814297-5638f4ee-b2a7-4550-8c93-b8652bb2be9d.mov
   
   ### AFTER
   
   https://user-images.githubusercontent.com/60598000/125814640-e1812885-3988-4ff2-b720-854dcea460af.mp4
   
   ### TESTING INSTRUCTIONS
   1. Click on the global + button and create a new dashboard or click on the + dashboard from dashboard page list
   2. Do not add anything to the new dashboard and click on 'DISCARD CHANGE' in dashboard edit mode
   3. Observe the behavior
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: #15673 
   - [ ] 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] geido commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       I agree. However, the original implementation used window reload for simplicity, otherwise we would need to implement a method to remove ptogrammatically any component that was added to the dashboard and that wasn't saved yet. As this is a P1 bug, I think we should fix the original problem first and consider making a better implementation in a later stage.




-- 
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] rusackas commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       I'm also curious if there might be any expectation for the back button to work. If so, it might be worth trying `window.location.assign(url)` or `window.location = url` or `window.location.href = url` (which all do the same thing)




-- 
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] geido commented on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   @jinghua-qa @junlincc


-- 
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 #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   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


[GitHub] [superset] github-actions[bot] commented on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   @geido Ephemeral environment spinning up at http://34.218.244.41: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] geido commented on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   /testenv up


-- 
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] edited a comment on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #15709:
URL: https://github.com/apache/superset/pull/15709#issuecomment-880807176






-- 
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] junlincc edited a comment on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   /testenv up
   


-- 
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] geido commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       @rusackas Changing to `assign` allows to go back to the edit mode indeed which is what you are looking for, I guess. If the expectation is to undo the "discard changes" action instead, the back button won't be able to achieve that. Every component added and then discarded will be gone when going back.




-- 
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] geido commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       I agree. However, the original implementation used window reload for simplicity, otherwise we would need to implement a method to remove programmatically any component that was added to the dashboard and that wasn't saved yet. As this is a P1 bug, I think we should fix the original problem first and consider a refactor in a later stage.




-- 
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] pkdotson merged pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   


-- 
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] suddjian commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       We should use react router for this instead, if possible.




-- 
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 #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/15709?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 [#15709](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e3f6dcd) into [master](https://codecov.io/gh/apache/superset/commit/b489cffb570c4d078ec982fd11c3e46dd0310f24?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b489cff) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/15709/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #15709      +/-   ##
   ==========================================
   - Coverage   76.82%   76.82%   -0.01%     
   ==========================================
     Files         983      983              
     Lines       51585    51588       +3     
     Branches     6974     6974              
   ==========================================
     Hits        39632    39632              
   - Misses      11729    11732       +3     
     Partials      224      224              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.33% <0.00%> (-0.01%)` | :arrow_down: |
   
   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/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `66.42% <0.00%> (-0.97%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `58.97% <0.00%> (ø)` | |
   | [superset-frontend/src/setup/setupErrorMessages.ts](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRXJyb3JNZXNzYWdlcy50cw==) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b489cff...e3f6dcd](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov[bot] edited a comment on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #15709:
URL: https://github.com/apache/superset/pull/15709#issuecomment-880807176


   # [Codecov](https://codecov.io/gh/apache/superset/pull/15709?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 [#15709](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5a68ab3) into [master](https://codecov.io/gh/apache/superset/commit/45c3ae0bf910e55a3e591dcdc5c8fb30f90c18af?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (45c3ae0) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 5a68ab3 differs from pull request most recent head de90c2a. Consider uploading reports for the commit de90c2a to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/15709/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #15709      +/-   ##
   ==========================================
   - Coverage   77.07%   77.07%   -0.01%     
   ==========================================
     Files         983      983              
     Lines       51618    51620       +2     
     Branches     6991     6991              
   ==========================================
     Hits        39785    39785              
   - Misses      11608    11610       +2     
     Partials      225      225              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.68% <0.00%> (-0.01%)` | :arrow_down: |
   
   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/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `66.42% <0.00%> (-0.97%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [45c3ae0...de90c2a](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] junlincc commented on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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


   /testenv 
   


-- 
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] edited a comment on pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #15709:
URL: https://github.com/apache/superset/pull/15709#issuecomment-880807176


   # [Codecov](https://codecov.io/gh/apache/superset/pull/15709?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 [#15709](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e3f6dcd) into [master](https://codecov.io/gh/apache/superset/commit/45c3ae0bf910e55a3e591dcdc5c8fb30f90c18af?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (45c3ae0) will **decrease** coverage by `0.25%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head e3f6dcd differs from pull request most recent head de90c2a. Consider uploading reports for the commit de90c2a to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/15709/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #15709      +/-   ##
   ==========================================
   - Coverage   77.07%   76.82%   -0.26%     
   ==========================================
     Files         983      983              
     Lines       51618    51588      -30     
     Branches     6991     6974      -17     
   ==========================================
   - Hits        39785    39632     -153     
   - Misses      11608    11732     +124     
   + Partials      225      224       -1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.33% <0.00%> (-0.36%)` | :arrow_down: |
   | presto | `?` | |
   
   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/15709?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `66.42% <0.00%> (-0.97%)` | :arrow_down: |
   | [superset-frontend/src/components/Select/Select.tsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1NlbGVjdC50c3g=) | `12.13% <0.00%> (-43.36%)` | :arrow_down: |
   | [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `66.66% <0.00%> (-20.84%)` | :arrow_down: |
   | [...ols/DndColumnSelectControl/utils/optionSelector.ts](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL3V0aWxzL29wdGlvblNlbGVjdG9yLnRz) | `34.48% <0.00%> (-11.68%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `84.42% <0.00%> (-5.90%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndColumnSelect.tsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZENvbHVtblNlbGVjdC50c3g=) | `60.00% <0.00%> (-4.59%)` | :arrow_down: |
   | [...explore/components/controls/ColorSchemeControl.jsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Db2xvclNjaGVtZUNvbnRyb2wuanN4) | `86.20% <0.00%> (-2.69%)` | :arrow_down: |
   | [...perset-frontend/src/explore/components/Control.tsx](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Db250cm9sLnRzeA==) | `75.00% <0.00%> (-1.48%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.49% <0.00%> (-1.41%)` | :arrow_down: |
   | [superset/utils/webdriver.py](https://codecov.io/gh/apache/superset/pull/15709/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-c3VwZXJzZXQvdXRpbHMvd2ViZHJpdmVyLnB5) | `78.66% <0.00%> (-0.83%)` | :arrow_down: |
   | ... and [27 more](https://codecov.io/gh/apache/superset/pull/15709/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [45c3ae0...de90c2a](https://codecov.io/gh/apache/superset/pull/15709?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] geido commented on a change in pull request #15709: fix(dashboard): Remove edit from url params when discarding changes

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



##########
File path: superset-frontend/src/dashboard/components/Header/index.jsx
##########
@@ -129,7 +129,10 @@ const StyledDashboardHeader = styled.div`
 
 class Header extends React.PureComponent {
   static discardChanges() {
-    window.location.reload();
+    const url = new URL(window.location.href);
+
+    url.searchParams.delete('edit');
+    window.location.replace(url);

Review comment:
       @rusackas Changing to `assign` allows to go back to the edit mode indeed which is what you are looking for, I guess. If the expectation is to undo the "discard changes" action instead, the back button won't be able to achieve that. Every component added and then discarded will be gone when going back.




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