dotnet / try

Try .NET provides developers and content authors with tools to create interactive experiences.
MIT License
2.9k stars 526 forks source link

Sizing issues of the IFrame containing the interactive editor #1198

Open ocallesp opened 6 months ago

ocallesp commented 6 months ago

image

This is needed in order to improve the UI.

In production it looks seamless image

however with the new version we can see some unnecessary overflow image

AbhitejJohn commented 6 months ago

Additional context: this is specific to the marketing page.

ocallesp commented 6 months ago

https://dotnetwebsite.azurewebsites.net/en-us/

or for pr changes

https://dotnetwebsite-dev-pr-6496.azurewebsites.net/

jonsequitur commented 5 months ago

The editor can be found here: https://dotnet.microsoft.com/en-us/languages

ocallesp commented 5 months ago

The fix should go in the host

jonsequitur commented 5 months ago

The element that needs to be sized is here: image

It should be sized using the Monaco API, which is exposed by trydotnet.js.

danzhu54 commented 5 months ago

@jonsequitur can you point me to the Monaco API for sizing?

jonsequitur commented 5 months ago

https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IEditor.html#layout.layout-1

danzhu54 commented 5 months ago

When does the editor set the size by default? It seems to be called twice: once when it initializes and then again when I set the size with setSize image

Is it possible for me to pass in my size preferences to the editor via createSessionWithProjectAndOpenDocument?

ocallesp commented 5 months ago

@danzhu54 you cannot pass the size of the editor via createSessionWithProjectAndOpenDocument