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

Allow extension widgets to set widget-content-classes #284

Open
DallasHoff opened this issue Dec 21, 2024 · 2 comments
Open

Allow extension widgets to set widget-content-classes #284

DallasHoff opened this issue Dec 21, 2024 · 2 comments
Labels
work completed Work for this has been completed but it may not yet be merged / released
Milestone

Comments

@DallasHoff
Copy link

Feature request: provide a mechanism for extensions to add additional CSS classes to widget-content, similar to how the built-in widgets' templates can define widget-content-classes.

My use case is a custom video carousel. It is based on the built-in videos template, but that template adds a widget-content-frameless class to remove the default widget frame. To replicate that, I would have to inject a script with the extension response, so I think it would be good to provide a better method to accomplish this.

The obvious way I see of doing this would be to allow extensions to return a Widget-Content-Classes response header. What do you think?

@svilenmarkov
Copy link
Member

Hey, thanks for bringing this up, it's something that's been on my todo list for a little bit now. I would however do it slightly differently where instead of allowing the extension to define classes, I'd add a Widget-Content-Frameless: true option. This just makes it a little more future-proof so that if the internal mechanism of how this works changes, the functionality still works without needing to change anything on the extension side.

@svilenmarkov svilenmarkov added this to the v0.7.0 milestone Dec 22, 2024
@svilenmarkov svilenmarkov added the work completed Work for this has been completed but it may not yet be merged / released label Dec 22, 2024
@DallasHoff
Copy link
Author

Yeah, that makes sense. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work completed Work for this has been completed but it may not yet be merged / released
Projects
None yet
Development

No branches or pull requests

2 participants