redwoodjs/learn.redwoodjs.com

Copy button in the Tutorial text adds the EOL to the content being copied

adriatic opened this issue · 2 comments

This problem report has two parts - and everything below is a function of the terminal shell being used. In this report only PowerShell is being used


Part 1

A Picture tells this better:

image

Here is the screenshot of pasting the text copied to VSCode internal terminal, running PowerShell shell:

image

Note that the text copied from the tutorial to the clipboard contains the EOL character:

image

This behavior is NOT correct - the text should be pasted without the EOL character in order to give the user a chance to add something to this text, and the user should press the keyboard Enter key.

Here is the immediate consequence of having the EOL as a part of the command:

image

I am not sure whether the same problem should be fixed elsewhere in the Tutorial text


Part 2

Observe the image below, where the response to the generator's prompt is entered "over" (instead than below) the command line text. When I entered create posts data (and pressed return), the following happened:

image

The CLI command yarn rw prisma migrate dev took the create posts text, but the PowerShell was also fed the same string ("create : The term 'create' is not recognized ...")

Note that all this could have been avoided by ensuring that yarn rw prisma migrate dev does not contain the EOL character. It seems that many different shells used by most users are of a more tolerant nature, however we need to ensure that all shells work the same way

@adriatic I was unable to quickly locate this command in the tutorial to fix it, but I see how the EOL problem is annoying.

Our docs are open source and we very much welcome pull requests. If you know the location of the command in the docs with the EOL error, you can help save other's from the same fate by making a PR!

HI @clairefro - again, Rob took care of this in the process of moving this issue from redwoodjs/redwoodjs.com 9 days ago. I verified that this works now as is was meant to 😄