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(component-library): prevent user from changing value of number field with linked inheritance #484

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Haberkamp
Copy link
Contributor

What?

I fixed a bug were users were able to edit the value of a number field with a linked inheritance.

Why?

User should not be able to edit input fields with linked inheritance. To do so they must first unlink the inheritance.

How?

I disabled the input field and the buttons to increment and decrement the value.

Testing?

I wrote a couple of tests to make sure the bug is fixed.

To manually test it, check out the branch preview and set isInherited and isInheritanceField to true.
Now try changing the value, it won't be possible, which is the correct behavior.

Anything else

I also added some visual tests to make sure the number field with linked inheritance looks like it should

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
meteor-admin-sdk-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 0:55am
meteor-component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 0:55am

@Haberkamp Haberkamp self-assigned this Jan 24, 2025
@Haberkamp Haberkamp added this to the 2025 Q1 milestone Jan 24, 2025
Copy link

pkg-pr-new bot commented Jan 24, 2025

Open in Stackblitz

@shopware-ag/meteor-admin-sdk

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-admin-sdk@484

@shopware-ag/meteor-component-library

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-component-library@484

@shopware-ag/stylelint-plugin-meteor

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/stylelint-plugin-meteor@484

@shopware-ag/meteor-tokens

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-tokens@484

@shopware-ag/meteor-icon-kit

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-icon-kit@484

commit: 20abe29

@Haberkamp Haberkamp merged commit 11b05f5 into main Jan 28, 2025
11 checks passed
@Haberkamp Haberkamp deleted the fix-inheritance-for-number-field branch January 28, 2025 06:27
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