Add rich Monaco IDF editor with syntax highlighting, hover docs, and admonitions#16
Closed
samuelduchesne wants to merge 4 commits into
Closed
Add rich Monaco IDF editor with syntax highlighting, hover docs, and admonitions#16samuelduchesne wants to merge 4 commits into
samuelduchesne wants to merge 4 commits into
Conversation
…nd hover docs Replace static IDF code blocks in the EnergyPlus documentation with read-only Monaco editor instances featuring Monarch-based IDF syntax highlighting, hover documentation from the IDD schema (856 object types), code folding, and dark/light theme sync with Zensical. Key components: - idf-editor/: Vite IIFE bundle (13KB) that lazy-loads Monaco from CDN - scripts/idd_schema_builder.py: Parses Energy+.idd into compact JSON for hover - scripts/pygments_idf_lexer.py: Registers IDF lexer so Pygments preserves the language-idf CSS class (static fallback before Monaco loads) - IntersectionObserver for lazy editor creation as blocks scroll into view - MutationObserver syncs editor theme with Zensical's dark/light toggle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove IDF folding provider (not useful for read-only code blocks) - Adjust editor height calculation (LINE_HEIGHT 18→19, PADDING 16→20) - Fix IDD schema URL resolution by deriving path from script src attribute instead of resolving relative to the current page URL Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d49f73b to
ca1bdc1
Compare
Contributor
|
Docs preview for this PR is available at: |
- Disable source maps in production build (was 404ing for .js.map) - Align Monaco CDN version (0.52.2→0.55.1) with npm dependency to fix _commonjsGlobal duplicate variable error - Pin monaco-editor npm dep to exact version (0.55.1) to prevent drift - Reorder CI steps: compute version_short before cache lookup (was using undefined matrix.version_short causing empty cache path) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Close in favor of #19 |
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
language-idfCSS class instead of falling back tolanguage-textTest plan
make convert VERSION=v25.2.0and verify IDF code blocks render as Monaco editorsMaterial) and field values to see IDD documentation tooltipsmake checkto validate linting and formatting🤖 Generated with Claude Code