-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgrade Chart.js to 3.7.0 #17
Conversation
Require MFA on rubygems!
# 'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor-chart/blob/master/CHANGELOG.adoc', | ||
'community_chat_uri' => 'https://asciidoctor.zulipchat.com', | ||
'source_code_uri' => 'https://github.com/asciidoctor/asciidoctor-chart', | ||
'rubygems_mfa_required' => 'true' |
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.
According to rubygems/rubygems.org#2500 (comment) you should enable MFA on https://rubygems.org/ and use "UI and gem signin".
In theory, it would be possible to publish using an API key (from CI/CD) even though MFA is enabled (and required).
Do you know the reason for this? Is it conflicting with CSS added by the chart library? |
I don't think so, the library is using a |
The parent container added by the library or the page template? |
The parent container is added by the page template in this extension. As far as I know, Chart.js does not create any HTML element, it uses the existing So we do have full control over the HTML. In other words, nothing prevents us from using But if we do that, do we want to introduce a "fixed-width" attribute in case you really want a fixed width? I don't think we should do (unless someone makes a strong argument for it). Regarding height I don't think there's any issue using Does it sound reasonable? |
Yep, sounds reasonable to me! Thanks for the clarification. |
What I Did
rubygems_mfa_required
in gemspecmaintainAspectRatio
when the width or height is defined. From the documentation: "Note that in order for the above code to correctly resize the chart height, the maintainAspectRatio option must also be set to false."position: relative;
on the containerchartjs-container
. From the documentation: "Detecting when the canvas size changes can not be done directly from the canvas element. Chart.js uses its parent container to update the canvas render and display sizes. However, this method requires the container to be relatively positioned and dedicated to the chart canvas only."resolves #8 and partially resolves #9
//cc @jpminnovation