Button `purpose` property
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
Invent buttons have a `purpose` property which currently accepts the following options:
* Default (i.e. no special style – this should probably be renamed to "normal" or something to avoid confusion with the concept of a "default button")
* Primary
* Secondary
* Success
* Warning
* Danger
This is based on the [list from PaperCSS](https://www.getpapercss.com/docs/components/buttons/), but Invent also intends to support other style frameworks, so the list is open to change.
Some of Toga's existing platforms support a similar concept, e.g. Apple calls it a ["role"](https://developer.apple.com/design/human-interface-guidelines/buttons#Role).
The name of this property is TBD – "class" might be a more generic name, but it's a reserved word in Python.
Contributor guide
Research direction
Start by reviewing the existing Invent button API and the PaperCSS and Apple button references linked in the issue. Clarify the property name and supported purpose values with the maintainers; done means the API decision and resulting scope are agreed and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100