Skip to content

Clarify Modifier doc for name and default value#397

Open
daanzu wants to merge 1 commit into
masterfrom
pr/modifier-doc-fix
Open

Clarify Modifier doc for name and default value#397
daanzu wants to merge 1 commit into
masterfrom
pr/modifier-doc-fix

Conversation

@daanzu

@daanzu daanzu commented Sep 2, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@daanzu daanzu requested a review from drmfinlay September 2, 2025 13:20

@drmfinlay drmfinlay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I hadn't noticed this.

Thinking about it, Modifier should probably have always had an optional name parameter like the rest of the element classes.

@daanzu

daanzu commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator Author

I guess it could be handy sometimes to set a name, but it's awfully convenient to let it just take over its child's name.

@drmfinlay

Copy link
Copy Markdown
Member

Yes, the handy default behaviour should stay. Ditto for the value of Modifier elements. I guess a different name would only make sense if the child element/extra is used more than once.

@daanzu

daanzu commented Sep 4, 2025

Copy link
Copy Markdown
Collaborator Author

Upon reflection, adding a name parameter would also be good for avoiding resulting in an error if someone passes name out of habit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants