Problem/Motivation

When block place module is enabled and outside in edit mode is turned on if the user clicks "Place block", the configuration form appears in a modal. If, after placing the block the user clicks the block the same configuration form appears in the off-canvas tray.

Proposed resolution

When both outside in and block place are enabled use the off-canvas tray for the place block form.

Remaining tasks

All

User interface changes

Place blocks form appears in the tray, not a modal.

API changes

Data model changes

None

Comments

tkoleary created an issue. See original summary.

xjm’s picture

This looks like part of (or a duplicate of?) #2739079: Reduce visual clutter of Place Block module.

xjm’s picture

Issue tags: -quickedit, -modal, -jQuery, -Ajax
webchick’s picture

Issue tags: +sprint
tedbow’s picture

Component: quickedit.module » outside_in.module
tedbow’s picture

Status: Active » Needs review
Issue tags: -Outside-in
FileSize
5.71 KB

Ok here is patch that changes block_place to use offcanvas if outside_in is enabled. This should probably be changed the "block_place" component when available.

It currently works(I like this much better!) but probably should add some js/css to highlight which region the user just clicked. In the modal it doesn't really matter as much but with offcanvas it would be a nice change. Should that be a follow-up?

tedbow’s picture

Ok here is a patch that includes the work in #2786459: "Offcanvas" tray should be using the existing dialog system. It is RTBC.
Also a patch that shows just changes to block_place

tkoleary’s picture

@tedbow

Can't get this patch to run in simplytest.me

tedbow’s picture

@tkoleary(and everyone) #2786459: "Offcanvas" tray should be using the existing dialog system just landed so here is re-rerolled patch

tedbow’s picture

Title: Normalize block place and outside-in experiences » [PP-1] Normalize block place and outside-in experiences
Status: Needs review » Postponed
Related issues: +#2804639: Offcanvas dialog width not respected

Postponing this because of #2804639: Offcanvas dialog width not respected

This patch needs to be able to set the width.

tedbow’s picture

Status: Postponed » Needs review
Issue tags: -sprint

#2804639: Offcanvas dialog width not respected was fixed!

Current patch still applies

tedbow’s picture

Title: [PP-1] Normalize block place and outside-in experiences » Normalize block place and outside-in experiences
tkoleary’s picture

@tedbow

Patch works great. Adding a task to highlight the region the block is being placed int like we do when a block is selected. https://www.drupal.org/node/2825413

tkoleary’s picture

Issue tags: +sprint
tkoleary’s picture

Issue tags: +JavaScript

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tedbow’s picture

Talked with UX team:
We should also make the sort of blocks in the region it was just added to as the last step in the adding process. Open up the tray with the blocks in the region to sort.

Also in follow add a new contextual link for each block that would open tray with blocks in region to sort.

Wim Leers’s picture

Status: Needs review » Needs work

Per #17.

tedbow’s picture

Status: Needs work » Needs review
FileSize
8.08 KB
11.96 KB

This patch does

Talked with UX team:
We should also make the sort of blocks in the region it was just added to as the last step in the adding process. Open up the tray with the blocks in the region to sort.

Currently you can sort the blocks if you don't use the table drag but instead show block weights.

This is because of #tabledrag settings in \Drupal\block\BlockListBuilder::buildBlocksForm.
Not sure if we should do a form alter and try to setup the table drag to not expect region groups.

Status: Needs review » Needs work

The last submitted patch, 19: 2784495-19.patch, failed testing.

tedbow’s picture

Status: Needs work » Needs review
FileSize
932 bytes
12.88 KB

Test failed because we now have new route for block library. Fixed

SKAUGHT’s picture

Status: Needs review » Needs work

simplytest.me under 8.2
seems to work well.

it does require the outside in to be active as well. i was expecting block place to just be in the tray (but i'm personally unsure of how much the tray codebase is in core) and if it could be called without outside in being active.

Also, has no styling. (again, i'm unsure how much of styling and and any of #2826722: Add a 'fence' around settings tray with aggressive CSS reset. related work should be expected at this point.

tedbow’s picture

it does require the outside in to be active as well. i was expecting block place to just be in the tray

@SKAUGHT yes until #2784443: Move off-canvas functionality from Settings tray module into drupal.dialog.ajax library so that other modules can use it you will need Settings Tray module on.

And yes the styling won't apply to all uses of the tray until #2826722: Add a 'fence' around settings tray with aggressive CSS reset.

+++ b/core/modules/block_place/src/Controller/BlockPlaceListController.php
@@ -0,0 +1,55 @@
+/**
+ * Defines a controller to list blocks in sort blocks dialog.
+ */
+class BlockPlaceListController extends BlockListController {

I now think makes the situation overly complex. It is basically fighting it's parent class to make a simple listing of block entities in a region to produce a sortable table.

It would probably be much easier to just make a new class BlockListRegionSorter that loads the blocks and create a simple sortable form.

tedbow’s picture

Component: outside_in.module » block_place.module