Bug description

We are using the embedded SDK for embedding, and it more or less works great. However, almost every dashboard configuration option seems to be ignored.

Here's our implementation:

superset.embedDashboard({
  id: embeddableDashboardIds[0],
  supersetDomain: supersetDomain,
  mountPoint: elementRef.current,
  fetchGuestToken: guestTokenCallback,
  dashboardUiConfig: {
    hideTitle: true,
    hideTab: true,
    filters: {
      visible: true,
      expanded: true,
    },
  },
})

From the dashboardUiConfig options, I would expect us to have a table and nothing more, but the attached screenshot shows filters and no title (good), but visible tabs (no). Hiding filters with visible/expanded: false doesn't actually work either.

When i pass standalone=3, this does remove everything as expected. But standalone=1 and standalone=2 do nothing, even if i remove the dashboardUiConfig.

Screenshots/recordings

Apache Superset Embedded SDK seemingly ignoring most dashboardUIConfig options

Superset version

4.0.2

Python version

3.10

Node version

18 or greater

Browser

Chrome

Additional context

We have these feature flags enabled: "EMBEDDED_SUPERSET" "EMBEDDABLE_CHARTS" "HORIZONTAL_FILTER_BAR"

I can't say which logs are relevant, but i see two: 2024-10-16 17:56:33,992:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped

2024-10-16 17:56:34,752:WARNING:superset.views.base:HTTPException
Traceback (most recent call last):

11:56:34.753
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request

11:56:34.753
    rv = self.dispatch_request()

11:56:34.753
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request

11:56:34.753
    self.raise_routing_exception(req)

11:56:34.753
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception

11:56:34.753
    raise request.routing_exception  # type: ignore

11:56:34.753
  File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request

11:56:34.753
    result = self.url_adapter.match(return_rule=True)  # type: ignore

11:56:34.753
  File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match

11:56:34.753
    raise NotFound() from None

11:56:34.753
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hey there, @apoteet! I'm here to help you with your Superset issue. I can assist with bug fixes, answer questions, and guide you to become a contributor. Let's tackle this together!

I found some similar discussions that might be relevant to your issue:

  1. Embedded dashboard charts "Applied Filter" not visible - This discussion addresses issues with embedded dashboard charts and filter visibility [1].

  2. Filter bar visibility setting on embedded dashboard - This thread discusses problems related to the visibility settings of the filter bar in embedded dashboards [2].

  3. Trying to embed Apache Superset to my React App - This discussion involves embedding Superset into a React application, which might provide insights into similar embedding issues [3].

Regarding your specific issue with dashboardUiConfig options being ignored, it's important to note that the standalone parameter affects the rendering of embedded dashboards. When set to true, it removes surrounding UI elements, which might explain why standalone=3 removes everything as expected. However, the behavior of standalone=1 and standalone=2 not working as expected could be due to specific configurations or conditions that are not documented [4].

Additionally, the feature flags you have enabled, such as EMBEDDED_SUPERSET, EMBEDDABLE_CHARTS, and HORIZONTAL_FILTER_BAR, play roles in configuring embedded dashboards. These flags might interact with your dashboardUiConfig settings, potentially affecting their behavior [5].

The werkzeug.exceptions.NotFound error in your logs might be unrelated to the dashboardUiConfig issue, but it indicates a routing problem where a requested URL was not found on the server. This could be a separate issue to investigate further.

To continue talking to Dosu, mention @dosu.

Comment From: rusackas

Are you still facing any of these issues? I think much of this has been fixed in the last 6 months + that this has been silent.

Comment From: apoteet

Would this be fixed by the embedded sdk or superset itself? I just bumped my sdk version and see the same issue. We haven't upgraded superset since this was opened, so TBH i couldn't tell you if that would fix it. We happened to get around the tabs issue due to a requirements change to make each tab a separate page and iframe

Comment From: bahriddin

It is still an issue. I am on ver. 4.1.2 and still can't hide filter bar. Workaround was to set standalone: 3 in the urlParams (also mentioned here)