Closed (fixed)
Project:
ERL Restriction
Version:
8.x-1.0-alpha1
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2019 at 13:22 UTC
Updated:
6 Nov 2019 at 10:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dermarioMarking this as critical, as this is the main purpose of this module.
Comment #3
inaw commentedComment #4
saschaeggiHuge +1
Comment #5
waluigi commentedThanks for the suggestion, that totally makes sense to me as well. I created a patch for this, I'd appreciate any testing :-)
Comment #6
saschaeggi@waluigi applied the patch and did some testing
Looks good so far, but when I want to add a paragraph it doesn't show up at all.
Also I think #3087079: Allow all paragraph types if none are selected is important as well.
Comment #7
saschaeggiAlso we might want to make sure that it still works with this patch from entity_reference_layout #3070005-11: Implement a nicer solution to element selection applied.
Comment #8
waluigi commentedThanks for the feedback, @saschaeggi.
The problem was that they were moved to "disabled items" directly because it did not fetch the allowed paragraphs correctly for the target region. Also one could not drag and drop it into other regions for the same reason. I was not yet able to fix the whole problem, however the drag and drop is working now.
Newly added paragraphs will still be appended to the disabled items wrapper. I'm still working on a solution for that.
Comment #9
waluigi commentedI was able to fix it. The problem was a reference to a wrong parent.
Thanks for any feedback!
Comment #10
waluigi commentedComment #11
dermarioI reviewed the PHP part of this patch and it looks awesome already. These are my findings:
I wonder if we could store
$this->getSettings()['restrictions'][$layout]in a variable to make the following code more readable/meaningful.This comment is obsolete.
I think entity.manager gets deprecated in D9 we should avoid using it.
The new service should use dependency injection in favor of creating the service on the fly.
Comment #12
waluigi commentedThanks for the feedback @dermario. I implemented your suggestions. What do you think now?
Comment #13
waluigi commentedSince my codesniffer is currently not working properly I missed some spaces. Here is the new patch.
Comment #14
dermarioThis looks fine for me now. We could fix these while committing the patch.
This could be single quotes for consistency reasons.
Comment #16
waluigi commentedThanks to all for the support! :)
Comment #17
waluigi commented