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

Fixed issue when escape key is pressed to close prompt #25349

Conversation

konarshankar07
Copy link
Contributor

@konarshankar07 konarshankar07 commented Oct 29, 2019

Related Pull Requests

https://github.com/magento/partners-magento2b2b/pull/49

Description (*)

This PR will fix the issue with prompt. Currently, If escape key is pressed then prompt is not closing but instead of closing it try to submit the prompt

Fixed Issues (if relevant)

  1. Pressing escape key confirms the save/license confirmation popup adobe-stock-integration#572: Pressing escape key confirms the save/license confirmation popup

Manual testing scenarios (*)

  1. Login to admin panel
  2. Open Magento Media Gallery (i.e. go to Cms -> Pages, edit the page and insert image)
  3. Click "New Folder" button to open prompt
  4. Enter Magento in the textbox to create folder
  5. Press "Escape" key on the keyboard

Actual result

Trying to create new folder with magento

Expected result

Popup should be closed and new folder should not be created

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Oct 29, 2019

Hi @konarshankar07. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sivaschenko sivaschenko self-assigned this Nov 11, 2019
@magento-engcom-team
Copy link
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-6284 has been created to process this Pull Request
✳️ @sivaschenko, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Delta
Copy link
Contributor

Hi @konarshankar07 During testing PR I found this issue: "New Folder Name" only hides behind "Media Gallery" popup if press "Escape" button but it is not closed
#25349PR

Could you take a look?

@konarshankar07
Copy link
Contributor Author

konarshankar07 commented Nov 14, 2019

Hello @engcom-Delta ,
Thanks for raising this issue. I have fixed the above mention issue. Please test and let me know your feedback

@engcom-Golf
Copy link
Contributor

@magento run all tests

@engcom-Golf
Copy link
Contributor

@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-6284 has been created to process this Pull Request

@m2-assistant
Copy link

m2-assistant bot commented Feb 26, 2020

Hi @konarshankar07, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@naydav
Copy link
Contributor

naydav commented Feb 27, 2020

@konarshankar07 @slavvka @sivaschenko
Hello guys,

Unfortunately, we need to revert these changes. In the scope of this PR we changed the base UI components ("modal", "modal/promt"). Thus it can lead to a huge impact on the current existed implementations based on this component.

We can accept some backward-incompatible changes but in this case, it is unreasonably (I mean not functionality but implementation way that leads to huge BIC).
We need to reimplement the fix in another way.

Thanks

@davemacaulay
Copy link
Contributor

davemacaulay commented Feb 27, 2020

@naydav & others, this PR broke Page Builder's usage of the modal and prompt substantially. I agree this BiC change is maybe too severe as it has potential to break other consumers of these libraries.

@konarshankar07
Copy link
Contributor Author

Hello @naydav ,
Sorry for the trouble caused by this PR but can you please explain in detail? So I can fix this issue in another PR. Honestly, I don't understand how this PR caused the issue after passing all the tests.
Thanks

@slavvka
Copy link
Member

slavvka commented Feb 28, 2020

@konarshankar07 You changed the signature of methods in BIC way. Please look the guide https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/. All that rules apply to all code (both PHP and JS). But unfortunately our SVC doesn't check that for JS files. As you could see that already made your fix incompatible with B2B (that required changes there as well). Also we have some extensions that aren't used to run tests - so after running the builds with them we discovered the issue with PageBuilder. As therefore this could be a huge issue for all other marketplace extensions that could use those methods. That is why we ask you to reimplement the fix in BC way according to the guide and create a new PR. This PR has been reverted.

@sivaschenko
Copy link
Member

@naydav @slavvka @davemacaulay this pull request is fixing a major issue of popups functionality as well as eliminating the interface inconsistency. I'd recommend reviewing the possibility to include this fix in minor release (2.4)

@naydav
Copy link
Contributor

naydav commented Feb 28, 2020

@sivaschenko
We can make fix in compatible way and deliver it in 2.4

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.