1411 Commits

Author SHA1 Message Date
Francesco Spissu
0c22884729
Error message if upload is not possible (#1353) 2022-08-26 11:24:03 +02:00
Akos Kitta
fc9107c084 Use addressLabel in the UI.
- for the boards dropdown, and
 - for the `Tools` > `Port` menu.

Closes #1331

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-25 11:49:50 +02:00
Akos Kitta
474d5e5975 Added a workaround for missing port#properties.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-25 11:49:50 +02:00
Akos Kitta
f7f644cf36 Use port properties from the discovery.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>

Closes #740
2022-08-25 11:49:50 +02:00
Dave Simpson
b5f9aa0f15
change hard coded max and min (#1345) 2022-08-24 12:32:42 +02:00
Dave Simpson
cc5cf3b165
fix 180: prevent erroneous "auto-reconnect"(s) in board selector (#1328)
* ensure auto-select doesn't select wrong port

prevent auto-select of unattached boards Co-authored-by: Francesco Spissu <francescospissu@users.noreply.github.com>

* clean up

* add "uploadInProgress" prop to boards change event

* remove unused methods and deps

* [WIP]: leverage upload event to derived new port

* remove timeout

* refine port selection logic

* clean up naming

* refine port selection logic & add delayed clean up

* renaming & refactoring

* method syntax & remove unnecessary methods
2022-08-24 12:31:51 +02:00
per1234
125bd64c91 Install Arduino CLI build dependencies in all dependent workflows
Arduino CLI is a tool dependency of Arduino IDE. For this reason, the necessary Arduino CLI build is acquired whenever
running the `yarn` command in the repository.

The way the Arduino CLI build is acquired depends on the type of version specified as dependency in the
`arduino.cli.version` field of the arduino-ide-extension package metadata:

- Release/nightly: download pre-built standard distribution
- Git ref: build from source

This means that, in the latter case, all build dependencies of Arduino CLI must be present. While the Go module
dependencies are automatically installed during the build, the build tool dependencies must be installed in advance:

- Go programming language
- Task task runner

Arduino IDE's infrastructure was recently changed to use the Task tool to build Arduino CLI in the supported manner. A
step to install Task was not added to some of the workflows that run `yarn`, which caused them to fail when a
non-release version of Arduino CLI was used as a dependency:

arduino-ide-extension: >>> Building the CLI...
arduino-ide-extension: /bin/sh: 1: task: not found
arduino-ide-extension: error Command failed with exit code 1.

A step for the missing tool dependency is hereby added to those workflows.

The lack of an explicit installation of the other dependency, Go did not result in an error because Go is pre-installed
on the GitHub Actions runner. However, the installed version may not match the version Arduino CLI is intended to be
built with and validated for, and the version provided by the runner may change at any time. For this reason, it will be
safest to explicitly set up the appropriate version of Go in the workflows.
2022-08-24 01:11:21 -07:00
per1234
ca47e8a09a Fix inconsistency of input field placeholder text capitalization
The board search input field of the "Select Other Board and Port" dialog uses placeholder text to explain the usage of
the field to the user.

All other placeholder text in the IDE's UI uses sentence case. This specific placeholder was the exception, using
unpleasant caps lock instead.

The inconsistency is resolved by changing the placeholder text to the standard sentence case.
2022-08-22 01:06:18 -07:00
per1234
52804a5b52 Add missing i18n for UI strings
The text of the Arduino IDE user interface has been localized to 12 languages.

Before localization can be accomplished, internationalization must be done in the application's code base:

- Set up infrastructure to export localization data
- Pass all target strings to that infrastructure

While the first of these tasks is completed, the second was not completed for several strings which are part of the user
interface.

Those outstanding strings are hereby internationalized and will be made available for localization.
2022-08-22 01:06:18 -07:00
per1234
3ec62642dd Fix typos in log messages
Several of the log messages contained minor typos.
2022-08-21 05:45:49 -07:00
per1234
1281ad1932 Use more relevant page for "Help > Environment" menu item target
Selecting "Help > Environment" from the Arduino IDE menus opens a page containing usage information for the Arduino IDE
application in the browser.

Previously, the URL used was the same as that of in Arduino IDE 1.x:

https://www.arduino.cc/en/Guide/Environment

The documentation from that page was written for Arduino IDE 1.x. Even though the UI of the two versions is aligned for
the most part, some advancements made for the 2.x major version series resulted in some differences. This means that
documentation targeted at Arduino IDE 1.x is not always applicable to Arduino IDE 2.x.

Fortunately, documentation is now available for each major version series of the IDE. So resolution is only a matter of
pointing the menu item at the correct URL.
2022-08-21 05:45:17 -07:00
Alberto Iannaccone
de32bddc20
Fix dialogs UI scalability (#1311)
* make dialogs scroll when scaling up the UI

* add unit of measure to settings step input

* wrap settings dialog items when scaling up the UI

* fix dialogs width when scaling up the UI

* rework board config UI to make it scale up better

* refactor ide updater dialog: move buttons outside the dialog content

* refactor ide updater dialog: clean-up code and rename events

* fix board config dialog title case and and remove double ellipsis
2022-08-18 16:42:16 +02:00
Akos Kitta
79ea0fa9a6 Show all network and serial ports.
Otherwise, unrecognized network boards are ignored
by IDE2.

Closes #1327

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-18 11:03:27 +02:00
Akos Kitta
683219dc1c Fixed typos.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-18 11:03:27 +02:00
Akos Kitta
d674ab9b73 Handle missing core when getting board user fields
Closes #1142

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-18 10:56:03 +02:00
Alberto Iannaccone
5be1f9d7fe
change naming of nightly and snapshot builds (#1326)
replace `-` with `.` to make auto-update work correctly
2022-08-17 17:13:25 +02:00
per1234
9e2b73a045
Use unmodified official ClangFormat configuration as base formatter configuration (#1324)
The Arduino IDE's "Auto Format" feature is configured to produce the standard Arduino sketch formatting style by
default.

The Arduino IDE editor's default settings are compliant with that style. However, the user may adjust the editor
settings. In this case, the Arduino IDE automatically adjusts the Auto Format configuration to align with the user's
preferences.

The formatter configuration is consumed by several other projects in addition to the Arduino IDE. For this reason, the
configuration is hosted and maintained in a centralized location, from which it is pulled by all projects that use it.

Previously, the adjustment of the Arduino IDE formatter configuration according to the editor settings was integrated
into the configuration object itself. This meant that the standardized configuration had to be modified each time it was
pulled in to sync from the upstream source.

Moving the base formatter configuration object to a dedicated file, separated from the handling and adjustment code
allows syncs to be done by simply replacing the existing configuration file with the one automatically generated by the
CI system of the repository where the source configuration is hosted.
2022-08-16 08:09:39 -07:00
per1234
75e00c2bae Document clangd update procedure
Arduino IDE has dependencies on the clangd C++ language server and ClangFormat code formatter tools. These are updated
periodically to benefit from the ongoing development on those projects.

The update procedure requires operations in three different repositories:

- Generate builds in arduino/clang-static-binaries
- Validate and update formatter configuration in arduino/tooling-project-assets
- Update metadata in arduino/arduino-ide

Previously, this was undocumented and the procedure existed only in the form of "institutional memory".

The procedure is now fully documented in the readme of arduino-ide-extension.
2022-08-15 08:42:31 -07:00
Akos Kitta
989300f25d Close core error notification on subsequent action
Closes #1154

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-15 16:55:17 +02:00
Akos Kitta
5226636fed Link compiler errors to editor.
Closes #118

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-15 16:55:17 +02:00
Akos Kitta
8b3f3c69fc Use the refactored CLI in IDE2.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-15 09:19:57 +02:00
Akos Kitta
a39ab47e70 Use Task to build pinned CLI for IDE2.
Closes #1313

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-11 09:28:50 +02:00
Alberto Iannaccone
9cabd40429
2.0.0-rc9.2 (#1312)
* 2.0.0-rc9.2

* use arduino-cli version 0.26.0-rc1
2.0.0-rc9.2
2022-08-10 13:04:02 +02:00
Francesco Spissu
6e3681896c
Add Auto Format item under the Edit menu (#1230) 2022-08-10 11:36:53 +02:00
Akos Kitta
8a1cabd2bc Defer notification area rendering until app ready.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-09 17:23:10 +02:00
Akos Kitta
7a3e6789d1 Defer settings/certificates load until app ready.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-09 17:23:10 +02:00
Akos Kitta
92bc5ecf7b Replaced the splash screen with a preload.
Added a bare minimum example.

Closes #193
Closes #324
Closes #327
Closes #717
Closes #851

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-09 17:23:10 +02:00
Francesco Spissu
aebec0f942
Live change of theme from Preferences dropdown (#1296) 2022-08-09 14:40:56 +02:00
per1234
54db9bbce8 Sync sketch formatter configuration from source
The Arduino IDE's "Auto Format" feature is configured to produce the standard Arduino sketch formatting style, as
established by the Arduino IDE 1.x formatter.

The configuration is consumed by several other projects which require the configuration in a YAML file. In order to
provide all the consumers with a single canonical source and to locate the infrastructure and activity related to the
maintenance of the file in a more appropriate repository, it is now hosted in a permanent location in the
`arduino/tooling-project-assets` repository.

The following changes have been made to the source configuration:

- Move documentation comments to a dedicated file in the upstream repository
- Make additional non-functional changes to the configuration format to facilitate maintenance
- Update to use the configuration API of ClangFormat 14.0.0

This last item did result in some functional changes to the configuration which will result in minor differences in the
formatter output.

These are actually reversions of unwanted differences from the Arduino IDE 1.x formatter output, which were unavoidable
when using the 11.0.1 version of ClangFormat in use at the time of the configuration's creation. These changes will
provide greater consistency during the migration from Arduino IDE 1.x to 2.x. The default output of the Arduino IDE
1.x formatter will continue to be considered the "gold standard" until Arduino IDE 2.x graduates from "pre-release"
status.

The Arduino IDE 2.x formatter configuration is fully customizable according to the preferences of each user. Those
already using custom configurations will not be affected in any way (though they are encouraged to sync their
configuration files from the source to bring them into compliance with the configuration API of the ClangFormat version
currently in use by Arduino IDE 2.x).

See the documentation and commit history for the source file for details on the configuration changes:

https://github.com/arduino/tooling-project-assets/tree/main/other/clang-format-configuration
2022-08-08 12:48:41 -07:00
per1234
676eb2f588 Escape special characters in formatter configuration for Windows
The sketch code formatter configuration is passed to the ClangFormat tool as a string representing a JSON object via a
command line argument.

Previously, the contents of this string were not given any special treatment to ensure compatibility with the command
interpreter used on Windows machines. That did not result in problems only because the configuration didn't contain
problematic combinations of characters. This good fortune will not persist through updates to the configuration, so the
command must be properly processed.

The Windows command interpreter does not use the POSIX style backslash escaping. For this reason, escaped quotes in the
argument are recognized as normal quotes, meaning that the string alternates between quoted and unquoted states at
random. When a character with special significance to the Windows command interpreter happens to occur outside a quoted
section, an error results.

The solution is to use the Windows command interpreter's caret escaping on these characters. Since such an escaping
system is not recognized by POSIX shells, this is only done when the application is running on a Windows machine.

References:

- https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo#remarks
- https://en.wikipedia.org/wiki/Escape_character#Windows_Command_Prompt
2022-08-08 12:48:41 -07:00
per1234
ce273adf77 Correctly escape escaped content in formatter configuration
The sketch code formatter configuration is passed to the ClangFormat tool as a string representing a JSON object via a
command line argument.

The quotes in the JSON syntax are escaped in order to make them compatible with this usage. Previously, consideration
was not given to escaping of the content. For example, with the previous escaping code, this content: `\"` would be
converted to `\\"`, whereas the correct escaping would look like `\\\"`.

That did not result in problems only because the configuration didn't contain escaped content. This good fortune will
not persist through updates to the configuration so the command must be properly processed.

The content of the configuration will now be escaped in addition to the quotes of the JSON data format.
2022-08-08 12:48:41 -07:00
Akos Kitta
0b33b51700 Set XDG_CONFIG_HOME env on Linux when not set.
Otherwise, `node-log-rotate` creates a folder with `undefined` name.

Closes #394.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-04 16:29:27 +02:00
Akos Kitta
36ac47b975 Can check if the current window is the first one.
Closes #1070

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-04 11:11:46 +02:00
Akos Kitta
bf193b1cac
Pinned 2dd8976 CLI in the IDE2. (#1280)
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-04 09:28:28 +02:00
InstantMuffin
879aedeaa3
Update BUILDING.md (#1281)
* Update BUILDING.md

Added "Notes for Linux contributors" based on my own building experience

* Update BUILDING.md

Removing the linux specific section and instead updating the Theia IDE prerequisites link to point to the mentioned file directly.
2022-08-03 16:43:01 +02:00
Akos Kitta
d556ee95c0 Use FQBN instead of Board for the monitor ID.
Closes #1278

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-03 15:16:39 +02:00
Alberto Iannaccone
d93c9ba654
2.0.0-rc9.1 (#1272) 2.0.0-rc9.1 2022-08-02 15:29:15 +02:00
Francesco Spissu
8a0dc1be7e
Custom colors clean up (#1252) 2022-08-02 15:24:54 +02:00
Alberto Iannaccone
564862e173
Prevent board selector item labels to overflow (#1216)
* prevent board selector item labels to overflow

* make board selector show ellipsis when the board name is too long
2022-08-02 11:11:38 +02:00
Francesco Spissu
d7f7010bb5
High Contrast theme update (#1265) 2022-08-01 15:24:52 +02:00
Akos Kitta
e156dcc213 Show 'progress' indicator during verify/upload.
Closes #575
Closes #1175

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-01 15:07:14 +02:00
Akos Kitta
27a2a6ca03 #1191: resolve temp path if copying/cloning sketch
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-01 10:11:14 +02:00
Akos Kitta
581379f86f #1191: fixed default sketchbook URI for _save as_
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-01 10:11:14 +02:00
Akos Kitta
b62f3dec84 #714: UX improvements of the Arduino LS in IDE2
- Debounced the connectivity status update.
 - Silent the output channel for the Arduino LS.
 - Delay the problem markers update with 500ms.
 - Do not update the status bar on every `keypress` event.
 - Debounced the tab-bar toolbar updates when typing in editor.
 - Fixed electron menu contribution binding.
 - Aligned the editor widget factory's API to Theia.
 - Set the zoom level when the app is ready (Closes #1244)
 - Fixed event listener leak (Closes #1062)

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-01 10:11:14 +02:00
Akos Kitta
90d2950bdd Use 0.25.1 CLI.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-01 09:12:43 +02:00
github-actions[bot]
5b7d64c1c1
Updated translation files (#1269)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-01 08:22:58 +02:00
Dave Simpson
55927ac3dd
remove state from stepper input and simplify (#1264)
* remove state from stepper input and simplify

* get rid of lodash
2022-07-29 17:44:58 +02:00
github-actions[bot]
40c93bc19a
Updated translation files (#1249)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-29 17:36:25 +02:00
Alberto Iannaccone
59b8a2d6bb
Register custom themes after the monaco theme init (#1257)
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>

Co-authored-by: Akos Kitta <a.kitta@arduino.cc>
2022-07-29 15:09:53 +02:00
Alberto Iannaccone
124738d810
wait for language packs to be deployed (#1261) 2022-07-29 15:08:07 +02:00