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/08/13 07:26:25 UTC

[GitHub] [superset] villebro commented on pull request #16200: chore: Shows the dataset description in the gallery dropdown

villebro commented on pull request #16200:
URL: https://github.com/apache/superset/pull/16200#issuecomment-898249185


   I love the lazy loading of datasource data! As we now no longer need it in bootstrap data, we can pull it out with this change to make page loading marginally faster/lighter:
   ```diff
   diff --git a/superset/views/chart/views.py b/superset/views/chart/views.py
   index 68c19cc2c..01b9e53ca 100644
   --- a/superset/views/chart/views.py
   +++ b/superset/views/chart/views.py
   @@ -62,15 +62,7 @@ class SliceModelView(
        @expose("/add", methods=["GET", "POST"])
        @has_access
        def add(self) -> FlaskResponse:
   -        datasources = [
   -            {"value": str(d.id) + "__" + d.type, "label": repr(d)}
   -            for d in security_manager.get_user_datasources()
   -        ]
            payload = {
   -            "datasources": sorted(
   -                datasources,
   -                key=lambda d: d["label"].lower() if isinstance(d["label"], str) else "",
   -            ),
                "common": common_bootstrap_payload(),
                "user": bootstrap_user_data(g.user),
            }
   ```
   Other than that I love @rusackas propsal to place the tooltip on the right - LGTM after these changes.


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