Skip to content

Conversation

@oceantume
Copy link
Contributor

@oceantume oceantume commented Oct 12, 2018

This bug caused multiple embeds to break when the elements had no id or
duplicated ids. This broke event handling and some interaction features.

Change Service.addOrOverwriteEmbed algorithm that compared elements by
their id so that it now directly compares elements by reference equality.

Expand the service init test to include three different tests covering
initialization of multiple embeds with different element id
configurations (with id, without id*, with duplicated id*)

** These two tests will fail without the fix applied to service.ts

This bug caused multiple embeds to break when the elements had no id or
duplicated ids. This broke event handling and some interaction features.

Change Service.addOrOverwriteEmbed algorithm that compared elements by
their id so that it now directly compares elements reference equality.

Expand the service init test to include three different tests covering
initialization of multiple embeds with different element id
configurations (with id, without id*, with duplicated id*)

* These two tests will fail without the fix applied to service.ts
@ali-hamud
Copy link
Contributor

Why to have such cases where multiple elements have the same id?

@oceantume
Copy link
Contributor Author

oceantume commented Oct 15, 2018

While it is not recommended, re-using ID's is possible and that use-case was also broken by this bug. The reason why I added the three tests is to ensure that it works properly regardless of the IDs of the elements, and that such a bug has less chance to re-appear. This test also validates the number of "components" (elements) that are controlled by the power bi client, something that wasn't really tested elsewhere because the Service instance is re-used and keeps references to elements that don't exist anymore.

@oceantume
Copy link
Contributor Author

Any reason for not following through with this PR? Do you need me to change something? I'm hoping this can be published with the next minor version so I can use this library with React without having to add random ID's to my elements.

@kerosan
Copy link

kerosan commented Apr 3, 2019

in chrome browser when I try to load dashboard it loaded but without "fitting to with" or in "one column" and in console we have warning [Deprecation] 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.

@zoomcharts
Copy link

zoomcharts commented Apr 4, 2019 via email

@VeBhairab
Copy link

Hi All,
In the Power BI : I need the option fit to page functionality when user in full screen only but i didnt find any solution for it .
My requirement is only, If user in full screen mode, user can use any option by which the data of pbi will fit in the screen without any vertical or horizontal scroll bar . I am using Angular7 with angular CLI.
Please let me know if anyone know it .
Thanks .

@ali-hamud
Copy link
Contributor

Any reason for not following through with this PR? Do you need me to change something? I'm hoping this can be published with the next minor version so I can use this library with React without having to add random ID's to my elements.

@oceantume
We want to accept and merge the PR.
We need to test the change in all the supported browsers.
We did not give this high priority between the other things. Thanks for understanding.

Copy link
Contributor

@parth-007 parth-007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried npm install to add the dependencies, it gave me error that,

fs.js:27
const { Math, Object } = primordials;
                         ^
ReferenceError: primordials is not defined

@parth-007
Copy link
Contributor

For successful execution,
What you can do is update the versions of packages in package.json file.

You can try this versions.

"gulp4-run-sequence": "^1.0.0",
"http-server": "^0.12.1",
"gulp-help-four": "^0.2.3",
"gulp": "^4.0.2",
"phantomjs-prebuilt": "^2.1.3", 
"ts-loader": "^6.2.2",
"typedoc": "^0.15.0"
"typescript": "^3.8.3"
"typings": "^1.3.2"
"webpack": "^4.42.1"2",
"webpack-stream": "^5.2.1",

Copy link
Contributor

@parth-007 parth-007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the package.json

@ali-hamud ali-hamud merged commit bfdf3a7 into microsoft:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants