<parameter name="category_id" xsi:type="block" visible="true" required="true" sort_order="50">
<label translate="true">Category</label>
<depends>
<parameter name="type" value="category" />
</depends>
<block class="Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser">
<data>
<item name="button" xsi:type="array">
<item name="open" xsi:type="string" translate="true">Select Category...</item>
</item>
</data>
</block>
</parameter>
<parameter name="reviews_to_display" xsi:type="block" visible="true" required="true" sort_order="60">
<label translate="true">Reviews to Display</label>
<depends>
<parameter name="type" value="category" />
</depends>
<block class="Vendor\Module\Block\Adminhtml\Widget\Parameter\Number" />
</parameter>
<?php
declare(strict_types=1);
namespace Vendor\Module\Block\Adminhtml\Widget\Parameter;
use Magento\Backend\Block\Template;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\Data\Form\Element\Factory as ElementFactory;
class Number extends Template
{
/**
* @var ElementFactory
*/
private $elementFactory;
/**
* @param Context $context
* @param ElementFactory $elementFactory
* @param array $data
*/
public function __construct(
Context $context,
ElementFactory $elementFactory,
array $data = []
) {
$this->elementFactory = $elementFactory;
parent::__construct($context, $data);
}
/**
* @param AbstractElement $element
*
* @return AbstractElement
*/
public function prepareElementHtml(AbstractElement $element)
{
$input = $this->elementFactory->create('text', ['data' => $element->getData()]);
$input->setId($element->getId());
$input->setForm($element->getForm());
$input->setData('class', 'widget-option input-text admin__control-text');
$input->addClass('validate-number')->addClass('validate-greater-than-zero');
if ($element->getData('required')) {
$input->addClass('required-entry');
}
$element->setData('after_element_html', $input->getElementHtml());
$element->setData('value', null);
return $element;
}
}





Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
Hi @DmitryFurs. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance - upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Alfa. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop branchDetails
- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
The issue is reproducible on fresh 2.4-develop.
Actual Result: :heavy_multiplication_x:

:white_check_mark: Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-39096 were created
Issue Available: @engcom-Alfa, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Hi @DmitryFurs.
Thank you for your report and collaboration!
The related internal Jira ticket MC-39096 was closed as Fixed.
The fix will be available with the upcoming 2.4.2 release.
@magento-engcom-team @engcom-Alfa @sdzhepa Chooser validation now works correctly, but the dependent custom field still hides only the input, and the label remains visible.

Point 2 in Steps to Reproduce and point 2 in Actual Results
This can also be seen in the screenshot confirming the issue
The issue is reproducible on fresh 2.4-develop.
Actual Result: ✖️
@magento-engcom-team @engcom-Alfa @zakdma @OlgaVasyltsun I think that the task is not done to the end, in the comments above there are details. can someone reopen the issue?
https://github.com/magento/magento2/commit/ec12bd86f29e32c0fe891ca46cd4c6d7a6a0fbe7
https://github.com/magento/magento2/commit/f1e5c457c922aad8f6b0d439a696c61d6dc018cc
@ihor-sviziev maybe you can help? There is no answer for a long time, but I would like this issue to be completely fixed in the next release. Or should I create a separate ticket?
Hi @engcom-Alfa. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.2.4-develop branch@magento give me 2.4-develop instance to deploy test instance on Magento infrastructure. 2.4-develop branch, please, add the label Reproduced on 2.4.x.@DmitryFurs I'll check it.
Hi @DmitryFurs, @ihor-sviziev .
The issue, described in the comment https://github.com/magento/magento2/issues/30691#issuecomment-735590948, is still reproducible on fresh 2.4-develop.
Actual Result: :heavy_multiplication_x: Only the input field is hidden, the label remains visible

So, we will reopen the issue.
@engcom-Alfa the labels just disappeared. Could you add them back?
:white_check_mark: Confirmed by @ihor-sviziev
Thank you for verifying the issue. Based on the provided information internal tickets MC-39096 were created
Issue Available: @ihor-sviziev, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Most helpful comment
Hi @DmitryFurs, @ihor-sviziev .
The issue, described in the comment https://github.com/magento/magento2/issues/30691#issuecomment-735590948, is still reproducible on fresh 2.4-develop.
Actual Result: :heavy_multiplication_x: Only the input field is hidden, the label remains visible
So, we will reopen the issue.