Skip to content
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

IYY-266: Ensure Microsoft BI embeds work #810

Merged
merged 6 commits into from
Dec 11, 2024

Conversation

codechefmarc
Copy link
Contributor

@codechefmarc codechefmarc commented Nov 26, 2024

IYY-266: Ensure Microsoft BI embeds work

Description of work

  • Updates the Microsoft Power BI embed to allow for two different kinds of URLs (/view and /reportEmbed)
  • Note - I think it should be fine, but, I would like to test this code on an existing site that has Microsoft Power BI embeds already being used. If anyone knows an existing site, please link it here and I will test that as well.

Functional testing steps:

  • Login to the site as an admin
  • Add a page, title it, and save to enter layout builder
  • Add a block in the content section
  • Add an Embed block
  • Click "Add media"
  • Under the "Embed Code or URL", click on the "Learn about supported formats and options"
  • Copy the URL from the Microsoft PowerBI example
  • Close the modal
  • Paste the URL into the "Embed Code or URL"

Screenshot 2024-11-26 at 2 07 31 PM

  • Click Add
  • Verify that the logo is the Power BI logo and there are no errors in adding the newly formatted URL

Screenshot 2024-11-26 at 2 07 58 PM

  • Title it and then save
  • Click "Insert"
  • Click "Add block"
  • Scroll down on Layout builder and verify that the Power BI block does load, though it will ask you to sign in
  • Repeat the above steps but instead, use the older URL format: https://app.powerbi.com/view?r=eyJrIjoiYzQ1ODA0ZjEtZjc5YS00OTgyLWIzOTItNmJmNDY2YmRiODQ2IiwidCI6ImRkOGNiZWJiLTIxMzktNGRmOC1iNDExLTRlM2U4N2FiZWI1YyIsImMiOjF9&pageName=ReportSection2ac2649f17189885d376
  • Verify that it works as well as the new format

Copy link

Visit Site

Created multidev environment pr-810 for yalesites-platform.

@codechefmarc codechefmarc marked this pull request as ready for review November 26, 2024 22:11
@codechefmarc codechefmarc requested a review from a team as a code owner November 26, 2024 22:11
Copy link
Contributor

@dblanken-yale dblanken-yale left a comment

Choose a reason for hiding this comment

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

@codechefmarc This is awesome. I did have a question; is that Sign In address available to all to log in and see? I'm just thinking of users are going to test out the PowerBI with what's in the help modal, we might want the other there since they can see the output immediately without logging in?

Or maybe we can find a way to express both examples somehow? I think at the moment it only allows one in the embed patterns though doesn't it. ☹️

Passing it as it does great, but wanted to put that here; maybe we revert the help back to the old one so they don't have to worry about signing in to see it in action?

@codechefmarc
Copy link
Contributor Author

Passing it as it does great, but wanted to put that here; maybe we revert the help back to the old one so they don't have to worry about signing in to see it in action?

Yeah, I agree - can we get one of the new links that is publicly available? Perhaps someone with Power BI access can create one that is public and send that over and I'll update the code? And yeah, I tried to put two examples but it looked too gnarly. We can use the original example, for sure, but if they are moving to the new URL, I'd rather have the new one in there.

@dblanken-yale
Copy link
Contributor

Ah great idea. Wonder who owns that original? I bet they could make it. LOL

@miketullo95 Do you know who might have made that embed?

@miketullo95
Copy link
Contributor

Ah great idea. Wonder who owns that original? I bet they could make it. LOL

@miketullo95 Do you know who might have made that embed?

that is a great question. We can ask that in our internal meeting tomorrow to find out

@duncancm9
Copy link

Hi team,

Testing this out I realized an extra step we were missing in generating the code from PowerBI...

The current instructions are:

Open a report in the Power BI service. On the File menu, select Embed report > Website or portal. In the Secure embed code dialog, select the value under "Here's a link you can use to embed this content."

Those instructions generate an embed code like:

https://app.powerbi.com/reportEmbed?reportId=66e25bd6-5e0a-4db8-ad0c-28bb31b0fd5e&autoAuth=true&ctid=dd8cbebb-2139-4df8-b411-4e3e87abeb5c

Which requires Login to gain access.

However, in Power BI, if you go to File menu, select Embed report > Publish to web (public)

CleanShot 2024-12-03 at 13 41 23@2x

That will give you an embed code like our original, and which obviously doesn't require login (it's public):

https://app.powerbi.com/view?r=eyJrIjoiYzhkODFiMDUtZGU3Zi00ZDAzLWJlYTEtZmM1Mjg3MzMzZGE3IiwidCI6ImRkOGNiZWJiLTIxMzktNGRmOC1iNDExLTRlM2U4N2FiZWI1YyIsImMiOjF9

So, essentially we've now created the ability to embed a report which requires you to be logged in, which could be useful. I think the main use case is for public accessible reports though, so we'll want to update those help instructions to add in that changed step.

@duncancm9
Copy link

So I think if we could keep what we have, and adjust the help text:

For a Public Report: Open a report in the Power BI service. On the File menu, select Embed report > Publish to web (public). In the Embed Code dialog, select the value under "Link you can send in email"

For a Private (login required) Report: Open a report in the Power BI service. On the File menu, select Embed report > Website or portal. In the Secure embed code dialog, select the value under "Here's a link you can use to embed this content."

CleanShot 2024-12-03 at 15 11 52@2x

And then include two examples, one for each.

@codechefmarc
Copy link
Contributor Author

@duncancm9 (strange I still can't make you a reviewer?)
I changed the help text and examples so it is more clear about how to embed each type. Take a look and if this works, we can proceed with merge. Thanks!
@dblanken-yale - FYI, there is a new static property now $exampleContainsMarkup that is FALSE by default, but can be set per embed type so if you don't want the markup to be escaped, you have this option where it will actually render HTML. The PowerBI uses this one to do the two examples.

@codechefmarc codechefmarc merged commit 06d7349 into develop Dec 11, 2024
3 checks passed
@codechefmarc codechefmarc deleted the IYY-266--fix-ms-bi-embed branch December 11, 2024 20:56
@yalesites yalesites mentioned this pull request Dec 12, 2024
@yalesites
Copy link

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants