Hi,
Default value for Region drop-down should be set after adding custom block from particular region place block. Please find attachments and scenario below for clear understanding ::
Scenario:
* On click on place block link for header region as seen @blockd8.png.
* Place block pop-up opens showing all the blocks, on clicking the link +Add custom block as seen @blockAddcustomblock.png, user will be able to create custom block.
* After creating the custom block, user redirects to configure block page for created custom block configuration settings, region default value is not set as seen@block2region.png (default region as to be set as header, because as user wants to create custom block for particular header's region).
regards,
harish B
Comment | File | Size | Author |
---|---|---|---|
#22 | preselected_block_region-2754955-22.patch | 3.65 KB | joco_sp |
#19 | interdiff.txt | 837 bytes | Manjit.Singh |
#19 | preselected_block_region-2754955-19.patch | 3.65 KB | Manjit.Singh |
#15 | preselected_block_region-2754955-15.patch | 3.65 KB | joco_sp |
#10 | preselected_block_region-2754955-10.patch | 3.84 KB | joco_sp |
Comments
Comment #2
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedComment #3
Manjit.SinghComment #4
Bojhan CreditAttribution: Bojhan as a volunteer and commentedComment #5
joco_sp CreditAttribution: joco_sp commentedComment #6
joco_sp CreditAttribution: joco_sp commentedHere is the fix. Please review it.Wrong patch. Watch comment #8
Comment #7
joco_sp CreditAttribution: joco_sp commentedComment #8
joco_sp CreditAttribution: joco_sp commentedSorry I uploaded the wrong patch. This is the right patch. Please review it.
Comment #10
joco_sp CreditAttribution: joco_sp as a volunteer and at Agiledrop - Your Trusted Drupal Teammates commentedReuploading and testing it.
Comment #11
joco_sp CreditAttribution: joco_sp as a volunteer and at Agiledrop - Your Trusted Drupal Teammates commentedComment #12
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedHi joco_sp,
Reviewed @comment10,
Tested manually,Great Patch Working perfectly. Please do not include extra lines in patch@line no.20@File(core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php).
Changing status to needs work. @joco_sp :: Please update the patch.
Regards,
Harish Bompally
Comment #13
Manjit.SinghI think @Harish is mentioning this line. And as per coding standard, I guess inline commenting does not need the extra line. Please check this. https://www.drupal.org/node/1354
@Harish Please use dreditor in future. It will help you to review the patches.
Comment #14
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedHi,
@manjit : Thanks for your suggestion. I checked Dreditor, it is very helpful.
@joco_sp :: Please update the patch.
Comment #15
joco_sp CreditAttribution: joco_sp as a volunteer and at Agiledrop - Your Trusted Drupal Teammates commentedThank you for your reviews. I removed the extra line.
Comment #16
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedTested manually, Patch working properly.
Changing status to RTBC.
Regards,
Harish B
Comment #17
webchickThis looks like a great usability improvement. Thanks a lot for working on this.
Rather than \Drupal::request(), let's use $this->getRequest() (per @effulgentsia), since we should have that context from the form.
Additionally, the test needs a bit more working.
It seems like we'd be better off to test the end result (e.g. that the region name is correctly selected by default in the drop-down and/or that the block showed up on the front-end in the correct region) rather than query string argument being passed correctly, which is more testing the routing system than this specific change.
Comment #18
webchickAlso, tested the patch and can confirm that it works! :)
Comment #19
Manjit.Singhchanges as suggested in #17. Please verify.
Comment #20
Manjit.SinghComment #22
joco_sp CreditAttribution: joco_sp as a volunteer and at Agiledrop - Your Trusted Drupal Teammates commentedHello @webchick. Thank you for reviewing the patch.
I made the changes in BlockContentForm, but I still need to do the corrections in the Test, so I am leaving this in Needs work. I will check it as soon as I get some spare time.
In BlockContentAddLocalAction I used \Drupal::request(), as there is no form created yet. Do you suggest that I do it in some other way or is this ok?
Comment #23
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedComment #24
Manjit.SinghComment #26
tim.plunkettNot actively part of the Blocks-Layouts work.
Comment #27
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedHi all,
Changes got reflected in 8.3.x-dev, So i need to close this issue.
Thanks all for your reviews.
changing status to Fixed and closing it.
Regards,
Harish B
Comment #28
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commented