[Toolkit] Document Stimulus controller CSS classes and outlets in the API reference - #3733
Merged
Merged
Conversation
Kocal
reviewed
Jul 26, 2026
kbond
force-pushed
the
toolkit-stimulus-class-docs
branch
from
July 29, 2026 12:20
3562148 to
e56cef5
Compare
smnandre
reviewed
Jul 29, 2026
| public function __construct( | ||
| public readonly string $name, | ||
| public readonly string $attribute, | ||
| public readonly string $description, |
Member
Author
There was a problem hiding this comment.
If we do this, it should be in a follow-up PR that makes the change for all.
smnandre
reviewed
Jul 29, 2026
| public function isEmpty(): bool | ||
| { | ||
| return [] === $this->values && [] === $this->targets && [] === $this->actions; | ||
| return [] === $this->values && [] === $this->targets && [] === $this->classes && [] === $this->actions; |
Member
There was a problem hiding this comment.
Suggested change
| return [] === $this->values && [] === $this->targets && [] === $this->classes && [] === $this->actions; | |
| return [] === $this->actions && [] === $this->values && [] === $this->targets && [] === $this->classes; |
Nitpicking but according to my inner voice, this should relate more to the probabilities
smnandre
approved these changes
Jul 29, 2026
smnandre
left a comment
Member
There was a problem hiding this comment.
Genuine question: no outlets for now ?
Member
Author
|
… API reference Parse `static classes`/`static outlets` and `@css-class`/`@outlet` docblock tags alongside values/targets/actions, render them as Class and Outlet tables in the recipe API reference, and lint the tags against the declarations with `StimulusControllerDocChecker`.
Kocal
approved these changes
Jul 29, 2026
kbond
force-pushed
the
toolkit-stimulus-class-docs
branch
from
July 29, 2026 20:32
e56cef5 to
5b096f0
Compare
Member
Author
|
I just pushed support for |
Member
|
Thank you @kbond. |
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.
Documents a Stimulus controller's
static classesandstatic outletsin the recipe API reference from@css-classand@outletdocblock tags — rendered as Class and Outlet tables and linted both ways like@value/@target/@action. This rounds out the full controller surface: values, targets, classes, outlets and actions.The class tag is spelled
@css-classrather than@classto avoid clashing with JSDoc's@class.