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: Relative input-widths use container's size #5016

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

GZolla
Copy link
Contributor

@GZolla GZolla commented Sep 27, 2024

Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5016/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@GZolla GZolla marked this pull request as ready for review September 27, 2024 03:44
@GZolla GZolla requested a review from a team as a code owner September 27, 2024 03:44
components/inputs/input-number.js Show resolved Hide resolved
@@ -178,6 +179,7 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
* @ignore
*/
valueTrailingZeroes: { type: String, attribute: 'value-trailing-zeroes' },
_afterSlotWidth: { type: Number },
Copy link
Member

Choose a reason for hiding this comment

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

Consumers don't need to set this but we do want changes to it to trigger a render, so it's a good use case for a reactive state property. The others here (_hintType, _formattedValue) should be the same but this code was written before state properties were a thing.

Suggested change
_afterSlotWidth: { type: Number },
_afterSlotWidth: { state: true },

components/inputs/input-number.js Show resolved Hide resolved
components/inputs/test/input-number.vdiff.js Show resolved Hide resolved
@GZolla GZolla merged commit 136b109 into main Sep 27, 2024
6 checks passed
@GZolla GZolla deleted the gzolla/percentage-input-width branch September 27, 2024 18:13
Copy link

🎉 This PR is included in version 3.45.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants