Error handling for FeathersNumberUnit
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Currently FeathersNumberInput silently ignores most errors, even if the user types nonsense. The reason is because there's no mechanism for reporting an error to the end user.
Note that most of the underlying subsystems (like number parsing and unit conversions) already return a `Result`, it's just that the error case is silently suppressed.
## What solution would you like?
The standard practice for web form inputs is to display a validation error message in a small text font just below the widget. This has the effect of pushing subsequent widgets down, altering the layout, which can be an issue if the layout is fixed.
## What alternative(s) have you considered?
* Logging to the console won't be visible to many end users.
* A modal dialog is too disruptive.
* Toasts are also disruptive and not appropriate for this use case
Contributor guide
Research direction
Locate FeathersNumberInput and FeathersNumberUnit, then trace the existing number-parsing and unit-conversion Result paths mentioned in the issue. Review the surrounding widget validation behavior before choosing how errors should be presented without an overly disruptive layout change. Done means invalid input no longer silently fails and the user receives a visible validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100