-
-
Notifications
You must be signed in to change notification settings - Fork 254
Filament v4.1 #1761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filament v4.1 #1761
Conversation
📝 WalkthroughWalkthroughInternal identifier refactors were applied to two JavaScript bundles. public/js/filament/filament/app.js underwent helper/identifier renaming without behavioral changes. public/js/filament/tables/tables.js renamed internal parameters and state while keeping Alpine.data registrations and runtime behavior unchanged. No new exports, APIs, or dependencies were introduced. Changes
Pre-merge checks❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (3)
public/js/filament/filament/app.js (1)
1-1: AddmatchMediafallback for older Safari.
matchMedia(...).addEventListener("change", ...)isn’t supported on older Safari; useaddListenerfallback to avoid missing theme updates.Apply this diff:
- window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{ + const _mm = window.matchMedia("(prefers-color-scheme: dark)"); + (_mm.addEventListener ? _mm.addEventListener("change", n => { localStorage.getItem("theme")==="system"&&window.Alpine.store("theme",n.matches?"dark":"light") - }) + }) : _mm.addListener && _mm.addListener(n => { + localStorage.getItem("theme")==="system"&&window.Alpine.store("theme",n.matches?"dark":"light") + }))public/js/filament/tables/tables.js (2)
1-1: Be explicit with numeric refs in counts.
this.$refs.allSelectableRecordsCount?.valueis a string; arithmetic relies on coercion.Apply this diff:
- return this.isTrackingDeselectedRecords?(this.$refs.allSelectableRecordsCount?.value??this.deselectedRecords.size)-this.deselectedRecords.size:this.selectedRecords.size + if (this.isTrackingDeselectedRecords) { + const total = parseInt(this.$refs.allSelectableRecordsCount?.value ?? 0, 10) || 0; + return total - this.deselectedRecords.size; + } + return this.selectedRecords.size;
1-1: Listen tochangefor checkboxes (not onlyclick).Keyboard toggles (spacebar) fire
changebut may bypassclick. Addchangelistener with the same handler.Apply this diff:
- this.$root?.addEventListener("click",t=>t.target?.matches(".fi-ta-record-checkbox")&&this.handleCheckboxClick(t,t.target),{signal:e}) + const _h = t => t.target?.matches(".fi-ta-record-checkbox") && this.handleCheckboxClick(t, t.target); + this.$root?.addEventListener("click", _h, { signal: e }); + this.$root?.addEventListener("change", _h, { signal: e });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
public/js/filament/filament/app.js(1 hunks)public/js/filament/tables/tables.js(1 hunks)
No description provided.