Arduino IDE's "Edit > Copy for Forum (Markdown)" feature copies the contents of the currently selected editor tab to the
clipboard, with "fenced code block" markup added to provide correct formatting when the content is posted to a platform
supporting Markdown language such as Arduino Forum, GitHub, Stack Exchange, etc.
One of the most common points of friction between the volunteer helpers on the forum and the newcomers requesting
assistance is the failure to use the correct markup when posting code. In the best case scenario the code and thread is
made less readable and less convenient to copy to the IDE for further investigation. Components of the code often
resemble markup, which causes it to be corrupted by the forum's renderer.
Even in cases where the user was conscientious enough to attempt to add the right markup, which is facilitated by tools
such as "Copy for Forum (Markdown)", they often still don't get it quite right. So it is worthwhile to make efforts to
make it less likely for the markup to be inadvertently invalidated.
"Fenced code block" markup must be on its own lines before and after the code content. Someone not familiar with
Markdown won't know this fact and may simply paste the content copied via "Copy for Forum (Markdown)" without manually
adding a newline before and after. Since the code content is preceded and succeeded by a newline, they will not have any
visual indication of a problem.
Adding a newline before and after the content will ensure the markup is valid regardless of the context it is pasted
into. In cases where the user did add a newline and this introduces a redundant line break in the forum post, it will
not have any effect on the rendered content because the additional newlines are ignored by the renderer.
- The gRPC core client provider requires an initialized config service when processing the error message received during the `InitRequest`
- Additional logging in the config service.
- The tests log into the console.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
- code files will be copied to sketch folder root
- other files go under the `data` folder in the sketch folder root
Closes#284
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
* Fix corruption of incoming UTF-8-encoded serial data
* Make TextDecoder() readonly because it can be
Co-authored-by: z3bra <111462146+z3bra5hax@users.noreply.github.com>
When the widget is opened the first time with any search options,
the widget might miss the refresh event as it does not happen at
instantiation time. This PR ensures that all list widget refresh
events wait until the React component is rendered and is visible
in the UI.
This change also ensures that the debounced search will run with
the most recent search options by setting the `trailing` property
of the debounced function to `true`.
Closes#1740
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Manually update the menus when executing the command.
Also disabled the menu when the settings dialog is opened.
closes#1735
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Do not try to parse the original `NotFound` error message, but look for
a sketch somewhere in the requested path.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
From now on, the editor widget open promise resolution does not rely on
internal Theia events but solely on @phosphor's `isAttached`/`isVisible`
properties.
The editor widget promise resolves with the next task after a navigation
frame so the browser can render the widget.
Closes#1612
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
The original (`fs-extra`-based) implementation did not check if the
file is writable either.
Resources are not writable in mounted AppImages.
Closes#1586
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>