MudBlazor / TryMudBlazor

A playground for trying out and testing MudBlazor components entirely in the browser.
https://try.mudblazor.com/
GNU General Public License v2.0
75 stars 36 forks source link

Enhanced Editor #114

Closed Garderoben closed 1 year ago

Garderoben commented 1 year ago

Description

First PR for a more "enhanced" editor. This update is mostly refactoring the old REPL code. While trying to understand the Monaco editor itself, I noticed much of the original JS was not needed. Other parts i changed out to MudBlazor services or components. Updated Monaco Editor and split.js to it's latest's.

I have added a few smaller "quality of life" features where the biggest one might be suggestions or "snippets" which works in both .razor and .csharp files where we can add snippets of mudblazor components.

Snippets Update1 Bracket pair colorization image Mouse Wheel Zoom Update2 New splitter bar little thicker, little easier to grab Update3 Real Themes changed the "css hacked" editor dark theme to use real Monaco themes for now its just default and vs-dark for dark mode. Update4 Format selection/document Update5

henon commented 1 year ago

Lots of awesome new features, you rock @Garderoben

ScarletKuro commented 1 year ago

Looks good, but I only don't get what is this page for TestPage.razor?

ScarletKuro commented 1 year ago

And it would be nice to try switch to the IKeyInterceptor from MudBlazor, to throw this

function onKeyDown(e) {
    if (e.ctrlKey && e.keyCode === 83) {
        e.preventDefault();

        if (_dotNetInstance && _dotNetInstance.invokeMethodAsync) {
            throttle(() => _dotNetInstance.invokeMethodAsync('TriggerCompileAsync'), 1000, 'compile');
        }
    }
}
Garderoben commented 1 year ago

Looks good, but I only don't get what is this page for TestPage.razor?

another miss from me, something i used while testing will remove it :)