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

monaco devdocs #15691

Merged

Conversation

Aaron-Junker
Copy link
Collaborator

Adds a doc for monaco maintaining

@github-actions
Copy link

github-actions bot commented Jan 21, 2022

@check-spelling-bot Report

🔴 Please review

See the files view or the action log for details.

Unrecognized words (5)

autogenerate
Awaitable
Cls
contextmenu
stringify

Previously acknowledged words that are now absent abap abcd abcdefgh appcontainer atop autogenerates awaitable AZCLI azurecr binskim btm buildcommand buildtools cameligo cdpxwin cdxml ChaseKnowlden cjs CleanCodeDeveloper cljs cls CONTEXTMENU CPPARM CPPx csx CTLCOLORSTATIC defaultcommand Deuchert dupenv DUSTIN efgh errc errorlevel estdir etcore Firefox fsscript Gamebar graphql Grayscale hmon iccex ICONINFORMATION IMonitor INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL Javascript julia kotlin ktm kts LASTEXITCODE LEQ ligo linkid litcoffee MAINICON MAKELPARAM Minimizeallwindows mkdir moderncop msiexec MSIINSTALLER MSIL namings NATIVEFNTCTL neq netlify nocache php phps plx policheck popd powerquery psc psm Pui pushd pyc pyd pyi pyo pyz Qin rda rdata rdeveen rds rexit robocopy scm SETRANGE SETSTEP SHAREIMAGELISTS smallbasic spamming spdth sregex STEPIT Stringify stx svh symlink systemverilog taskkill tbc tcl UITo umd uninit UWPUI vbhtml verilog vse vsix WDK wdksetup wdkvsix We'd webclient webpack wifstream WINMSAPP
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the users/aaron-junker/monaco-devdocs branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/whitelist.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/microsoft/PowerToys/issues/comments/1018801895" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")

patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")

update_files
rm $comment_body
git add -u

Copy link
Contributor

@franky920920 franky920920 left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jan 23, 2022

@check-spelling-bot Report

🔴 Please review

See the files view or the action log for details.

Unrecognized words (5)

autogenerate
Awaitable
Cls
contextmenu
stringify

Previously acknowledged words that are now absent abap abcd abcdefgh appcontainer atop autogenerates awaitable AZCLI azurecr binskim btm buildcommand buildtools cameligo cdpxwin cdxml ChaseKnowlden cjs CleanCodeDeveloper cljs cls CONTEXTMENU CPPARM CPPx csx CTLCOLORSTATIC defaultcommand Deuchert dupenv DUSTIN efgh errc errorlevel estdir etcore Firefox fsscript Gamebar graphql Grayscale hmon iccex ICONINFORMATION IMonitor INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL Javascript julia kotlin ktm kts LASTEXITCODE LEQ ligo linkid litcoffee MAINICON MAKELPARAM Minimizeallwindows mkdir moderncop msiexec MSIINSTALLER MSIL namings NATIVEFNTCTL neq netlify nocache php phps plx policheck popd powerquery psc psm Pui pushd pyc pyd pyi pyo pyz Qin rda rdata rdeveen rds rexit robocopy scm SETRANGE SETSTEP SHAREIMAGELISTS smallbasic spamming spdth sregex STEPIT Stringify stx svh symlink systemverilog taskkill tbc tcl UITo umd uninit UWPUI vbhtml verilog vse vsix WDK wdksetup wdkvsix We'd webclient webpack wifstream WINMSAPP
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the users/aaron-junker/monaco-devdocs branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/whitelist.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/microsoft/PowerToys/issues/comments/1019425319" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")

patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")

update_files
rm $comment_body
git add -u

doc/devdocs/modules/powerpreview/monaco/readme.md Outdated Show resolved Hide resolved
doc/devdocs/modules/powerpreview/monaco/readme.md Outdated Show resolved Hide resolved
doc/devdocs/modules/powerpreview/monaco/readme.md Outdated Show resolved Hide resolved
doc/devdocs/modules/powerpreview/monaco/readme.md Outdated Show resolved Hide resolved
Aaron-Junker and others added 3 commits January 23, 2022 09:11
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Copy link
Collaborator

@htcfreek htcfreek left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Jan 24, 2022

@check-spelling-bot Report

🔴 Please review

See the files view or the action log for details.

Unrecognized words (4)

autogenerate
Awaitable
CCB
CFFDAFADA

Previously acknowledged words that are now absent abap abcd abcdefgh appcontainer atop autogenerates awaitable AZCLI azurecr binskim btm buildcommand buildtools cameligo cdpxwin cdxml ChaseKnowlden cjs CleanCodeDeveloper cljs CPPARM CPPx csx CTLCOLORSTATIC defaultcommand Deuchert dupenv DUSTIN efgh errc errorlevel estdir etcore Firefox fsscript Gamebar graphql Grayscale hmon iccex ICONINFORMATION IMonitor INITCOMMONCONTROLSEX INSTALLLOGATTRIBUTES INSTALLLOGMODE INSTALLUILEVEL Javascript julia kotlin ktm kts LASTEXITCODE LEQ ligo linkid litcoffee MAINICON MAKELPARAM Minimizeallwindows mkdir moderncop msiexec MSIINSTALLER MSIL namings NATIVEFNTCTL neq netlify nocache php phps plx policheck popd powerquery psc psm Pui pushd pyc pyd pyi pyo pyz Qin rda rdata rdeveen rds rexit robocopy scm SETRANGE SETSTEP SHAREIMAGELISTS smallbasic spamming spdth sregex STEPIT stx svh symlink systemverilog taskkill tbc tcl UITo umd uninit UWPUI vbhtml verilog vse vsix WDK wdksetup wdkvsix We'd webclient webpack wifstream WINMSAPP
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the users/aaron-junker/monaco-devdocs branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/microsoft/PowerToys/issues/comments/1020311615" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")

patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized words[^<]*</summary>\n*```\n*([^<]*)```\n*</details>$}m) { print "$1" } elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' < "$comment_body")

update_files
rm $comment_body
git add -u
If the flagged items do not appear to be text

If items relate to a ...

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

  • binary file.

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

@microsoft microsoft deleted a comment from github-actions bot Jan 24, 2022
Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

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

Didn't try doing it, but instructions seem fine.
Thank you!

@Aaron-Junker Aaron-Junker merged commit cfb6120 into feature/monacoPreviewPane Jan 25, 2022
Aaron-Junker added a commit that referenced this pull request Jan 25, 2022
* Create Readme.md

* Update Readme.md

* Rebased to master

* started integrating

* Resolve merge conflict

* Fixed merge conflict

* Edited expect.txt

* Tried implementig interfaces

* Push

* Push

* push

* push

* Deleted no longer used files

* push

* push

* Thanks @jaimecbernando for helping

* can load via url

* getting stuff semi stubbed out

* full render without passing vars

* making sure we clearly label the file was us

* push

* push

* push (does not work)

* Push

* push

* Added file size limit of 3 Kilobyte in standalone App (MoncaoPreview)

* Added monacosrc to excludes.txt (spell checker)

* Fixed XAMLHost loading issue and changed namespace of Settings.cs

* push

* Restructred some code in MonacoPreviewHandler  (not functional)

* MonacoPreview changes:

Added maximal file size and error message as values in Settings.cs
Increased maxFileSize to 10 KB
Renamed variables and formed code according to style guidelines
Added many comments
Deleted usused code
Added unimplemented(?) NavigationStarted method to prevent navigation in WebView
Fixed scrollbar issues (Not beautiful, but still better)
Removed never seen laoding window
Added some debug information as well as some Exceptions.

MonacoPreviewHandler Changes:

Changed order of code executions (still not usable)

* Push

* Push

* Push

* push

* Oh my god, it works

* Added loading screen and resize

* Added some comments, changed variable names and integrated some stuff from MonacoPreview to MonacoPreviewHandler;

* Monaco Preview Handler:
* Removed accessibilityhelpurl
* Made background of loading screen like theme selected
* dev tools open now in Debug mode automatically
* Fixed error message for too big file size

* push

* Fixed a tiny bug

* Updated a NuGet Pasckage

* Removed some to-do points in FileHandler.cs and added them to #14957

* Removed some to-do points in FileHandler.cs and added them to #14957.

Supressed a warning and styled a function better in PrebiewHandlerCommon

* Fixed 2 comment typos and a font that didn't load. (Sadly his required enable CORS again :( )

* Removed old standalone project

* Removed old unused files & rebase to master #1

* Deleted everything from the monaco source code expect the minified version

* Push

* Added summary of all functions. Restructred/simplified/clarified some code.

* Added resources

* Update bug_report.yml

* Update translation_issue.yml

* Update expect.txt

* Update ProofOfConcept/MonacoPreview/monacoPreviewHandler/index.html

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update ProofOfConcept/MonacoPreview/monacoPreviewHandler/MonacoPreviewHandlerControl.cs

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update ProofOfConcept/MonacoPreview/monacoPreviewHandler/Resources.resx

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Added some additional file types

* Added additional file types

* Moved to a json file for the available languages and some other changes

* Added error message when WebView2 is not installed

* Remoing throw error

* Update expect.txt

* Update excludes.txt

* Update excludes.txt

* Integrate Monaco preview handler into PowerToys

* Update excludes.txt

* Ignore .svg extension

* Update signing list

* Update signing list #2

* Changed monaco string

* fix

* Fixed wrong JSON field and changed date of Copyright

* Added check if WebView is installed

* Added error when webview2 is not installed

* Increased file size limit to 50kb

* Added new file generator for languages.json

* Remove unvisible symbol at the beggining of the file

* Regenerate resx file

* Update MonacoPreviewHandler.csproj

* tweaking script to ignore 1.0 check on theme dll

* Update src/modules/previewpane/MonacoPreviewHandler/Properties/Resources.resx

Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>

* Update src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs

Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>

* Update src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs

Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>

* Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>

* Update excludes.txt

* Update src/modules/previewpane/powerpreview/Resources.resx

Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>

* Check and install WebView2 if needed

* Run spellcheck script

* Update ESRPSigning_core.json

adding font

* Update versionAndSignCheck.ps1

adding fonts to verify

* Adding in Monaco usage

* Update NOTICE.md

* Update ESRPSigning_core.json

* expect.txt update

* Use Common.UI/ThemeManager.cs

* No user facing strings should reference Monaco

* Fix build error

* monaco devdocs (#15691)

* Create update-monaco-editor.md

* Update and rename update-monaco-editor.md to readme.md

* Update doc/devdocs/modules/powerpreview/monaco/readme.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Update doc/devdocs/modules/powerpreview/monaco/readme.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Update doc/devdocs/modules/powerpreview/monaco/readme.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Update readme.md

* Update readme.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Fix WebView installer condition

* Using system.text.json

* Update ESRPSigning_core.json

* Remove Newtonsoft.Json.dll from installer

* Revert "WinUI bump (#15707)"

This reverts commit b6a207c.

* Revert "Update Settings.UI.csproj (#15704)"

This reverts commit 1a25dac.

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Aaron Junker <aaron.junker@sus.schulen-stadtsh.ch>
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Franky Chen <franky920920+gpg@gmail.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
@Aaron-Junker Aaron-Junker deleted the users/aaron-junker/monaco-devdocs branch January 29, 2022 06:49
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.

4 participants