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/05/07 00:40:06 UTC

[GitHub] [superset] ktmud opened a new pull request, #19983: feat: save active tabs in dashboard permalink

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   
   Save which tabs are selected in permalink state and restore the tab selection so we can restore the same tab selection when users open a dashboard using permalink.
   
   Also renamed properties in the dashboard permalink state to make them easier to understand.
   
   This is for preparation for https://github.com/apache/superset/pull/19354 where we allow users to set tab selection when generating email reports for dashboards. The next step is to generate dashboard screenshots from permalink as well and attach the permalink to the email reports (we will generate a new permalink in the backend based on reports metadata). The next next step is to allow saving filter states in dashboard reports, too.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A
   
   ### TESTING INSTRUCTIONS
   
   1. Go to a tabbed dashboard with multiple tabbed sections
   2. Switch more than one tab sections and copy a permalink for some tab
   3. When opening the permalink, the previous tab selection should be retained
   
   ### 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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset/views/core.py:
##########
@@ -2001,13 +2001,13 @@ def dashboard_permalink(  # pylint: disable=no-self-use
             return redirect("/dashboard/list/")
         if not value:
             return json_error_response(_("permalink state not found"), status=404)
-        dashboard_id = value["dashboardId"]
+        dashboard_id, state = value["dashboardId"], value.get("state", {})

Review Comment:
   Nah, just my style choice. Since they are both derived from the same variable. It's more concise to be written in one line. This is similar to object expansion in JS.



-- 
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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset/migrations/versions/2022-06-27_14-59_7fb8bca906d2_permalink_rename_filterstate.py:
##########
@@ -0,0 +1,91 @@
+# 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.
+"""permalink_rename_filterState
+
+Revision ID: 7fb8bca906d2
+Revises: f3afaf1f11f0
+Create Date: 2022-06-27 14:59:20.740380
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = "7fb8bca906d2"
+down_revision = "f3afaf1f11f0"
+
+import pickle
+
+from alembic import op
+from sqlalchemy import Column, Integer, LargeBinary, String
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy.orm import Session
+
+from superset import db
+from superset.migrations.shared.utils import paginated_update
+
+Base = declarative_base()
+VALUE_MAX_SIZE = 2**24 - 1

Review Comment:
   We shouldn't import things from modules for migrations as modules may be move around and these constant values may change but migrations need to be deterministic. 



-- 
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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/utils/urlUtils.ts:
##########
@@ -134,14 +133,7 @@ function getPermalink(endpoint: string, jsonPayload: JsonObject) {
   return SupersetClient.post({
     endpoint,
     jsonPayload,
-  })
-    .then(result => result.json.url as string)
-    .catch(response =>
-      // @ts-ignore
-      getClientErrorObject(response).then(({ error, statusText }) =>
-        Promise.reject(error || statusText),
-      ),
-    );

Review Comment:
   Errors should be handled downstream---when it's about to be rendered. These adhoc handling of API errors makes it more difficult to handle errors consistently.



-- 
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] eschutho commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -338,7 +336,9 @@ export const hydrateDashboard =
     }
 
     const { roles } = user;
-    const canEdit = canUserEditDashboard(dashboardData, user);
+    const canEdit = canUserEditDashboard(dashboard, user);
+
+    console.log(activeTabs);

Review Comment:
   left over console log



-- 
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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx:
##########
@@ -66,7 +75,14 @@ export default function URLShortLinkButton({
       trigger="click"
       placement={placement}
       content={
-        <div id="shorturl-popover" data-test="shorturl-popover">
+        // eslint-disable-next-line jsx-a11y/no-static-element-interactions

Review Comment:
   The click event also triggers popover open. Since this is related to the popover, I thought it'd make more sense to handle the event on the direct children of the popover trigger. If we stop propagation on the icon, the popover may not  even 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] codecov[bot] commented on pull request #19983: feat: save active tabs in dashboard permalink

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19983?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 [#19983](https://codecov.io/gh/apache/superset/pull/19983?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7b670a3) into [master](https://codecov.io/gh/apache/superset/commit/54bfd8375aa34bae928ca32bc0942d75ed7057fc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (54bfd83) will **decrease** coverage by `12.10%`.
   > The diff coverage is `49.25%`.
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #19983       +/-   ##
   ===========================================
   - Coverage   66.28%   54.18%   -12.11%     
   ===========================================
     Files        1712     1712               
     Lines       63961    63960        -1     
     Branches     6731     6731               
   ===========================================
   - Hits        42395    34655     -7740     
   - Misses      19855    27594     +7739     
     Partials     1711     1711               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.52% <41.46%> (+0.01%)` | :arrow_up: |
   | python | `57.33% <51.21%> (-25.15%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `48.64% <26.82%> (+<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/19983?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/dashboard/containers/DashboardPage.tsx](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZFBhZ2UudHN4) | `5.31% <0.00%> (ø)` | |
   | [...rset-frontend/src/hooks/apiResources/dashboards.ts](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2hvb2tzL2FwaVJlc291cmNlcy9kYXNoYm9hcmRzLnRz) | `36.36% <ø> (ø)` | |
   | [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `63.15% <0.00%> (ø)` | |
   | [superset/charts/schemas.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvY2hhcnRzL3NjaGVtYXMucHk=) | `99.35% <ø> (-0.01%)` | :arrow_down: |
   | [superset/examples/deck.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvZXhhbXBsZXMvZGVjay5weQ==) | `0.00% <0.00%> (ø)` | |
   | [superset/examples/misc\_dashboard.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvZXhhbXBsZXMvbWlzY19kYXNoYm9hcmQucHk=) | `0.00% <0.00%> (ø)` | |
   | [superset/examples/tabbed\_dashboard.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvZXhhbXBsZXMvdGFiYmVkX2Rhc2hib2FyZC5weQ==) | `0.00% <0.00%> (ø)` | |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `0.00% <0.00%> (-30.67%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/19983/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-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `35.16% <0.00%> (-42.21%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/actions/hydrate.js](https://codecov.io/gh/apache/superset/pull/19983/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=) | `2.12% <12.50%> (ø)` | |
   | ... and [294 more](https://codecov.io/gh/apache/superset/pull/19983/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/19983?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/19983?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 [54bfd83...7b670a3](https://codecov.io/gh/apache/superset/pull/19983?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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -338,7 +336,9 @@ export const hydrateDashboard =
     }
 
     const { roles } = user;
-    const canEdit = canUserEditDashboard(dashboardData, user);
+    const canEdit = canUserEditDashboard(dashboard, user);
+
+    console.log(activeTabs);

Review Comment:
   Thanks for catching this! I'll keep iterating on this until https://github.com/apache/superset/pull/19966 is merged. 



##########
superset-frontend/src/dashboard/actions/hydrate.js:
##########
@@ -338,7 +336,9 @@ export const hydrateDashboard =
     }
 
     const { roles } = user;
-    const canEdit = canUserEditDashboard(dashboardData, user);
+    const canEdit = canUserEditDashboard(dashboard, user);
+
+    console.log(activeTabs);

Review Comment:
   Thanks for catching this! I'll keep iterating on this PR until https://github.com/apache/superset/pull/19966 is merged. 



-- 
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] ktmud commented on pull request #19983: feat: save active tabs in dashboard permalink

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

   @eschutho This should be ready for re-review.
   
   @villebro @michael-s-molina in case you have an interest in this as well.


-- 
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] ktmud commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx:
##########
@@ -66,7 +77,14 @@ export default function URLShortLinkButton({
       trigger="click"
       placement={placement}
       content={
-        <div id="shorturl-popover" data-test="shorturl-popover">
+        // eslint-disable-next-line jsx-a11y/no-static-element-interactions
+        <div
+          id="shorturl-popover"
+          data-test="shorturl-popover"
+          onClick={e => {
+            e.stopPropagation();
+          }}
+        >

Review Comment:
   Stop clicking on the copy icon from switching tabs, which is kind of surprising/annoying----if clicking on the link icon doesn't switch tabs, then clicking on things in the popover triggered by the link icon shouldn't switch tabs either.
   
   ### Before
   
   ![tab-copy-click-before](https://user-images.githubusercontent.com/335541/176044731-170e1800-228e-452c-9954-2c9986318dba.gif)
   
   ### After
   
   ![tab-copy-click-after](https://user-images.githubusercontent.com/335541/176044995-9a477fce-fb09-4531-80fe-15ca5018e8d7.gif)
   
   



-- 
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] ktmud merged pull request #19983: feat: save active tabs in dashboard permalink

Posted by GitBox <gi...@apache.org>.
ktmud merged PR #19983:
URL: https://github.com/apache/superset/pull/19983


-- 
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] etr2460 commented on a diff in pull request #19983: feat: save active tabs in dashboard permalink

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


##########
superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx:
##########
@@ -66,7 +75,14 @@ export default function URLShortLinkButton({
       trigger="click"
       placement={placement}
       content={
-        <div id="shorturl-popover" data-test="shorturl-popover">
+        // eslint-disable-next-line jsx-a11y/no-static-element-interactions

Review Comment:
   hmm, shouldn't the stop propagation go on the copy to clipboard link instead? It's weird that we need to handle a click on a div



##########
superset/views/core.py:
##########
@@ -2001,13 +2001,13 @@ def dashboard_permalink(  # pylint: disable=no-self-use
             return redirect("/dashboard/list/")
         if not value:
             return json_error_response(_("permalink state not found"), status=404)
-        dashboard_id = value["dashboardId"]
+        dashboard_id, state = value["dashboardId"], value.get("state", {})

Review Comment:
   is this standard styling? i would just use 2 lines tbh



##########
superset-frontend/src/utils/urlUtils.ts:
##########
@@ -134,14 +133,7 @@ function getPermalink(endpoint: string, jsonPayload: JsonObject) {
   return SupersetClient.post({
     endpoint,
     jsonPayload,
-  })
-    .then(result => result.json.url as string)
-    .catch(response =>
-      // @ts-ignore
-      getClientErrorObject(response).then(({ error, statusText }) =>
-        Promise.reject(error || statusText),
-      ),
-    );

Review Comment:
   we'll never get an error here?



##########
superset/migrations/versions/2022-06-27_14-59_7fb8bca906d2_permalink_rename_filterstate.py:
##########
@@ -0,0 +1,91 @@
+# 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.
+"""permalink_rename_filterState
+
+Revision ID: 7fb8bca906d2
+Revises: f3afaf1f11f0
+Create Date: 2022-06-27 14:59:20.740380
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = "7fb8bca906d2"
+down_revision = "f3afaf1f11f0"
+
+import pickle
+
+from alembic import op
+from sqlalchemy import Column, Integer, LargeBinary, String
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy.orm import Session
+
+from superset import db
+from superset.migrations.shared.utils import paginated_update
+
+Base = declarative_base()
+VALUE_MAX_SIZE = 2**24 - 1

Review Comment:
   can we import this from the model file instead of defining it twice?



##########
superset/key_value/models.py:
##########
@@ -21,14 +21,16 @@
 from superset import security_manager
 from superset.models.helpers import AuditMixinNullable, ImportExportMixin
 
+VALUE_MAX_SIZE = 2**24 - 1

Review Comment:
   heh, nice bycatch



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