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

Enable showable overrides per diagram type #62

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

bauglir
Copy link
Owner

@bauglir bauglir commented Apr 25, 2024

Kroki tries to select the most suitable output format to render a diagram in using Julia's Base.show and AbstractDisplay capabilities. Situations may occur where the "best" output format that gets determined is not actually the "best" output format.

This new functionality enables control over which output formats will be used by Base.show, in particular allowing specific output formats to be disabled. This approach prevents the need for having to explicitly construct a Diagram and rendering it and will also work when defining diagrams using the string literals.

This is technically not a breaking change. However, given that the overall API of this package has proven stable over a long period of time this addition is a good point in time to move to v1.y.z.

Closes #51.

bauglir added 2 commits April 25, 2024 23:40
This both saves on some typing, requires less instances to have to be
created and makes it slightly easier to read the tests.
`Kroki` tries to select the most suitable output format to render a
diagram in using Julia's `Base.show` and `AbstractDisplay` capabilities.
Situations may occur where the "best" output format that gets determined
is not actually the "best" output format.

This new functionality enables control over which output formats will be
used by `Base.show`, in particular allowing specific output formats to
be disabled. This approach prevents the need for having to explicitly
construct a `Diagram` and `render`ing it and will also work when
defining diagrams using the string literals.

This is technically not a breaking change. However, given that the
overall API of this package has proven stable over a long period of time
this addition is a good point in time to move to v1.y.z.

Closes #51.
@bauglir bauglir self-assigned this Apr 25, 2024
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8bc567a) to head (1840f44).

Additional details and impacted files
@@              Coverage Diff              @@
##           development       #62   +/-   ##
=============================================
  Coverage       100.00%   100.00%           
=============================================
  Files                5         5           
  Lines              146       157   +11     
=============================================
+ Hits               146       157   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bauglir bauglir enabled auto-merge April 25, 2024 21:49
@bauglir bauglir merged commit ec2de56 into development Apr 25, 2024
12 checks passed
@bauglir bauglir deleted the enable-showable-overrides-per-diagram-type branch April 25, 2024 21:56
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.

Allow specific output format to be disabled for specific diagram types
1 participant