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

Execute filtering only when a collection is passed to the data source… #25383

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

mgarciaebo
Copy link

@mgarciaebo mgarciaebo commented Oct 30, 2019

… of a UI Component form.

Description

There should be some check in order to perform collection actions only if the data source of UI Componet forms contents and actual valid collection, and avoiding them if not. This keeps model-collections forms working as usual, and avoids crashes on stand-alone forms.

Fixed Issues (if relevant)

  1. UI Component forms not related with any model throw fatal error #13573: UI Component forms not related with any model throw fatal error

Manual testing scenarios

  1. Starting from a vanilla Magento, download, install and enable your own sample Form UI Component, following the instructions given at: https://github.com/magento/magento2-samples/tree/master/sample-module-form-uicomponent
  2. Go to the URL provided by the extension, which is [magento2-admin-url]/sampleform
  3. You should now get the expected form:
    sample_form

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 on Travis CI are green)

@mgarciaebo mgarciaebo requested a review from melnikovi as a code owner October 30, 2019 17:28
@m2-assistant
Copy link

m2-assistant bot commented Oct 30, 2019

Hi @mgarciaavz. 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.

@ghost
Copy link

ghost commented Oct 30, 2019

@mgarciaavz unfortunately, only members of the maintainers team are allowed to assign developers to the pull request

@mgarciaebo
Copy link
Author

This PR is a slightly different approach for this other: #13574, which didn't end up merged due to performance degradation issues (mentioned by @rogyar here: #13574 (comment)). I found no evidence of those issues here, but if any, I guess that your testing tools will end up finding them.

@mgarciaebo mgarciaebo closed this Oct 30, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 30, 2019

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

@mgarciaebo mgarciaebo reopened this Oct 30, 2019
@mgarciaebo mgarciaebo requested a review from rogyar October 31, 2019 09:28
@mgarciaebo
Copy link
Author

mgarciaebo commented Oct 31, 2019

Hi @melnikovi @rogyar, I stepped into an error that I can't fix (or I shouldn't, at least). The phpcs is reporting this warning:

Abstract classes MUST NOT be marked as public @api.

I have fixed some other issues related with the doc blocks in the file "app/code/Magento/Ui/DataProvider/AbstractDataProvider.php", but decision about @api related issues must be taken at a higher level, so by you I guess.

Thank you!

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:16
@rogyar
Copy link
Contributor

rogyar commented Mar 18, 2020

Hi @mgarciaebo. Please, check the conflicting files. Also, according to the new definition of done all changes should be covered by automated tests. I would recommend covering this case with a unit test.

Thank you!

@sidolov sidolov added Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Aug 18, 2020
@joshuaswarren
Copy link

Hello, @mgarciaebo - thank you so much for your involvement in the Magento community and for your work specifically on submitting this pull request!

This request has been open for a while now, and we're coming up on 3 years of no activity after a request was made to add a unit test to cover this PR. Are you still working on the Magento platform? Are you able to spend some time to move this pull request forward?

@mgarciaebo
Copy link
Author

Hi @joshuaswarren, thanks for reaching out.

Yes, I'm still working on Magento and will take a look at this asap. It would be really nice to finally make this PR moving forward :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Ui Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: pending review Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Squashtoberfest 2019
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants