Will be updated as I go along.

Comments

Wim Leers’s picture

Title: [meta] Bring D7 & D8 Edit in sync; revert broken/unnecessary patches » [meta] Bring D7 & D8 Edit in sync; modify broken/revert unnecessary patches
Version: 7.x-1.0-alpha6 » 7.x-1.x-dev
Category: bug » task
Wim Leers’s picture

Wim Leers’s picture

Wim Leers’s picture

Status: Active » Fixed

http://drupalcode.org/project/edit.git/commitdiff/d1623e3859b3e67bd64cdb..., for #1893644: Alignment slightly off on validation errors: unnecessary by moving to D8 HTML+structure for toolbar, that fixed this problem indirectly, so this hack is no longer necessary :)

http://drupalcode.org/project/edit.git/commitdiff/46204854bc446b0b60a844..., for #1893646: display:inline fields are floating around as I hover over them: likewise. Plus, this diff introduced changes unrelated to what the commit msg + issue were about, so just reverted the entire patch. With the exception of this change

-    if (this.$el.css('display') === 'inline') {
+    if (this.editor.element.css('display') === 'inline') {

Committed: http://drupalcode.org/project/edit.git/commit/e590058

As of this commit, the following files are IDENTICAL IN D7 & D8 , with exceptions noted:

  • css/edit.cs (98%), D7 has "Edit overlay"-related styles, which D8 does not have/need
  • js/createjs/editingWidgets/drupalcontenteditable.js (100%)
  • js/createjs/editingWidgets/formwidget.js (90%), D7 contains .edit-belowoverlay class handling wrt the overlay that the D7 version still has
  • js/createjs/editable.js (99.9%), only Drupal.settings vs. drupalSettings
  • js/createjs/storage (100%)
  • js/models/edit-app-model.js (90%), D7 has isViewing, D8 not; D8 has activeEntity, D7 does not. These differences stem from the fact that in D7, Edit has a "global edit mode", whereas in D8, you do in-place editing on a per-entity basis
  • js/createjs/viejs/EditService.js (99.9%), only Drupal.settings vs. drupalSettings
  • js/models/views/modal-view.js (90%), D7 contains .edit-belowoverlay class handling wrt the overlay that the D7 version still has
  • js/models/views/propertyeditordecoration-view.js (100%) → OMG! BIG WIN!
  • js/models/views/toolbar-view.js (100%) → OMG! BIG WIN
  • js/app.js (80%), D7 has global edit mode, D8 per-entity, this results in unavoidable differences. Plus: overlay vs. no overlay.
  • js/backbone.drupalform.js (100%)
  • js/edit.js (50%), D7 has async Create.js PropertyEditor loading (D8 not yet), ARIA messages area (handled by Drupal.announce in D8), global vs. per-entity edit mode and corresponding Backbone Router. Only natural that these are so different.
  • js/theme.js (85%), D7 has two theme functions the D8 version doesn't need (for ARIA messages)
  • js/util.js (99.9%), only Drupal.settings vs. drupalSettings

Automatically closed -- issue fixed for 2 weeks with no activity.