-
Notifications
You must be signed in to change notification settings - Fork 475
Fix bug when multiple embeds have no or duplicated element id #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
|
Why to have such cases where multiple elements have the same id? |
|
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. |
|
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. |
|
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 |
|
Hi Nick,
Adding our @support<mailto:[email protected]> team to help you wth your request.
Kind regards,
[zoomcharts-logo-email-signature]
Katrina Barcevska
Customer Service specialist, ZoomCharts
+44 333 555 2505
[email protected]
From: Nick Artemov <[email protected]>
Reply-To: Microsoft/PowerBI-JavaScript <[email protected]>
Date: ceturtdiena, 2019. gada 4. aprīlis 00:24
To: Microsoft/PowerBI-JavaScript <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [Microsoft/PowerBI-JavaScript] Fix bug when multiple embeds have no or duplicated element id (#346)
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#346 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJrUpzv2-gZ89nArA66twQwQKrIV1GwBks5vdRwOgaJpZM4XYwQQ>.
|
|
Hi All, |
@oceantume |
There was a problem hiding this 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
|
For successful execution, You can try this versions. |
There was a problem hiding this 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
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