Closed joshuafcole closed 4 months ago
Name | Link |
---|---|
Latest commit | 691729f9fe385565a97477995b9d4a45549cf0f1 |
Latest deploy log | https://app.netlify.com/sites/kobalte/deploys/660e0d29c89a96000855db1a |
Deploy Preview | https://deploy-preview-379--kobalte.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Sorry, just noticed the lint issues. Hopefully all addressed, though I couldn't figure out how to run the reporter locally to test (pnpx biome ci didn't report the found issues)
You can run pnpm lint && pnpm format
to format code. Then pnpm test
to build and test.
If test works locally but not on here, it's flaky and needs to rerun on github.
Edit: Looks good! I need to finish another task then I'll have a look at merging this!
Thanks for the clarification! Not sure how I missed it first time around.
EDIT: Just noticed the failing tests -- I'm really not sure what happened there. It looks like all the NumberField related tests passed: https://github.com/kobaltedev/kobalte/actions/runs/8548307913/job/23525538904?pr=379#step:7:120
but several for TextField failed: https://github.com/kobaltedev/kobalte/actions/runs/8548307913/job/23525538904?pr=379#step:7:148
Is there anything you can think of here that might have led to that?
Following up to see if there's anything else I can do to help get this across the line.
Looks like after a re-run everything's green. Any remaining work for me here?
Hey all good! Almost done with #381 then I'll be able to merge.
Thanks for the PR! I'll try to replace allowedInput
and only use this.
Awesome news, and congrats on the refactor! If there's anything I can help with feel free to @ ping, Kobalte's been a huge help to me! :)
The new
NumberField
component is awesome, but while using it withstyle: unit
format options specified, I realized it's behavior diverges pretty significantly from the lovely behavior in in the react spectrum component it's based on. This PR brings it closer into line, though it's still not quite perfect.To see the issue:
Expected behavior: The NumberField should normalize the user's input into a valid format Actual behavior: The displayed value is polluted until submission, at which point it'll do it's best to parse what's there and renormalize.
This PR confirms that the user's changes are still parsable before committing them, without getting in the way of deleting the contents of the field entirely. It generally makes the unit behave like ineditable text.
Note that this may be able to completely replace the
allowedInput
regex prop (and related machinery) which doesn't have an analog in the react-spectrum NumberField, but I didn't want to make that assumption without checking in first.