You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fluent/InspectorV2] Fix bugs in number/text input; Add input validation UX; Refactor colorPicker to use new components (#16998)
- Separate out the input.tsx component into spinButton.tsx and
textInput.tsx since spinButton is more appropriate for handling
numerical values
- Introduce forceInt param to NumerInputPropertyLine
- Both spinButton and textInput now have input validation UX as the user
types - if the input is valid, it will automatically propagate to
parent. If not, it will display as red background and won't notify
parent of change
<img width="378" height="330" alt="image"
src="https://github.com/user-attachments/assets/7d3c42e1-65c7-45ec-8534-d2cda00ef82e"
/>
- ColorPicker.tsx refactored to use the new textInput/spinButtons
directly,
- InfoLabel now an optional param to PrimitiveProps so that primitives
can optionally display an infoLabel (with or without the info popup)
directly on the primitive value (distinct from the propertyline's label)
-- colorpicker usage is refactored accordingly
- Add units to spinbutton with inputvalidation as well
- minor styling
<img width="411" height="128" alt="image"
src="https://github.com/user-attachments/assets/ad7072ba-054c-4c5d-9b2b-77f3612631dd"
/>
<img width="508" height="174" alt="image"
src="https://github.com/user-attachments/assets/7421bab0-442f-40fd-b213-8bdad68ed9da"
/>
<img width="408" height="489" alt="image"
src="https://github.com/user-attachments/assets/ceb08ef3-6f0d-4417-9b52-48a15e53a950"
/>
---------
Co-authored-by: Georgina <[email protected]>
* To force integer values, use forceInt param (this is distinct from the 'step' param, which will still allow submitting an integer value. forceInt will not)
0 commit comments