bluerobotics / bluerobotics/cockpit

Joystick: improve custom (SVG) support

Open
#618 1 comment 0 reactions 0 assignees View on GitHub
joystick new-feature ux
Dominant language
TypeScript
Stars
198
Forks
63
Avg merge
2d 7h
Merged PRs (30d)
57

Description

It's currently possible to import and export joystick mappings, whereby the virtual joystick button numbers are mapped to element IDs in an SVG file so that it can be used effectively in our configuration interface.

- [ ] We should provide detailed documentation of how to create such an SVG and mapping, but
- #758 is a good example
- [ ] it would also be helpful to support importing and exporting the SVG files themselves (not just the mappings)
- so that people could locally test their custom joystick configurations without needing to build a custom Cockpit version
- [ ] Beyond that, it would also be helpful if we provide a tool for convenient creation of those SVGs,
- this could be either
- a standalone hosted web-app that gets embedded into Cockpit via an iframe (when there's internet access), or
- built into Cockpit itself (trading bloat for extra offline convenience)
- this should allow the user to
1. put in an SVG of just their controller
2. select line elements that define a button
3. add a multi-segment label line with corresponding label text
4. add a fillable shape (for when pressed)
- ideally we could also support inputting a raster image of a controller, and automatically doing line/edge detection and vectorisation of the result
- Potentially easier now by asking an LLM, as mentioned [here](https://github.com/bluerobotics/cockpit/issues/1927#issuecomment-2950053074)

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by reviewing the existing joystick mapping import/export behavior and the example in #758; the issue spans documentation, SVG import/export, and a creation tool, so completion depends on selecting and defining one scope first.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.