serlo / frontend

Next.js app that serves serlo.org
https://serlo.org
Apache License 2.0
38 stars 10 forks source link

fix(plugin-edusharing): allow focusing the plugin by clicking on the content #4298

Closed LarsTheGlidingSquirrel closed 1 week ago

LarsTheGlidingSquirrel commented 1 week ago

Before

Clicking on the embedded content did not focus the editor plugin because it is inside an iframe. It was nearly impossible to make the toolbar show up to select another type of content or change the size.

After

Render an overlay over the iframe if the plugin is unfocused to detect if the user wants to focus the plugin. After this initial click to focus the plugin the user can interact with it.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Nov 19, 2024 8:04am
github-actions[bot] commented 1 week ago

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 104.73 KB (🟡 +5 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

elbotho commented 1 week ago

@LarsTheGlidingSquirrel to test this myself I would need to use yalc and run this in the other repo, right?

LarsTheGlidingSquirrel commented 1 week ago

@LarsTheGlidingSquirrel to test this myself I would need to use yalc and run this in the other repo, right?

Yes, you can test an image embed locally in serlo-editor-as-lti-tool. Or all types of embeds in Uberspace staging through either the edu-sharing or itslearning staging environment.