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

feat(module:code-editor): support MonacoEnvironment config in NZ_CONFIG #7359

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

yangjunhan
Copy link
Contributor

@yangjunhan yangjunhan commented Apr 11, 2022

close #6502

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #6502

What is the new behavior?

From microsoft/monaco-editor changelog:
image

NZ_CONFIG code-editor config support modifying window.MonacoEnvironment

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@codecov
Copy link

codecov bot commented Apr 11, 2022

Codecov Report

Merging #7359 (ee667a4) into master (b517bd4) will increase coverage by 0.00%.
The diff coverage is 66.66%.

@@           Coverage Diff           @@
##           master    #7359   +/-   ##
=======================================
  Coverage   91.62%   91.62%           
=======================================
  Files         487      487           
  Lines       16013    16015    +2     
  Branches     2604     2605    +1     
=======================================
+ Hits        14672    14674    +2     
  Misses       1027     1027           
  Partials      314      314           
Impacted Files Coverage Δ
components/core/config/config.ts 100.00% <ø> (ø)
components/code-editor/code-editor.service.ts 19.75% <66.66%> (+0.76%) ⬆️
components/core/util/text-measure.ts 92.98% <0.00%> (+0.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b517bd4...ee667a4. Read the comment docs.

Copy link
Member

@simplejason simplejason left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -3,11 +3,17 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { editor } from 'monaco-editor';
import { editor, Environment } from 'monaco-editor';
Copy link
Member

Choose a reason for hiding this comment

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

@yangjunhan Should not import the type declaration here. Forcing users to install monaco-editor even if they are not actually using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[nz-code-editor] Configure MonacoEnvironment before (first) load
3 participants