-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Editor preview support for external renderers #23333
Editor preview support for external renderers #23333
Conversation
The |
There is an existing PREVIEWABLE_FILE_MODES setting for this purpose, but it didn't work for anything except markdown.
d55dcbc
to
ea90dd0
Compare
Yeah, rename and update docs, and keep the old ones as compat alias. Ideally we should deprecate but I don't think we have a system in place for this. |
For internal web routers, I think we can just use For API endpoints, we can keep both endpoints at the moment. |
This comment was marked as off-topic.
This comment was marked as off-topic.
"file" mode looks like not work. I put the |
I'm not sure what is not working exactly? For me the
|
This is my app.ini
And when I edit a file end with |
Ah, it has to be like this with the current implementation:
That's how I understood it was meant to work. Though I'm unsure why this setting exists at all really, why the editor doesn't just display a preview for every extension it knows, same as when just viewing the file. |
I guess this was meant to map to the |
Isn't preview always server-rendered, e.g. backed by a API that is exposed by the configurable markup renderers? At least I don't think we use any kind of preview functionality of Monaco itself, and I'm not aware that it has any. |
This does work. I made a mistake to let |
It is always server-rendered.
Could we remove I can't think of a scenario where you want to have a preview when viewing the file, but then when you click edit not have a Preview tab available. It seems useless to me, and that's really the only thing this setting does. |
I'm OK to remove the configuration item. |
I did implement what was suggested in that comment. Please see the PR description and other comments for details on what the breaking change is, and why I think it's barely a breaking change at all and more of a bugfix. |
Removing a broken setting is barely breaking, I agree. But it should be mentioned at least so people can remove it from their configs. |
Remove
[repository.editor] PREVIEWABLE_FILE_MODES
setting that seemed like it was intended to support this but did not work. Instead, whenever viewing a file shows a preview, also have a Preview tab in the file editor.Add new
/markup
web and API endpoints withcomment
,gfm
,markdown
and newfile
mode that uses a file path to determine the renderer.Remove
/markdown
web endpoint but keep the API for backwards and GitHub compatibility.The
[repository.editor] PREVIEWABLE_FILE_MODES
setting was removed. This setting served no practical purpose and was not working correctly. Instead a preview tab is always shown in the file editor when supported.