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

Updated scalar view to support configuration using html_attributes config #952

Closed
wants to merge 1 commit into from

Conversation

TS1997
Copy link

@TS1997 TS1997 commented Feb 19, 2025

I was having issues configuring Scalar using the html_attributes property in the config which I created issue #949 for. After doing a bit of debugging I found out that the Scalar view didn't set the html_attributes property as the config properly and have updated the view to support this

@shalvah
Copy link
Contributor

shalvah commented Feb 20, 2025

Oh, interesting. So scalar doesn't use direct attributes? This does seem to break the definition of "html_attributes", as we are no longer passing them directly to the element. Wouldn't it break things such as data-proxy-url? Do you have a doc link for this Scalar behaviour?

I'm leaning towards leaving this as it is. After all, $element.dataset.configuration should be equivalent to a data-configuration attribute.

@TS1997
Copy link
Author

TS1997 commented Feb 20, 2025

After looking into this a bit further it does look like a data-configuration attribute should work but isn’t recommended as it can get large but that shouldn’t be an issue since you’ve moved it to a config: https://guides.scalar.com/scalar/scalar-api-references/html#configuration

I must’ve completely missed that yesterday and will try that when I get home

@TS1997 TS1997 closed this Feb 20, 2025
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.

2 participants