I don't think that's what danieleperilli meant(or to the very least, that is not what I meant when I seconded his post).
Currently, when developing a visual using the DevTools, in order to test it using my own data and inside Power BI Service itself, and not in the DevTools with its limitied static DataViews, I do as such:
1. Open the DevTools in a different tab in the browser.
2. Write/Paste some code & compile it.
3. Go back to the "Power BI Service" tab and refresh it to make the newly compiled visual appear in the visualizations pane(Before refreshing, I remove previous instances of the visual from the report, if present).
4. Add the new visual to my report and save it.
5. Refresh the tab every time I re-compile my visual to have the visual updated in the report.
But in Sandbox mode, that scenario fails-
Every time I re-compile, refreshing the page does not update the visual. Instead, I have to export the visual, remove all previous instances of the visual from the report, import the visual from my computer and then put the new version in the report, which complicates the testing process even more(Which is already has a little more steps than it should have).
Have a nice day,
I want to report a few more bugs in the sandbox mode:
I think I understand your use case scenario. Currently it is not supported to access the hostServices from the sandbox. One of the intentions of the sandbox is to be a mechanism to isolate the API calls that are inteded to be used in custom visuals from those that are not supported. We are always planning out how to best provide functionality for custom visuals in a way that can be supported long term. For functionality like this we will likely try to figure out a better way to expose this functionality for content authors.
There are a couple of options that can be done short term to ensure that this continues to function properly after sandbox is released and before we have appropriate replacements for APIs that we want to support. One of our goals is to not sandbox visuals that are in our public visuals gallery because they have already undergone a sufficient security review. Are your visuals already in the visual gallery or would you be able to upload them? Another option is that we intend to also ship a feature flag for the short term that allows visuals to render without sandbox. That feature flag will most likely not be supported long term.
@danieleperilli : thank you for the report. I am not sure if all of these functions will work the same way when we finalize the visuals API. We will make it more clear in the near future and deliver something that will be guarenteed to not change in the future. We want to get to a point where we give you a set of visual APIs that are reliable and can be depended upon forever, until then there may be some reaction work to keep things up-to-date.
In the short term if you need to get around sandboxing after release there will temporarily be a feature flag to disable it as we work out enabling all of the supported scenarios for the majority of content partners.
I have 2 custom visuals that both display the same problem in sandboxing mode. One uses Leaflet and the other Cesium to display content on a geographical map or a 3D Earth. The problem is that when I grab the terrain and drag it, the visual gets stucked in this "grab and drag mode". The terrain is always dragged when I move the mouse even though I have realeased the left mouse button.
I've just realised after a lot of investigating the wrong thing that a bug I have in my visual will be resolved by sandboxing.
In brief, the visual (based on SVG) uses textpath elements, which are cross referenced to actual path elements using the ID.
I finally spotted that my wrongly positioned text was cross referencing the identical IDs in a differently sized instance of my visual sat on the active dashboard, which though not visible, is clearly already loaded up in the background.
As I said, sandboxing will resolve this, but I don't want to wait for this to be turned on as I think this should be easily resolvable right now by prefixing/suffixing each ID with a unique identifier tied to the overall visual.
Is there any best practice way to generate a unique ID for the current visual for use in this manner? I've considered generating a random string within init(), checking the DOM for a clashes, regenerating until unique, then using that as a prefix/suffix. I see no reason this won't work, but it feels like an inelegant workaround to a problem that might have a better solution?
I also depended on the hostServices.getViewMode method. Can you give an update on API availability in sandbox mode or the un-sandbox feature flag?
Due to the fact that all my visuals have suddenly stopped functioning, I can only assume the sandbox feature was enabled in the last few hours.
I therefore urgently request that you provide us with instructions for enabling the temporary un-sandbox flag, so we could still use our reports, until we manage to sort things out.
This is impacting me as well, and possibly one other. Refer to this post:
Is there any guidance on how to test / debug these problems? Why would the visual render in in the web site, but not on the iOS app?
We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.
Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!
The largest Power BI, Power Platform, and Data conference in New Zealand
Features releasing from October 2019 through March 2020