adsys icon indicating copy to clipboard operation
adsys copied to clipboard

Refactor watchdtui using the new bubbles `Validate` API

Open GabrielNagy opened this issue 3 years ago • 1 comments

Describe the problem you'd like to have solved

The new bubbles release comes with a Validate API which we can use to validate our TUI inputs (directories and config file). Currently, validation is done via arbitrary functions that directly operate on the textinput.Model objects, e.g. https://github.com/ubuntu/adsys/blob/e298b39f930f3a62b6172a63462350fcbd5f0ef6/internal/watchdtui/watchdtui.go#L397-L435

Describe the ideal solution

Input validation is done via the newly added API.

GabrielNagy avatar Jul 05 '22 07:07 GabrielNagy

I have a branch up for this refactor -- based on top of https://github.com/charmbracelet/bubbles/pull/185

GabrielNagy avatar Jul 11 '22 08:07 GabrielNagy

Fixed with https://github.com/ubuntu/adsys/commit/1f819dcab406c936a3a22737798acab4d1dde73a

jibel avatar Nov 30 '23 12:11 jibel