Preview Handler for developer files (#15138)

* 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 b6a207c4b6.

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

This reverts commit 1a25dacc73.

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>
This commit is contained in:
Aaron Junker
2022-01-25 21:02:10 +01:00
committed by GitHub
parent f9434ac812
commit 39b98dab3b
126 changed files with 3713 additions and 35 deletions

View File

@@ -1,4 +1,8 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
(?:^|/)monacoSRC/
(?:^|/)MonacoPreviewHandler/languages.json
(?:^|/)MonacoPreviewHandler/index.html
(?:^|/)MonacoPreviewHandler/generateLanguagesJson.html
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)package(?:-lock)\.json$

View File

@@ -1,5 +1,8 @@
aaaa
abap
abcd
abcdef
abcdefgh
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abgr
abi
@@ -59,6 +62,7 @@ api
APIENTRY
APIIs
APPBARDATA
appcontainer
appdata
APPICON
appid
@@ -105,12 +109,14 @@ atlcom
atleast
atlfile
atlstr
atop
Attribs
attrs
aumid
Aut
Authenticode
AUTHN
autogenerate
autogenerated
autogenerates
AUTOHIDE
@@ -118,10 +124,13 @@ AUTOMATIONPROPERTIES
Autorun
AUTOUPDATE
AValid
Awaitable
awakeness
awakeversion
AWAYMODE
AYUV
AZCLI
azurecr
backend
backtracer
BAEC
@@ -143,6 +152,7 @@ bigbar
bigobj
binaryformatter
binlog
binskim
bios
bitmapimage
BITMAPINFO
@@ -176,6 +186,7 @@ Browsable
bsd
bstr
bti
btm
Btn
BTNFACE
Bto
@@ -184,17 +195,21 @@ BUFSIZE
bugreport
Buid
BUILDARCH
buildcommand
buildtools
buildtransitive
BValue
bytearray
CALG
callbackptr
cameligo
Camer
Cangjie
CANRENAME
CAPTURECHANGED
cassert
CAtl
CCB
cch
CCom
CContext
@@ -203,9 +218,12 @@ cdecl
CDeclaration
CDEF
cdpx
cdpxwin
cdxml
CEBB
CENTERALIGN
CFDB
CFFDAFADA
cguid
changecursor
Changemove
@@ -224,6 +242,7 @@ cielab
ciexyz
CImage
cinttypes
cjs
cla
clangformat
CLASSDC
@@ -237,8 +256,10 @@ CLIENTPULL
clientside
CLIPCHILDREN
CLIPSIBLINGS
cljs
clrcall
Cls
cls
CLSCTX
clsid
cmder
@@ -304,10 +325,12 @@ COULDNOT
countof
cout
CPower
CPPARM
cppblog
cppruntime
cppstd
cppwinrt
CPPx
CProj
CREATESCHEDULEDTASK
CREATESTRUCT
@@ -330,6 +353,7 @@ cstdint
cstdlib
cstring
CStyle
csx
CSY
CTAB
CTest
@@ -386,6 +410,7 @@ Dedup
deduplicate
DEFAULTBOOTSTRAPPERINSTALLFOLDER
DEFAULTCOLOR
defaultcommand
DEFAULTFLAGS
DEFAULTONLY
DEFAULTTONEAREST
@@ -468,6 +493,8 @@ dshow
dst
DSVG
DText
dupenv
DUSTIN
dutil
DVASPECT
DVASPECTINFO
@@ -532,11 +559,14 @@ ERASEBKGND
EREOF
EResize
errc
errorlevel
ERRORMESSAGE
ERRORTITLE
ESettings
esize
esrp
estdir
etcore
etl
etw
EUQ
@@ -600,6 +630,7 @@ Filterx
finalizer
findfast
findstr
Firefox
FIXEDFILEINFO
FLASHZONES
FLASHZONESONQUICKSWITCH
@@ -607,6 +638,7 @@ flt
flyout
fmtlib
FOF
fof
FOFX
FOLDERID
folderpath
@@ -620,6 +652,7 @@ FRAMEDOWNLOAD
franky
frankychen
Froml
fsscript
fstream
FTYPE
func
@@ -631,6 +664,7 @@ FZE
gabime
GAC
gacutil
Gamebar
GBarm
GBs
GCLP
@@ -656,6 +690,7 @@ globals
GNumber
google
GPTR
graphql
Grayscale
gsuberland
gtm
@@ -980,6 +1015,7 @@ IZoom
JArray
jarro
Jarryd
Javascript
jfif
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
jjw
@@ -991,6 +1027,7 @@ JSONOf
Jsons
jsonval
jsoref
julia
junja
jxr
jyuwono
@@ -1018,13 +1055,17 @@ keyup
KILLFOCUS
Knowlden
Knownfolders
kotlin
KSPROPERTY
ktm
kts
Kybd
LAlt
Lambson
lamotile
langword
Lastdevice
LASTEXITCODE
Laute
laute
laviusmotileng
@@ -1043,6 +1084,7 @@ ldx
LEFTSCROLLBAR
lego
len
LEQ
LError
Lessthan
LEVELID
@@ -1052,12 +1094,15 @@ lhwnd
LIBID
LIGHTORANGE
LIGHTTURQUOISE
ligo
lindex
linkedin
linkid
linq
LINQTo
Linux
listview
litcoffee
lld
llkhf
Llvm
@@ -1173,12 +1218,14 @@ millis
mimetype
mindaro
Minimatch
Minimizeallwindows
MINIMIZEBOX
miniz
minlevel
Miracast
mirophone
mjpg
mkdir
mlcfg
mmdeviceapi
mmi
@@ -1186,6 +1233,7 @@ mmsys
mmsystem
mockapi
MODECHANGE
moderncop
modernwpf
modulekey
MONITORINFO
@@ -1250,6 +1298,7 @@ MYICON
NAMECHANGE
nameof
namespace
namings
NATIVEFNTCTL
NCACTIVATE
ncc
@@ -1273,6 +1322,7 @@ NCRBUTTONUP
NDEBUG
ndp
NEEDDISPATCH
neq
NESW
netcore
netcoreapp
@@ -1299,6 +1349,7 @@ NLSTEXT
NOACTIVATE
NOAGGREGATION
NOASYNC
nocache
NOCLOSEPROCESS
NOCOPYBITS
nodeca
@@ -1341,6 +1392,7 @@ NOTRACK
NOUPDATE
NOZORDER
NPH
npm
npos
NResize
ntdll
@@ -1444,6 +1496,8 @@ pgp
pguid
phbm
phbmp
php
phps
phwnd
pici
pid
@@ -1463,7 +1517,10 @@ ploca
plocm
plugin
pluginsmodel
plx
PMSIHANDLE
policheck
popd
popup
POPUPWINDOW
posix
@@ -1471,6 +1528,7 @@ Postion
powercfg
powerlauncher
powerpreview
powerquery
powerrename
POWERRENAMETEST
POWERRENAMEUIHOST
@@ -1523,8 +1581,10 @@ propkey
propvarutil
prvpane
psapi
psc
PSECURITY
psfgao
psm
Psr
psrm
psrree
@@ -1540,6 +1600,7 @@ PToy
ptr
ptstr
Pui
pushd
PVOID
pwa
pwcs
@@ -1547,6 +1608,11 @@ pwsh
PWSTR
pwsz
pwtd
pyc
pyd
pyi
pyo
pyz
qianlifeng
Qin
qit
@@ -1579,7 +1645,10 @@ RBUTTONUP
rclsid
RCONTROL
RCtrl
rda
rdata
rdeveen
rds
readme
READMODE
readonly
@@ -1658,6 +1727,7 @@ RKey
RMENU
RNumber
roadmap
robocopy
Roboto
roslyn
royvou
@@ -1693,6 +1763,7 @@ SAVEFAILED
scancode
scanled
schedtasks
scm
SCOOBE
SCOPEID
screenshot
@@ -1734,6 +1805,7 @@ SETWORKAREA
sfgao
SFGAOF
SFP
SHAREIMAGELISTS
sharpkeys
SHCNE
SHCNF
@@ -1800,6 +1872,7 @@ SKIPOWNPROCESS
sku
SLGP
sln
smallbasic
SMALLICON
SMTO
snd
@@ -1811,9 +1884,11 @@ SOURCECLIENTAREAONLY
SOURCEHEADER
sourceid
sourcesdirectory
spamming
spdisp
spdlog
spdo
spdth
spec'ing
specialfolder
spesi
@@ -1885,6 +1960,7 @@ strsafe
strutil
sttngs
Stubless
stx
STYLECHANGED
STYLECHANGING
stylecop
@@ -1900,6 +1976,7 @@ SVE
SVGIn
SVGIO
svgpreviewhandler
svh
SWC
SWFO
SWITCHEND
@@ -1927,6 +2004,7 @@ syslog
SYSMENU
systemd
SYSTEMTIME
systemverilog
Tadele
tadele
talynone
@@ -1943,7 +2021,9 @@ taskbar
taskkill
tasklist
taskschd
tbc
tchar
tcl
tcscpy
TCustom
tdbuild
@@ -2031,6 +2111,7 @@ ULARGE
ULLONG
ulong
ULONGLONG
umd
unchecks
uncomment
uncompilable
@@ -2083,9 +2164,11 @@ utf
utils
uuidof
uwp
UWPUI
uxtheme
UYVY
validmodulename
vbhtml
vcamp
vccorlib
vcdl
@@ -2102,6 +2185,7 @@ vec
VERBSONLY
VERBW
VERIFYCONTEXT
verilog
verrsrc
VERSIONINFO
Versioning
@@ -2129,6 +2213,8 @@ VSCBD
vscdb
vscode
VSCROLL
vse
vsix
vsonline
vstemplate
VSTHRD
@@ -2149,13 +2235,19 @@ wcscpy
wcslen
wcsncmp
wcsnicmp
WDK
wdksetup
wdkvsix
wdp
wdupenv
We'd
weakme
webcam
webclient
webpack
webpage
website
webview
wekyb
Wevtapi
wgpocpl
@@ -2202,6 +2294,7 @@ winkey
WINL
winmd
winmm
WINMSAPP
winnt
winres
winrt
@@ -2253,6 +2346,7 @@ wstr
wstring
wstringstream
wsz
WTL
wtoi
WTS
wtsapi