Wrap long code lines in guide documentation#491
Merged
Conversation
Reformat code blocks across all guide pages to stay within ~75 chars. Long function calls are wrapped with one argument per line and trailing commas. Also aerates the fake-strategies block in orchestration-and-routing.md and replaces ### headings with bold text in data.md to reduce TOC depth.
Add compact (one-line) and pretty (tree-style text/plain) display methods for Series, HLine, VLine, Axes, Leaf, HBox, VBox, Figure, and Panel, using the CTBase color palette via Core.get_format_codes. Features: - Recursive tree display with ├─/└─/│ indentation - Truncation beyond 5 children (… N more) - Pluralization (point/points, component/components) - Empty label filtering for Panel - Decorations (HLine/VLine) shown in Axes - Qualified imports per Handbook philosophy Add test/suite/plotting/test_display.jl with 120 tests covering compact, pretty, and integration (nested trees, truncation) cases.
…xamples Add @setup plot block that loads Plots and disables image/png showable to prevent inline rendering in docs. Update render example text to note that the ExtensionError cannot be demonstrated because Plots is loaded by make.jl. Move the render(fig) example after the explanatory text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reformat code blocks across all guide pages to stay within ~75 characters for readability on narrow screens and to avoid horizontal scrolling in the rendered documentation site.
Changes
data.md: Updated overview table with full out-of-place call signatures, added in-place column, math symbol legend, explicit mathematical/code signatures per data type section, sub-tables forControlLawandPathConstraint, replaced###headings with bold text to reduce TOC depth.differentiation.md: Wrapped long differentiation calls.exceptions.md: Wrapped long exception throws and quick-reference table entries.descriptions.md: Wrapped longadd/complete/removecalls and function reference table.options-system.md: WrappedOptionDefinitionconstructors, validators,StrategyMetadata,build_strategy_options, and extraction function calls.implementing-a-strategy.md: Wrapped constructors,build_strategy,extract_id_from_method, registry queries, and advanced pattern examples.orchestration-and-routing.md: Aerated the fake-strategies setup block with spacing and multi-line definitions; wrapped all routing helper calls.strategy-parameters.md: Wrapped parameterized type signatures,metadatadispatch, constructors, registry queries, andbuild_strategycalls.test-runner.md: Wrapped bash commands,TestRunInfostruct comments, andrun_testsexamples.api-documentation.md: Wrapped longpublic_descriptionstring and YAMLruncommand.color-system.md: Wrapped long See Also bullet points.coverage.md: Wrapped one long code comment.Convention
Lines inside
@example,@repl,@setup, and plainjuliacode blocks should stay within ~75 characters. Long calls are wrapped with each argument on its own line and a trailing comma. This convention has been documented in the Handbook (philosophy/documentation.md).