Commit e8c5ee2
authored
Fix open issues: dehydration, reactivity, CSS, and tests (#143)
## Summary
This PR builds on #142 and tackles the highest-impact open GitHub issues
with PHP fixes, JS reactivity improvements, CSS cleanup, dependency
narrowing, and expanded tests.
### Issues addressed
- **#128 / #119** — Multiple/range pickers now dehydrate array state
correctly and validate per-date instead of choking on comma-separated
strings
- **#131** — Cleared picker values sync `null` back to Livewire via
`onChange`/`onClose` handlers
- **#133** — `$set()` / entangled state updates now re-sync the
Flatpickr instance via Alpine `$watch`
- **#103** — Added configurable `rangeSeparator()` (defaults to ` to `)
for locale-specific range parsing
- **#100** — Time picker defaults to `H:i` format and dehydrates to time
strings
- **#141** — `locale()` accepts arrays (e.g. `firstDayOfWeek`) passed
through to Flatpickr JS
- **#122** — Date validation moved from dehydration into component
`setUp()` so rules run before dehydration
- **#130 / #125** — Removed Filament `@source` scanning from
`flatpickr.css`; bundle shrank ~627KB → ~16KB and no longer hides the
sidebar logo or bleeds table styles
- **#126** — Production dependency narrowed to `filament/forms` +
`filament/support` (`filament/filament` kept in dev for tests/builds)
### Still open / follow-up
- **#96** — Dynamic `minDate`/`maxDate` from PHP closures still need a
Livewire-friendly attrs refresh strategy (`wire:ignore` on the picker
root limits re-rendering)
- **#129** — Modal lazy-load edge cases may need further Livewire
lifecycle hooks
- **#104** — Manual time entry fix included via `onClose`; needs browser
QA
- **#53** — Year picker remains a feature request
- **#124** — Filament v3 compatibility (project targets v4/v5)
## Test plan
- [x] `vendor/bin/pint --test`
- [x] `vendor/bin/phpstan analyse`
- [x] `vendor/bin/pest --ci` (17 tests)
- [x] `npm run build`
- [ ] CI matrix passes
- [ ] Manual QA: range/multiple edit forms, `$set()` reactivity,
clear-then-save, Spanish range separator, time picker manual entry17 files changed
Lines changed: 445 additions & 103 deletions
File tree
- .github/workflows
- config
- resources
- css
- dist
- components
- themes
- js/components
- views/forms/components
- src
- Forms/Components
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | | - | |
| 6 | + | |
5 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 3 | | |
9 | 4 | | |
10 | 5 | | |
11 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments