Skip to content

Add documentation for adding a widget icon#41

Open
rutger-seascape wants to merge 5 commits intobluerobotics:latestfrom
rutger-seascape:feature/auto-iframe-docs
Open

Add documentation for adding a widget icon#41
rutger-seascape wants to merge 5 commits intobluerobotics:latestfrom
rutger-seascape:feature/auto-iframe-docs

Conversation

@rutger-seascape
Copy link
Copy Markdown
Contributor

@rutger-seascape rutger-seascape commented Apr 29, 2026

🔎 PREVIEW 🔍

Documents:

@rafaellehmkuhl rafaellehmkuhl self-requested a review April 29, 2026 18:06
Copy link
Copy Markdown
Member

@rafaellehmkuhl rafaellehmkuhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Rutger! Thanks a lot for this contribution!

And this API was actually broken recently (during the 1.18 beta phase), as we still didn't had anyone using it (only two internal extensions that were still in beta as well).

The standard changed from snake_case to camelCase, so the new fields are called iframeUrl and iframeIcon. You can find the whole schema in this file of the Cockpit repository.

You can find the discussion about those changes as well as the new features that were added here.

@rutger-seascape
Copy link
Copy Markdown
Contributor Author

Hey @rafaellehmkuhl ,

Thanks for your answer :). Check, very cool pull request you added, did not know this was in the works. This gives some possibilities for my own extension. Should I also add documentation for the joystick mapping suggestions?

@ES-Alexander
Copy link
Copy Markdown
Collaborator

Should I also add documentation for the joystick mapping suggestions?

If you'd like to cover the surrounding feature set, you can document some or all of the undocumented aspects of the external integrations topic :-)

@rafaellehmkuhl
Copy link
Copy Markdown
Member

Hey @rafaellehmkuhl ,

Thanks for your answer :). Check, very cool pull request you added, did not know this was in the works. This gives some possibilities for my own extension. Should I also add documentation for the joystick mapping suggestions?

Feel free to choose how to proceed. If you want to just finish this one with the instructions for the icon and url, which is the basic support, that's fine. If you want to document the whole API, even better!

@rutger-seascape
Copy link
Copy Markdown
Contributor Author

Thanks for your replies. I will look into covering the whole cockpit_extras.json file.

@rutger-seascape rutger-seascape force-pushed the feature/auto-iframe-docs branch from e0dbbd4 to 4624200 Compare May 5, 2026 13:42
@rutger-seascape
Copy link
Copy Markdown
Contributor Author

Hey @rafaellehmkuhl ,

Could you have a look at my recent changes? I have documented the new cockpit_extras API according to the schema you sent me and I used some other pieces of text/information I found in different Blue Robotics repositories. I think it would be nice to have some screenshots of the joystick mapping suggestions, do you have any at hand by chance?

@rafaellehmkuhl
Copy link
Copy Markdown
Member

Hey @rafaellehmkuhl ,

Could you have a look at my recent changes? I have documented the new cockpit_extras API according to the schema you sent me and I used some other pieces of text/information I found in different Blue Robotics repositories. I think it would be nice to have some screenshots of the joystick mapping suggestions, do you have any at hand by chance?

Super cool @rutger-seascape! That's a really nice start! I took a look and I will try to wrote down the suggestions till friday. Sorry. for the delay. I usually try to do it in the same day but we are kind of in a rush right now with the stable release. And @ES-Alexander is the responsible for the docs, so I'm sure he will have some suggestions as well!

@rafaellehmkuhl
Copy link
Copy Markdown
Member

And here are the images you requested:

SCR-20260506-mhfx . SCR-20260506-mhbz

@rafaellehmkuhl
Copy link
Copy Markdown
Member

@rutger-seascape I got some spare time and was starting my review but unfortunately there is (again) a Github incident happening right now and I'm not being able to push the comments in the review. Will try again in the next hours.

Copy link
Copy Markdown
Collaborator

@ES-Alexander ES-Alexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this is a great start - thanks!

I've given some comments on the high level structure and some missing contextualisation.

Given the "no relevant docs" state this is based over, the threshold for this getting approved is basically just "fit the style/intent of the docs, and don't mislead users", so I'm not planning to ask for exhaustive coverage of everything involved (though by the looks of things you've already largely achieved full coverage anyway!) :-)


The Cockpit-focused endpoint should including a name, version, iframe URL, and an optional URL for
configuration of each widget:
#### Configuring cockpit_extras.json
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading is several levels too high to be in this location, but I actually think the problem is the location. There are several examples here that go beyond what normal users would need to know or care about, so I suggest moving this whole section to its own file (e.g. /content/development/external-integrations/index.md, with the images in the same folder), which can then link back to relevant points in this file from each subsection.

This location can then be used to link out to that file, for developers who want to explore the detailed breakdown/examples, without it affecting the standard users.

Comment on lines +647 to +648
You can make your BlueOS Extension interact with different elements within the Blue Robotics software suite by configuring
the `cockpit_extras.json` file. Keys are typed in `lowerCamelCase`. We recommend to type id values in `kebab-case`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP servers do not need to be from BlueOS Extensions - they could also be served by the computer running Cockpit, for example, or accessed via the internet (for operating conditions where that is viable).

If this gets introduced specifically as an example of making a BlueOS Extension integrate with Cockpit then that's potentially ok, but if it's intended just as a description of the functionality then it will need to be more general about the possible options.

```

##### Minimal configuration
A minimal `cockpit_extras.json` file can be seen below. This file does not add any extra functionality yet.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems worthwhile describing the key functionalities (e.g. custom iframe widget integrations, custom Actions, and custom joystick button mapping suggestions) before providing an example like this, but that can potentially be at the top of the page.

##### Widget configuration
You can add widgets to Cockpit based on your BlueOS Extension by adding a widget configuration.

| Attribute | Type | Required | Note |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the table has no notes, it shouldn't include a column for them.

Comment on lines +684 to +685
| `iconUrl` | `string` | no[^1] | |
| `iframeIcon` | `string` | no[^1] | |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `iconUrl` | `string` | no[^1] | |
| `iframeIcon` | `string` | no[^1] | |
| `iconUrl` | `string` | one of | |
| `iframeIcon` | `string` | one of | |

Undecided if this is cleaner than the footnote approach. If you'd prefer to maintain the footnote then the word should still be changed (e.g. to "maybe" or "partial" or similar).

Each joystick profile tracks its own set of applied and ignored suggestions independently.

###### Joystick Mapping Suggestion Group
[Joystick Mapping Suggestions](#joystick-mapping-suggestion) must be contained in a Joystick Mapping Suggestion Group. This allows you to suggest multiple mappings based on what hardware is mounted for example.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Joystick Mapping Suggestions](#joystick-mapping-suggestion) must be contained in a Joystick Mapping Suggestion Group. This allows you to suggest multiple mappings based on what hardware is mounted for example.
[Joystick Mapping Suggestions](#joystick-mapping-suggestion) must be contained in a Joystick Mapping Suggestion Group. This allows you to suggest multiple mappings based on what hardware is connected, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants