embedding-api-v3-guide icon indicating copy to clipboard operation
embedding-api-v3-guide copied to clipboard

Implement both Default/Desktop and Mobile device types

Open paarriagadap opened this issue 3 years ago • 6 comments

Hello, I was wondering if you know how to implement the Embedding API v3 with the possibility to use both the Default or Desktop device setting together with the Mobile option. It seems the v2 and v3 only allow to choose one of them, while the v1 from the 'share' dialog works for any device it is previously set.

Thanks!

paarriagadap avatar Apr 02 '22 15:04 paarriagadap

Hi @paarriagadap - Thank you for opening this issue. Do you mind clarifying what you mean by using both the default or desktop device setting together with the mobile option? What are you trying to achieve?

illonage avatar May 24 '22 01:05 illonage

Hi! I'm trying to embed Tableau visualizations in a website, and show the Mobile design when using a mobile phone and the Desktop design when using a desktop device. It seems it's not possible with the API, as I'm forced to select only one of them. It is not the case with the embed code available at Tableau Public, for instance. With the Mobile/Desktop design I mean the layouts described here.

paarriagadap avatar May 24 '22 02:05 paarriagadap

Hi @paarriagadap - Yes, you can using HTML Attribute define which design you want to embed in your application. The HTML Attribute is called device. You can learn more about it in our documentation here.

I hope it helps

illonage avatar Jun 20 '22 19:06 illonage

Hi, I know the device attribute exists, I'm saying it seems not possible to implement both Desktop and Mobile settings at the same time, because obviously the desktop and phone attributes keep only one of them and now I realise that the default or blank settings do show both desktop and mobile settings when needed, but with a blank space when one of them has a longer height than the other, something that doesn't happen with the v1 share dialog still available.

See here, with the API v3: https://raw.githubusercontent.com/paarriagadap/tableautest/main/testv3.html

And with the API v1: https://raw.githubusercontent.com/paarriagadap/tableautest/main/testv1.html

paarriagadap avatar Jun 21 '22 03:06 paarriagadap

Hi @paarriagadap - Do you have a repro of the issue you are seeing in v3?

illonage avatar Jun 24 '22 00:06 illonage

It can be seen when opening the html files after download

paarriagadap avatar Jun 24 '22 00:06 paarriagadap