sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
706 stars 772 forks source link

Prepare SAP Build Work Zone, Standard Edition Setup #23210

Open je-hal opened 12 months ago

je-hal commented 12 months ago

Tutorials: https://developers.sap.com/tutorials/btp-app-work-zone-setup.html

The code snippets that you have to copy to the yaml file are not indented correctly (or there is a general problem with the layout?).

Whenever I copied the code snipped to VS code, I had to add one space per line to have the right indentation.

For example, copying this: image

Lead to this in VS code: image

So I had to add 1 space per line for the whole block. For bigger blocks, that's annoying.

I also tried to copy everything using the "Copy" function to notepad, and you can see that there is only one space before the first bullet:

image
smahati commented 11 months ago

Hello @je-hal,

We try to replicate the structure to help guide users about where to copy the configuration and we do try to keep the indentation easy to copy-paste but as it is a manual process (you need to copy only a few lines which are highlighted) the resulting indentation depends on where the user decides to paste it's not possible to make sure it is done right.

We cannot influence the copy feature to copy specific lines so I would not recommend using it. I see that on line 2 you have "..." this can be the result of clicking the copy button and pasting. The first two lines were not meant to be copied. unfortunately we do not have the option to disable the copy button in these cases because we do not have such a feature in the tutorial navigator.

Of course there are easy solutions like providing the whole file but a developer who would work on YAML files is expected to learn to format it correctly even when copy-pasting configs from other places but we will try to find an optimal solution.

Best regards, Maha

je-hal commented 11 months ago

Hi Maha,

could you do the following test for me to verify what I meant?

  1. Select a few lines as block of the YAML code in your tutorial, ensuring that the full line (from the beginning to the end) is selected.
  2. Paste those lines into an editor - best one that can validate YAML - at the first position of a line.

The outcome is: The indentation is wrong for all lines that were pasted into the new file. I don't think that's right, even considering that readers only copy parts of the coding. As said above, there is exactly one space missing for all lines that were pasted to a new editor. Even if someone misses the copy the first line from the beginning, after the line feed the next line of the block should be copied from the beginning. That doesn't happen.

My feeling is: Either the YAML code in the original code block of your tutorial is not formatted correctly (each line starting with one space instead of starting with two spaces), or it's some layout issue in the tutorial navigator. I hope for our customers that it's the former. 😉

I heard that many colleagues were stuck in this part of the mission, so I could imagine this issue is one reason why it was so difficult.

Kind regards, Jens