Skip to content

Removed the default eol editor option

Denys Mishunov requested to merge 21431-remove-default-eol-editor-option into master

What does this MR do and why?

Removes the hardcoded endOfLine option from the default options we use for setting up Monaco editor (the one under the hood of Source Editor). With that option Web IDE always converts the eol to LF before committing files. Even if the files are CRLF for a reason (project policy, etc.). This is the first step in addressing Web editors and commit API convert CRLF line en... (#21431 - closed) with the second step being updating Gitaly to not do the same conversion on the server.

Before this MR, the transformation on the client happened when switching to the "Commit" tab of Web IDE.

Screenshots or screen recordings

The problem can be observed when switching from "Edit" to "Commit" tabs of Web IDE.

Before After
Screenshot_2022-11-30_at_16.23.49 Screenshot_2022-11-30_at_15.05.34

How to set up and validate locally

  1. Create a simple textual file with CRLF line endings in an editor of your choice. For example, in VSCode:
  • create a file
  • at the bottom right, if you see LF, click it and select CRLF Screenshot_2022-11-30_at_16.15.02
  1. Save the file
  2. In your local gdk instance, go to Web IDE of any project. For example /-/ide/project/flightjs/Flight/edit/master/-/
  3. Upload a file you have just created
  4. Note the correct CRLF indicator at the bottom right

Screenshot_2022-11-30_at_15.05.51

  1. Go to "Commit" tab of the interface. Note that the eol is still indicated correctly

Screenshot_2022-11-30_at_15.05.34

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #21431 (closed)

Edited by Denys Mishunov

Merge request reports