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
[Attributes] Add FloatAttributeType Feature #10690
[Attributes] Add FloatAttributeType Feature #10690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, however, we would need some tests for it, you can base them on our existing Behat scenarios:
features/product/managing_product_attributes/adding_integer_product_attribute.feature
features/product/managing_products/adding_product_with_integer_attribute.feature
Those are for integer
attribute type, should be easy to create similar for float
ones.
@pamil thank you 🙂. I will make the tests and will come back to you. |
@panigrc thank you for the scenarios, but it would be great to also have implementation for them :) 🖖 ☮️ |
@Zales0123 thank you for pointing that out, I saw that the Behat tests were failing. I could use a little help to understand how to implement the scenarios. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
Hey @panigrc, do you still want to finish this? I can help with the tests. |
Hi @vvasiloi, sorry for not answering sooner your message, I forgot about this PR. |
@panigrc no problem, maybe someone else will finish it. |
Hi @panigrc! |
@TheMilek I'm grateful ! It's a long time ago since I pushed this PR. |
features/product/managing_product_attributes/adding_float_product_attribute.feature
Outdated
Show resolved
Hide resolved
features/product/managing_products/adding_product_with_float_attribute.feature
Outdated
Show resolved
Hide resolved
features/product/managing_products/adding_product_with_float_attribute.feature
Outdated
Show resolved
Hide resolved
features/product/managing_products/adding_product_with_float_attribute.feature
Outdated
Show resolved
Hide resolved
features/product/managing_products/adding_product_with_float_attribute.feature
Outdated
Show resolved
Hide resolved
features/product/managing_products/adding_product_with_float_attribute.feature
Outdated
Show resolved
Hide resolved
Thanks, Nik! 🥇 |
…ext (TheMilek) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 <!-- see the comment below --> | | Bug fix? | yes | | Related tickets | Related to #10690 | License | MIT | <!-- - Bug fixes must be submitted against the 1.12 branch - Features and deprecations must be submitted against the 1.13 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> By default the input type in NumberType is set to text, to change that to number We need to set html5 option to true, [ref](https://symfony.com/doc/current/reference/forms/types/number.html#html5) Commits ------- c80d39a [Attributes] Change FloatType input to number instead of text
This feature adds a float attribute type. As future development it would be nice the scale option of NumberType to be configurable.