Skip to content

Commit ede954c

Browse files
kartbenhenrikbrixandersen
authored andcommitted
doc: extensions: boards: add search tips admonition
As the search form is becoming richer, provide some guidance on how to filter the list of supported boards and what to do when no results are found. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 282a6c5 commit ede954c

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

boards/index.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@ Shields are hardware add-ons that can be stacked on top of a board to add extra
1313
functionality. They are listed separately from boards, towards :ref:`the end of
1414
this page <boards-shields>`.
1515

16-
Use the interactive search form below to quickly navigate through the list of
17-
supported boards.
16+
.. admonition:: Search Tips
17+
:class: dropdown
18+
19+
* Use the form below to filter the list of supported boards. If a field is left empty, it will
20+
not be used in the filtering process.
21+
22+
* A board must meet **all** criteria selected across different fields. For example, if you select
23+
both a vendor and an architecture, only boards that match both will be displayed. Within a
24+
single field, selecting multiple options (such as two architectures) will show boards matching
25+
**either** option.
26+
27+
* Can't find your exact board? Don't worry! If a similar board with the same or a closely related
28+
MCU exists, you can use it as a :ref:`starting point <create-your-board-directory>` for adding
29+
support for your own board.
1830

1931
.. toctree::
2032
:maxdepth: 2

doc/_extensions/zephyr/domain/static/js/board-catalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function fillSocSocSelect(families, series = undefined, selectOnFill = false) {
7676

7777
families = families?.length ? families : Object.keys(socs_data);
7878
series = series?.length ? series : families.flatMap(f => Object.keys(socs_data[f]));
79-
matchingSocs = families.flatMap(f => series.flatMap(s => socs_data[f][s] || []));
79+
matchingSocs = [...new Set(families.flatMap(f => series.flatMap(s => socs_data[f][s] || [])))];
8080

8181
socSocSelect.innerHTML = "";
8282
matchingSocs.sort().forEach((soc) => {

0 commit comments

Comments
 (0)