Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a dead-end patch to get unified editing working for the purposes of user testing. The code is meant to be throw-away.
Comment | File | Size | Author |
---|---|---|---|
#16 | Pencils.png | 60.21 KB | Gábor Hojtsy |
#15 | Zindexes.png | 75.21 KB | Gábor Hojtsy |
#15 | 1898020_unified-edit_COMBINED_15.patch | 24.72 KB | Gábor Hojtsy |
#13 | PencilsTest.png | 149.8 KB | Gábor Hojtsy |
#12 | 1898020_unified-edit_COMBINED_12.patch | 22.47 KB | Gábor Hojtsy |
Comments
Comment #1
jessebeach CreditAttribution: jessebeach commentedThis patch introduces the pencil icon as a universal edit trigger.
Contextual links are hacked so that they will exhibit their normal behavior until the edit mode is toggled on. In edit mode, the contextual link triggers are always present on the page.
Comment #2
webchickFrom the 8.x-1.0-unifiedEdit1 tag, drush make is failing on:
However, the tip of the unified-edit branch seems to work ok.
Comment #3
webchickNote that I can't cut a release of Spark with this in it unless it's merged into the main 8.x-1.x branch.
Comment #4
webchickI can see this working successfully on http://edit.qemistry.us/ but when building with Drush manually, I don't see pencils in the circles for some reason:
Additionally, on the demo site the search box inexplicably does not have one of these hover links. Is it a missing permission on the tester user? If that's not easy to fix, no worries, I think we can go ahead with testing and just call that a bug.
WOOT! Thanks, Jesse!!
Comment #5
Wim Leers@Jesse: in your patch at #1, you forgot to include core/misc/edit.png in the patch — this is what causes #4 :)
Comment #6
Gábor HojtsyI assume core/modules/edit/images/icon-edit.png is the same as should be at core/misc/edit.png so it can be copied over.
Comment #7
Wim LeersYes, essentially the former is moved to the latter, and that is all that changes in that area. (This allows the Contextual Links module to refer to the same image.)
Comment #8
Gábor HojtsyBTW trying to apply this to Drupal 8 current; looks like you rolled this against other patches already applied.
$ patch -p1 < 1898020_unified-edit_1.patch
patching file core/modules/contextual/contextual.js
Hunk #1 succeeded at 9 with fuzz 2 (offset 2 lines).
Hunk #2 FAILED at 18.
Hunk #3 FAILED at 56.
Hunk #4 FAILED at 149.
3 out of 4 hunks FAILED -- saving rejects to file core/modules/contextual/contextual.js.rej
patching file core/modules/contextual/contextual.theme.css
Hunk #1 succeeded at 7 with fuzz 2 (offset -6 lines).
Hunk #2 FAILED at 15.
Hunk #3 FAILED at 43.
Hunk #4 succeeded at 68 with fuzz 2 (offset -6 lines).
Hunk #5 succeeded at 85 (offset -6 lines).
2 out of 5 hunks FAILED -- saving rejects to file core/modules/contextual/contextual.theme.css.rej
patching file core/modules/edit/css/edit.css
patching file core/modules/edit/js/createjs/editingWidgets/drupalcontenteditablewidget.js
patching file core/modules/edit/js/createjs/editingWidgets/formwidget.js
patching file core/modules/edit/js/views/menu-view.js
patching file core/modules/edit/js/views/propertyeditordecoration-view.js
patching file core/modules/edit/js/views/toolbar-view.js
Comment #9
Gábor HojtsyComment #10
Wim Leers#8:
- This is against Spark D8, not D8 HEAD.
- Jesse is applying another patch first to contextual.module, hence the failure: http://drupalcode.org/project/spark.git/commitdiff/ebaa95d
- Then, apply this patch.
- This patch does ship with the core/misc/edit.png file that was missing icon file because ***I*** failed to include it properly in my original "pencils patch".
Comment #11
Wim Leers#2: Indeed, @jessebeach simply appears to have forgotten to update the tag to point to the tip of the branch — though I doubt d.o allows removal of tags…, so she probably couldn't have changed it.
A major problem: getting the f*********ing core/misc/edit.png file to work:
All is well, yet the PNG file is still missing. Argh?
Comment #12
Gábor HojtsyApplying http://drupal.org/files/contextual-contextual_links_keyboard_accessibili... first and then #10, it applies cleanly to Drupal 8 core. Here is a combined patch just for human-testing. Just applying #10 itself, the edit png appears for me. Not sure why it would not work in a make scenario like what Wim showed.
Comment #13
Gábor HojtsyTesting feedback based on that patch on top of vanilla D8:
- Contextual links still "work" "somewhat" without edit module but only on the first click or so. Any further clicks just make the menu flickr and disappear immediately. Also the blue border that seems to show up with the edit mode flickrs up for a split second.
- With the edit mode turned on it looks like this:
Comment #14
Wim Leers#13: all the Edit outlines are by design, that's how it always worked. The outlines around the contextual link-ized blocks are new. And yes, the in-place editors used by Edit are always top-left aligned (in LTR at least), which is where the actual content is rendered as well.
Comment #15
Gábor HojtsyWim: I understand Edit already works so it displays the edit widget on the left, however, now the pencils are on the far right, which makes them disconnected. That is not a bug report, but rather usability feedback :)
However, here is a bug report with z-indexes of the pencils:
Also another attempt at a binary patch roll (against Drupal 8), however I could not figure out how to roll the nice ascii looking patches that Jesse produced.
Comment #16
Gábor HojtsyIf the pencil's z-index is lowered to 499 (vs. the overlay's dim layer's 500), then it looks great.
Comment #17
jessebeach CreditAttribution: jessebeach commentedThe pencil icons will also display above the field edit modal, which is at z-index 310. There's still a little more fine-tuning to do here to get everything on a the right plane.
Comment #18
Gábor HojtsyClosing down as duplicate of #1874664: Introduce toolbar level "Edit" mode that shows all contextual links. Please post updated work there.