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: slider input field has wrong width #1041 #1042

Closed
wants to merge 2 commits into from

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Feb 9, 2024

Done

QA

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Verify that bug in the linked issue has been fixed.

Fixes

Fixes: # .

@webteam-app
Copy link

Demo starting at https://react-components-1042.demos.haus

Comment on lines +72 to +75
&[disabled],
&[disabled="disabled"] {
@extend %vf-disabled-element;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need the same for the readonly attribute as well?

Suggested change
&[disabled],
&[disabled="disabled"] {
@extend %vf-disabled-element;
}
&[readonly],
&[readonly="readonly"] {
@extend %vf-readonly-element;
}
&[disabled],
&[disabled="disabled"] {
@extend %vf-disabled-element;
}

Workaround for: https: //github.com/canonical/react-components/issues/1041
*/

%vf-readonly-element {
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to copy so much from Vanilla here?
This is extremely risky and fragile, as these internals of Vanilla are likely to be changed and this copy will not reflect that.

And I'm not sure if I understand how these styles are related to completely separate Slider component being broken?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm fully aware it's very fragile, hence I clearly marked it as a workaround in the comment. This was meant to be a quick fix until we figure out a proper way of addressing this. I'll add more information to the linked issue.

@petermakowski
Copy link
Contributor Author

@bartaz Added a more detailed explanation in #1041 (comment)

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

Successfully merging this pull request may close these issues.

4 participants