Skip to content

Conversation

@LukeTowers
Copy link
Member

@LukeTowers LukeTowers commented Jan 1, 2026

Related: wintercms/winter#801

Screenshot 2026-01-02 at 1 07 41 AM Screenshot 2026-01-02 at 1 08 19 AM Screenshot 2026-01-02 at 1 08 45 AM

Summary by CodeRabbit

  • New Features

    • Added visual green highlighting indicators to mark new translation strings in the code editor.
  • Style

    • Updated CSS styling with refined colors, borders, spacing, and interactive states across the builder interface.
    • Added new decoration styles for improved code editor visual feedback.
  • Refactor

    • Improved database migration code generation with enhanced structure and file organization.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 1, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request refactors the code editor integration from ACE to Monaco wrapper and restructures migration code generation to use explicit operation and table name parameters. CSS styling is updated with new translation indicators and color adjustments.

Changes

Cohort / File(s) Summary
CSS Styling Updates
assets/css/builder.css, assets/less/localization.less
Color state adjustments (#0181b9#2da7c7), minor padding/border tweaks, !important flag adjustments. New classes .builder-new-translation-line (green rgba background) and .builder-new-translation-gutter (green gutter indicator) for Monaco decoration styling.
JavaScript Editor Wrapper Refactoring
assets/js/build-min.js, assets/js/builder.index.entity.localization.js
Replaced ACE editor (.editor property access) with Monaco wrapper (codeEditorWrapper). Updated getCodeEditor() to return wrapper instead of editor instance. Converted annotation logic to Monaco decorations with adjusted line indexing. Modified copyStringsFromDone, updateLanguageFromServerDone, mergeLanguageFromServerDone to use wrapper API (setValue, setDecorations).
Migration Code Generation
classes/DatabaseTableModel.php, classes/TableMigrationCodeGenerator.php, classes/databasetablemodel/templates/full-migration-code.php.tpl, classes/databasetablemodel/templates/migration-code.php.tpl
Updated createMigrationObject signature to include operation and tableName parameters. Modified wrapMigrationCode to accept separate upCode/downCode. Changed template from named class to anonymous class with explicit up()/down() methods. Removed migration-code.php.tpl template contents; full-migration-code.php.tpl now uses return new class pattern with proper use statements.
Behavior & Model Updates
behaviors/IndexDatabaseTableOperations.php, classes/IndexOperationsBehaviorBase.php
Updated makeMigrationFormWidget signature to accept optional $alias parameter. Modified migration form creation to populate code field from request with fallback wrapping. Conditional scriptFileName assignment only if not present. Changed ApplicationException import path to Winter\Storm\Exception\ApplicationException.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Support Monaco editor' directly and clearly identifies the main change across the entire changeset—migration from ACE to Monaco editor throughout multiple files.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

coderabbitai[bot]

This comment was marked as resolved.

LukeTowers and others added 2 commits January 21, 2026 16:24
No longer required as codeeditor doesn't require AJAX requests anymore
@LukeTowers LukeTowers merged commit 26c9fdd into main Jan 28, 2026
5 of 6 checks passed
@LukeTowers LukeTowers deleted the wip/monaco-support branch January 28, 2026 20:18
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.

2 participants