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

WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page #25556

Merged
merged 6 commits into from
Nov 15, 2019

Conversation

engcom-Golf
Copy link
Contributor

Description (*)

Reworked version for #23966

Fixed Issues (if relevant)

  1. Search Adobe Stock button is not active after 2nd attempt to open a media gallery from the same place in Admin adobe-stock-integration#622: Search Adobe Stock button is not active after 2nd attempt to open a media gallery from the same place in Admin
    2.WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page #18548 WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page

Manual testing scenarios (*)

[case 1]

  1. Open the catalog product edit page
  2. Open the "content" area"
  3. Enable the WYSIWYG-Mode for the Description
  4. Hide the last editor in the same area (eg. Short Description or ItemDescV)
  5. Click on Insert Image in the Description Editor
  6. Click on the browse-icon for the Image URL
  7. Select a image from the media browser
  8. Click on insert file

[case 2]

  1. Log in to the admin panel
  2. Go to Content > Elements > Pages
  3. Edit any page, such as Home page
  4. Expand Content section
  5. Click on Insert/edit image toolbar button
  6. Click on Browse button of the Source field
  7. Refresh the page and repeat until reproduced

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)

@engcom-Golf engcom-Golf requested a review from DrewML as a code owner November 11, 2019 13:55
@m2-assistant
Copy link

m2-assistant bot commented Nov 11, 2019

Hi @engcom-Golf. 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.

Copy link
Contributor

@VladimirZaets VladimirZaets left a comment

Choose a reason for hiding this comment

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

Hi, please take a look at my review comments

wUrl = this.config['files_browser_window_url'] +
'target_element_id/' + this.getId() + '/' +
'store/' + storeId + '/';

this.initialize(this.getId(), this.config);
Copy link
Contributor

Choose a reason for hiding this comment

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

We will call initialize 3 times, it's a very strange approach, why we need to do it?

@Nazar65 Nazar65 changed the title [WIP] WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page WYSIWYG-Editor Insert Image-Popup is not working correctly with multiple WYSIWYG-Editors on page Nov 11, 2019
) {
if (typeof options.closed !== 'undefined') {
this.modal.modal('option', 'closed', options.closed);
}
this.modal.modal('openModal');

return;
} else if (typeof options === 'undefined'
Copy link
Contributor

Choose a reason for hiding this comment

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

Check to undefined it isn't the best solution. You can check just like if (options) or in case if you really need to check to undefined ( maybe in some cases it's really needed ) we should use _.isUndefined method from underscore library because typeof has some side effects

Copy link
Member

Choose a reason for hiding this comment

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

ok

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-6272 has been created to process this Pull Request
✳️ @VladimirZaets, 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

@magento-engcom-team
Copy link
Contributor

@engcom-Golf thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@VladimirZaets VladimirZaets added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Nov 12, 2019
@engcom-Alfa engcom-Alfa self-assigned this Nov 13, 2019
Copy link
Contributor

@VladimirZaets VladimirZaets left a comment

Choose a reason for hiding this comment

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

Please take a look at my review comment

) {
if (typeof options.closed !== 'undefined') {
this.modal.modal('option', 'closed', options.closed);
}
this.modal.modal('openModal');

return;
} else if (_.isUndefined(options) && self.modalLoaded === true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can combine inner if with (_.isUndefined(options) && self.modalLoaded === true)

@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@ghost ghost assigned sivaschenko Nov 14, 2019
@magento-engcom-team
Copy link
Contributor

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

@m2-assistant
Copy link

m2-assistant bot commented Nov 15, 2019

Hi @engcom-Golf, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Lib/Frontend Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants