Skip to content
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

fix: allow placing labelable elements inside of labels #5085

Merged
merged 3 commits into from
Apr 4, 2025
Merged

Conversation

TrySound
Copy link
Member

@TrySound TrySound commented Apr 3, 2025

Fixes the issue reported in discord (https://discord.com/channels/955905230107738152/1356788803624501370/1357299346558816306)

Found the spec actually allows to place button and input inside a label. So now we can generalize this logic.

Also content model validation no longer prevents inserting invalid structure and only warns user is something went wrong. This will let us to never block the user with false positives and maybe even figure out the issue on their own.

Screenshot 2025-04-04 at 01 28 53

Fixes the issue reported in discord

Found the spec actually allows to place button and input inside a label.
So now we can generalize this logic.

Also content model validation no longer prevents inserting invalid
structure and only warns user is something went wrong.
@TrySound TrySound requested review from kof and johnsicili April 3, 2025 18:33
Copy link
Member

@kof kof left a comment

Choose a reason for hiding this comment

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

didn't test

@TrySound TrySound merged commit bb80555 into main Apr 4, 2025
17 checks passed
@TrySound TrySound deleted the labelable branch April 4, 2025 07:32
TrySound added a commit that referenced this pull request Apr 4, 2025
Fixes the issue reported in discord
(https://discord.com/channels/955905230107738152/1356788803624501370/1357299346558816306)

Found the spec actually allows to place button and input inside a label.
So now we can generalize this logic.

Also content model validation no longer prevents inserting invalid
structure and only warns user is something went wrong. This will let us
to never block the user with false positives and maybe even figure out
the issue on their own.

<img width="993" alt="Screenshot 2025-04-04 at 01 28 53"
src="https://github.com/user-attachments/assets/46eb041f-2431-4140-b34e-8bc9ad757c47"
/>
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