Repository navigation
refactor(useFormTrigger): move void controller to constructor - #15108
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns useFormTrigger with the pattern established in #15075 for void-returning controllers by invoking it in component constructors instead of assigning its (void) result to a class field, reducing misleading boilerplate and improving clarity across components and tests.
Changes:
- Moved
useFormTrigger()(this)invocation from a class field initializer into the constructor in affected components. - Updated
useFormTriggerusage with options (conditional disabling) to be invoked in the constructor as well. - Adjusted the browser spec test components to match the same constructor-invocation pattern.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/components/src/controllers/useFormTrigger.browser.spec.tsx | Updates test components to invoke useFormTrigger in constructors instead of assigning to a field. |
| packages/components/src/components/button/button.tsx | Moves useFormTrigger invocation into Button’s constructor (alongside existing controller setup). |
| packages/components/src/components/action/action.tsx | Adds a constructor to invoke useFormTrigger rather than storing a misleading formTrigger field. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jcfranco
force-pushed
the
jcfranco/move-useFormTrigger-to-constructor
branch
from
September 1, 2026 00:27
9086997 to
55f5960
Compare
jcfranco
requested review from
benelan,
geospatialem and
isaacbraun
as code owners
September 1, 2026 00:27
jcfranco
changed the base branch from
jcfranco/14766-speed-up-global-attribute-watching
to
dev
September 1, 2026 00:27
benelan
added a commit
that referenced
this pull request
Sep 1, 2026
* origin/dev: (47 commits) refactor(useFormTrigger): move void controller to constructor (#15108) refactor(slider): use refs instead of DOM queries (#15096) test(slider): migrate tests to browser mode (#15095) refactor: enable `noImplicitAny` (#15027) chore: release next feat(block): add background color token (#15099) fix(tile): restore top/bottom slot spacing (#15101) build(deps): update dependency eslint to v10.9.1 (#15036) build(deps): update dependency eslint-plugin-storybook to v10.5.10 (#14807) build(deps): update dependency @eslint-react/eslint-plugin to v5.18.6 (#14722) build(deps): update dependency eslint-plugin-perfectionist to v5.10.1 (#14801) build(deps): update dependency @eslint-react/kit to v5.18.6 (#14723) refactor: apply `transition-default` mixin (#8851) chore: release next feat(block): deprecate `collapsible` in favor of `expandable` (#15091) chore: release next style(radio-button-group): apply linter fixes (#15085) fix(radio-button-group): sync group `disabled` only when set (#15084) refactor: derive a shared commonTests helper for scale propagation (#15073) chore: release next ...
Contributor
|
Excellent call! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
monday.com sync: #12948982957
Related Issue: N/A
Summary
This PR updates
useFormTrigger, which was missed in #15075, to be invoked in the constructor instead, avoiding unnecessary boilerplate and potential confusion.