Skip to content

minimap#957

Merged
hatemhosny merged 2 commits intodevelopfrom
minimap
Mar 2, 2026
Merged

minimap#957
hatemhosny merged 2 commits intodevelopfrom
minimap

Conversation

@hatemhosny
Copy link
Collaborator

@hatemhosny hatemhosny commented Mar 2, 2026

This PR allows adding minimap in code editor (monaco and codemirror).

A new minimap boolean config option is added (defaults to false).

It can be set from the editor settings screen, config object or the ?minimap param

Summary by CodeRabbit

  • New Features
    • Added minimap functionality to the code editor. Users can configure the minimap through editor settings. The feature is disabled by default.

@netlify
Copy link

netlify bot commented Mar 2, 2026

Deploy Preview for livecodes ready!

Name Link
🔨 Latest commit b672c62
🔍 Latest deploy log https://app.netlify.com/projects/livecodes/deploys/69a60a185c12910008460a60
😎 Deploy Preview https://deploy-preview-957--livecodes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cloudflare-workers-and-pages
Copy link

Deploying livecodes with  Cloudflare Pages  Cloudflare Pages

Latest commit: b672c62
Status: ✅  Deploy successful!
Preview URL: https://11875449.livecodes.pages.dev
Branch Preview URL: https://minimap.livecodes.pages.dev

View logs

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Size Change: +444 B (+0.04%)

Total Size: 1.04 MB

ℹ️ View Unchanged
Filename Size Change
./build/404.html 1 kB 0 B
./build/app.html 250 B 0 B
./build/index.html 2.46 kB 0 B
./build/livecodes/app.css 22.6 kB 0 B
./build/livecodes/app.js 113 kB +22 B (+0.02%)
./build/livecodes/assets.js 8.68 kB +11 B (+0.13%)
./build/livecodes/assets/noop.js 18 B 0 B
./build/livecodes/assets/templates/diagrams-starter.html 2.19 kB 0 B
./build/livecodes/backup.js 3.74 kB 0 B
./build/livecodes/blockly.js 15 kB +33 B (+0.22%)
./build/livecodes/broadcast.js 1.19 kB +1 B (+0.08%)
./build/livecodes/bundle-types.js 4.41 kB 0 B
./build/livecodes/code-to-image.js 9.17 kB +1 B (+0.01%)
./build/livecodes/codejar.js 17.6 kB +18 B (+0.1%)
./build/livecodes/codemirror.js 16 kB +57 B (+0.36%)
./build/livecodes/compile.page.js 2.45 kB 0 B
./build/livecodes/compile.worker.js 15.2 kB +71 B (+0.47%)
./build/livecodes/compiler-utils.js 3.16 kB -9 B (-0.28%)
./build/livecodes/custom-editor-utils.js 198 B 0 B
./build/livecodes/deploy.js 6.93 kB +1 B (+0.01%)
./build/livecodes/editor-settings.js 19.3 kB -10 B (-0.05%)
./build/livecodes/embed-ui.js 5.54 kB -10 B (-0.18%)
./build/livecodes/embed.js 90.9 kB +101 B (+0.11%)
./build/livecodes/export.js 3.94 kB 0 B
./build/livecodes/firebase.js 22.7 kB 0 B
./build/livecodes/format.worker.js 14.5 kB +66 B (+0.46%)
./build/livecodes/google-fonts.js 7.12 kB 0 B
./build/livecodes/headless.js 79.3 kB +5 B (+0.01%)
./build/livecodes/i18n-ar-language-info.json 5.34 kB 0 B
./build/livecodes/i18n-ar-translation.json 9.32 kB 0 B
./build/livecodes/i18n-bn-language-info.json 5.76 kB 0 B
./build/livecodes/i18n-bn-translation.json 9.66 kB 0 B
./build/livecodes/i18n-de-language-info.json 5.4 kB 0 B
./build/livecodes/i18n-de-translation.json 9.45 kB 0 B
./build/livecodes/i18n-en-language-info.json 4.63 kB 0 B
./build/livecodes/i18n-en-translation.json 8.05 kB +5 B (+0.06%)
./build/livecodes/i18n-es-language-info.json 5.12 kB 0 B
./build/livecodes/i18n-es-translation.json 9.18 kB 0 B
./build/livecodes/i18n-fa-language-info.json 5.52 kB 0 B
./build/livecodes/i18n-fa-translation.json 9.47 kB 0 B
./build/livecodes/i18n-fr-language-info.json 5.31 kB 0 B
./build/livecodes/i18n-fr-translation.json 9.42 kB 0 B
./build/livecodes/i18n-hi-language-info.json 5.93 kB 0 B
./build/livecodes/i18n-hi-translation.json 9.97 kB 0 B
./build/livecodes/i18n-id-language-info.json 4.87 kB 0 B
./build/livecodes/i18n-id-translation.json 8.7 kB 0 B
./build/livecodes/i18n-it-language-info.json 5.17 kB 0 B
./build/livecodes/i18n-it-translation.json 9.25 kB 0 B
./build/livecodes/i18n-ja-language-info.json 5.72 kB 0 B
./build/livecodes/i18n-ja-translation.json 9.62 kB 0 B
./build/livecodes/i18n-nl-language-info.json 5.07 kB 0 B
./build/livecodes/i18n-nl-translation.json 8.9 kB 0 B
./build/livecodes/i18n-pt-language-info.json 5.16 kB 0 B
./build/livecodes/i18n-pt-translation.json 9.37 kB 0 B
./build/livecodes/i18n-ru-language-info.json 5.7 kB 0 B
./build/livecodes/i18n-ru-translation.json 10.3 kB 0 B
./build/livecodes/i18n-tr-language-info.json 5.3 kB 0 B
./build/livecodes/i18n-tr-translation.json 9.27 kB 0 B
./build/livecodes/i18n-ur-language-info.json 5.97 kB 0 B
./build/livecodes/i18n-ur-translation.json 9.8 kB 0 B
./build/livecodes/i18n-zh-CN-language-info.json 5.01 kB 0 B
./build/livecodes/i18n-zh-CN-translation.json 8.66 kB 0 B
./build/livecodes/i18n.js 20.4 kB -47 B (-0.23%)
./build/livecodes/import-src.js 17.8 kB +25 B (+0.14%)
./build/livecodes/import.js 16.3 kB +6 B (+0.04%)
./build/livecodes/index.js 5.42 kB +32 B (+0.59%)
./build/livecodes/lang-art-template-compiler.js 1.68 kB 0 B
./build/livecodes/lang-assemblyscript-compiler.js 290 B 0 B
./build/livecodes/lang-assemblyscript-script.js 386 B 0 B
./build/livecodes/lang-astro-compiler.js 2.37 kB 0 B
./build/livecodes/lang-clio-compiler.js 1.58 kB 0 B
./build/livecodes/lang-commonlisp-script.js 123 B 0 B
./build/livecodes/lang-cpp-script.js 1.96 kB 0 B
./build/livecodes/lang-cpp-wasm-script.js 2.88 kB 0 B
./build/livecodes/lang-csharp-wasm-script.js 2.21 kB +1 B (+0.05%)
./build/livecodes/lang-diagrams-compiler-esm.js 5.11 kB 0 B
./build/livecodes/lang-dot-compiler.js 1.69 kB 0 B
./build/livecodes/lang-ejs-compiler.js 1.66 kB 0 B
./build/livecodes/lang-eta-compiler.js 1.68 kB 0 B
./build/livecodes/lang-fennel-compiler.js 1.64 kB 0 B
./build/livecodes/lang-gleam-compiler.js 3.12 kB 0 B
./build/livecodes/lang-go-wasm-script.js 3.29 kB 0 B
./build/livecodes/lang-haml-compiler.js 1.69 kB 0 B
./build/livecodes/lang-handlebars-compiler.js 1.98 kB 0 B
./build/livecodes/lang-imba-compiler.js 147 B 0 B
./build/livecodes/lang-java-script.js 4.08 kB 0 B
./build/livecodes/lang-jinja-compiler.js 1.67 kB 0 B
./build/livecodes/lang-julia-script.js 3.32 kB 0 B
./build/livecodes/lang-liquid-compiler.js 1.71 kB 0 B
./build/livecodes/lang-lua-wasm-script.js 205 B 0 B
./build/livecodes/lang-malina-compiler.js 2.98 kB 0 B
./build/livecodes/lang-minizinc-script.js 2.09 kB 0 B
./build/livecodes/lang-mustache-compiler.js 1.68 kB 0 B
./build/livecodes/lang-nunjucks-compiler.js 1.99 kB 0 B
./build/livecodes/lang-perl-script.js 268 B 0 B
./build/livecodes/lang-php-wasm-script.js 347 B 0 B
./build/livecodes/lang-postgresql-compiler-esm.js 1.76 kB 0 B
./build/livecodes/lang-prolog-script.js 204 B 0 B
./build/livecodes/lang-pug-compiler.js 371 B 0 B
./build/livecodes/lang-python-wasm-script.js 1.89 kB 0 B
./build/livecodes/lang-r-script-esm.js 2.47 kB +4 B (+0.16%)
./build/livecodes/lang-rescript-compiler-esm.js 2.19 kB 0 B
./build/livecodes/lang-rescript-formatter.js 1.55 kB 0 B
./build/livecodes/lang-riot-compiler.js 2.84 kB 0 B
./build/livecodes/lang-ruby-wasm-script.js 1.74 kB -5 B (-0.29%)
./build/livecodes/lang-scss-compiler.js 1.85 kB 0 B
./build/livecodes/lang-solid-compiler.js 263 B 0 B
./build/livecodes/lang-sql-compiler.js 1.67 kB 0 B
./build/livecodes/lang-sql-script.js 2.08 kB 0 B
./build/livecodes/lang-svelte-compiler.js 4.72 kB 0 B
./build/livecodes/lang-tcl-script.js 1.85 kB 0 B
./build/livecodes/lang-teal-compiler.js 1.75 kB 0 B
./build/livecodes/lang-twig-compiler.js 1.67 kB 0 B
./build/livecodes/lang-vento-compiler.js 1.72 kB 0 B
./build/livecodes/lang-vue-compiler.js 6.13 kB 0 B
./build/livecodes/lang-vue2-compiler.js 3.5 kB 0 B
./build/livecodes/lang-wat-compiler.js 348 B 0 B
./build/livecodes/lang-wat-script.js 1.97 kB 0 B
./build/livecodes/language-info.js 7.92 kB 0 B
./build/livecodes/monaco.js 19.9 kB +33 B (+0.17%)
./build/livecodes/open.js 6.24 kB -4 B (-0.06%)
./build/livecodes/processor-lightningcss-compiler.js 1.91 kB 0 B
./build/livecodes/processor-postcss-compiler.js 2.06 kB 0 B
./build/livecodes/processor-tailwindcss-compiler.js 5.3 kB 0 B
./build/livecodes/processor-unocss-compiler.js 355 B 0 B
./build/livecodes/processor-windicss-compiler.js 450 B 0 B
./build/livecodes/quill.css 697 B 0 B
./build/livecodes/quill.js 5.86 kB 0 B
./build/livecodes/resources.js 3.43 kB +1 B (+0.03%)
./build/livecodes/result-utils.js 1.17 kB 0 B
./build/livecodes/share.js 3.84 kB -3 B (-0.08%)
./build/livecodes/snippets.js 6.07 kB -2 B (-0.03%)
./build/livecodes/sync-ui.js 3.29 kB -3 B (-0.09%)
./build/livecodes/sync.js 3.56 kB -1 B (-0.03%)
./build/livecodes/sync.worker.js 29.8 kB +44 B (+0.15%)
./build/livecodes/templates.js 26.6 kB 0 B
./build/sdk/livecodes.js 3.95 kB 0 B
./build/sdk/livecodes.umd.js 4.02 kB 0 B
./build/sdk/package.json 292 B 0 B
./build/sdk/react.js 4.24 kB 0 B
./build/sdk/vue.js 4.36 kB 0 B

compressed-size-action

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Walkthrough

This PR adds minimap functionality to the code editor across the entire stack. Changes include configuration defaults, validation, UI settings toggle, integrations with Codemirror and Monaco editors, vendor dependencies, translations, documentation, and SDK model updates.

Changes

Cohort / File(s) Summary
Configuration & Models
src/livecodes/config/config.ts, src/livecodes/config/default-config.ts, src/livecodes/config/validate-config.ts, src/sdk/models.ts
Added minimap as a new boolean configuration property with default value false, including validation logic and SDK interface definition.
Editor UI & Settings
src/livecodes/UI/editor-settings.ts
Added "Minimap" toggle field to the editor settings form with localized label.
Editor Integrations
src/livecodes/editor/codemirror/codemirror.ts, src/livecodes/editor/monaco/monaco.ts
Integrated minimap support into both Codemirror (via extension loading and module imports) and Monaco (via editor options configuration).
Vendor & Infrastructure
src/livecodes/vendors.ts, src/livecodes/html/app.html, src/livecodes/main.ts
Added new vendor URLs for codemirror-minimap and crelt modules, wired import map entry, and template replacement logic.
Internationalization
src/livecodes/i18n/locales/en/translation.lokalise.json, src/livecodes/i18n/locales/en/translation.ts
Added "Enable Minimap \*" translation entry under editor settings.
Documentation
docs/docs/configuration/configuration-object.mdx, docs/docs/features/editor-settings.mdx
Added minimap configuration option documentation and Editor Options reference.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • sharno
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'minimap' is overly vague and generic. While it relates to the changeset, it fails to clearly describe what is being added or changed—merely stating the feature name without context about the nature of the change (e.g., 'Add minimap support', 'Enable minimap feature'). Use a more descriptive title that clarifies the change, such as 'Add minimap support to code editor' or 'feat: add optional minimap configuration option'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch minimap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/livecodes/editor/codemirror/codemirror.ts (1)

235-252: ⚠️ Potential issue | 🟡 Minor

Guard minimap activation for non-code editors (console/embed).

Line 235 currently enables minimap purely from user settings. Unlike Monaco, this can turn minimap on for console/embed flows in CodeMirror.

Proposed fix
-    const enableMinimap = settings.minimap ?? editorSettings.minimap;
+    const enableMinimap =
+      (settings.minimap ?? editorSettings.minimap) && !['console', 'embed'].includes(editorId);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/livecodes/editor/codemirror/codemirror.ts` around lines 235 - 252, The
minimap is currently enabled based only on enableMinimap and the presence of
minimap; update the minimap activation clause to also guard against non-code
editor flows (console/embed). Modify the expression that builds the extensions
(the line using enableMinimap and minimap) to require an additional check such
as editorMode not being 'console' or 'embed' (or a boolean like isCodeEditor if
available) before including minimap.compute(...). Keep the rest of the minimap
block unchanged and use the existing identifiers enableMinimap, minimap, and
editorMode to locate and implement the guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/livecodes/editor/codemirror/codemirror.ts`:
- Around line 235-252: The minimap is currently enabled based only on
enableMinimap and the presence of minimap; update the minimap activation clause
to also guard against non-code editor flows (console/embed). Modify the
expression that builds the extensions (the line using enableMinimap and minimap)
to require an additional check such as editorMode not being 'console' or 'embed'
(or a boolean like isCodeEditor if available) before including
minimap.compute(...). Keep the rest of the minimap block unchanged and use the
existing identifiers enableMinimap, minimap, and editorMode to locate and
implement the guard.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e53cdfd and b672c62.

📒 Files selected for processing (14)
  • docs/docs/configuration/configuration-object.mdx
  • docs/docs/features/editor-settings.mdx
  • src/livecodes/UI/editor-settings.ts
  • src/livecodes/config/config.ts
  • src/livecodes/config/default-config.ts
  • src/livecodes/config/validate-config.ts
  • src/livecodes/editor/codemirror/codemirror.ts
  • src/livecodes/editor/monaco/monaco.ts
  • src/livecodes/html/app.html
  • src/livecodes/i18n/locales/en/translation.lokalise.json
  • src/livecodes/i18n/locales/en/translation.ts
  • src/livecodes/main.ts
  • src/livecodes/vendors.ts
  • src/sdk/models.ts

@hatemhosny hatemhosny merged commit b694eea into develop Mar 2, 2026
18 checks passed
@livecodes-ci
Copy link
Contributor

livecodes-ci bot commented Mar 2, 2026

i18n Actions

Source PR has been merged into the default branch.

Maintainers can comment .i18n-update-push to trigger the i18n update workflow and push the changes to Lokalise.

@hatemhosny
Copy link
Collaborator Author

.i18n-update-push

@livecodes-ci
Copy link
Contributor

livecodes-ci bot commented Mar 3, 2026

i18n Actions: .i18n-update-push

Localization updated and pushed to Lokalise.

Name Description
New Branch for i18n i18n/live-codes/minimap
Last Commit SHA b694eea

Maintainers can comment .i18n-update-pull after translation is done to trigger the i18n pull workflow and pull the changes back to Github.

@hatemhosny
Copy link
Collaborator Author

.i18n-update-pull

@livecodes-ci
Copy link
Contributor

livecodes-ci bot commented Mar 3, 2026

i18n Actions: .i18n-update-pull

Localization pulled from Lokalise.

Name Description
i18n Branch i18n/live-codes/minimap
Last Commit SHA 4d28e3a
i18n PR #958

@livecodes-ci livecodes-ci bot mentioned this pull request Mar 3, 2026
12 tasks
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.

1 participant