Skip to content

Custom board option menus not following the order sent by the cli #2036

Open
@alessio-perugini

Description

@alessio-perugini

Describe the problem

While fixing the #2018 we noticed that the IDE under the tools menu renders the custom board option menus in a different order.
The response of the BoardDetails RPC call is correctly saved in the local storage, and it matches the order sent by the cli.
When rendering those items it seems that another kind of sorting is happening. Probably:

image

To reproduce

  1. Use the latest version of the IDE.
  2. For example install the esp8266 board: https://arduino.esp8266.com/stable/package_esp8266com_index.json
  3. Select the Generic ESP8266 Module (Tools > Board > esp8266)

To quickly compare how the order should be:
arduino-cli board details -b esp8266:esp8266:generic --format json | jq '[.config_options | .[] | .option_label]'

Expected behavior

If the cli returns the following:

[
  "CPU Frequency",
  "VTables",
  "Upload Speed"
]

The first option in the menu should be:

  1. CPU Frequency
  2. VTables
  3. Upload Speed

image

Arduino IDE version

2.1.0

Operating system

Linux

Operating system version

ubuntu 22.04

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions