Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jessebeach’s picture

First pass at integration.

This will be included in the Spark distribution 8.x alpha build.

jessebeach’s picture

That patch in #1 doesn't apply to the 8.x-1.0-alpha1 tag. Rerolling.

jessebeach’s picture

I neglected to move an if statement that prevents the Edit tab from loading on pages that are not editable.

Wim Leers’s picture

The first change of http://drupalcode.org/project/edit.git/commitdiff/e8324b5 may but should not conflict with the patch in #3.

I LOVE how we're no longer relying on hook_page_alter() :)

Why also include the icons as data URIs though?

webchick’s picture

This no longer applied to me against the latest Edit module code. Here's an attempt at a re-roll.

jessebeach’s picture

Attempting a hand-edited patch. Here goes. The icon CSS is now incorrect because of changes to the Toolbar CSS.

webchick’s picture

Ok, one more time.

Wim recommended we stick with the alpha1 release in Spark for now, as Edit module's still in flux. This means going back to the patch in #3 with the icon fix from #6. Attempting to do that here in #7.

webchick’s picture

Lucky try #2? (or #8 in this case?)

jessebeach’s picture

Status: Active » Closed (fixed)

Updated patch has been posted to #1137920: Fix toolbar on small screen sizes and redesign toolbar for desktop. This issue is no longer needed.

jessebeach’s picture

Status: Closed (fixed) » Needs work
jessebeach’s picture

Updated patch.

Wim Leers’s picture

+++ b/edit.moduleundefined
@@ -79,18 +97,9 @@ function edit_page_alter(&$page) {
-  global $editbar;

Edit sets global $editbar = TRUE (see edit_preprocess_field()) to ensure the view/edit mode toggle ONLY shows up if there's actually something on the page that's editable.

I know, it's crappy and evil, but it's also KISS for now.

If you can take that one thing into account, then this looks GREAT :)

webchick’s picture

This patch needs a refresh for the new toolbar (now hook_toolbar() instead of hook_toolbar_something_something()) and new Edit module patch available at #1824500-9: In-place editing for Fields.

webchick’s picture

Here's #11 with hook_toolbar() renamed. Testing.

webchick’s picture

Here's #11 with hook_toolbar() renamed. Testing.

webchick’s picture

Ok, new patch. Includes fix for CSS and maybe some other things.

jessebeach’s picture

Includes integration with the latest D8 toolbar patch as of #1137920-290: Fix toolbar on small screen sizes and redesign toolbar for desktop.

webchick’s picture

Status: Needs work » Needs review

wellll, shitballs. :( I didn't realize the latest Edit module code wasn't in git, and is instead only in the patch at http://drupal.org/node/1824500#comment-6741906, and when switching to the patch at http://drupal.org/files/in_place_editing_for_fields-9.patch this patch of course no longer applies. I tried applying it manually and now we're back to that lovely thing where it's linking to URL/%23 and getting a 404 and therefore not invoking view/edit mode. UIY@*#&(@#&@# anyway, let's discuss when you're up. ;)

webchick’s picture

Status: Needs review » Needs work
Wim Leers’s picture

#18: that's because I didn't merge the node/1824100-createjs-d8 branch back into the 8.x-1.x branch yet (I was exhausted when I rolled that patch on Friday). No worries though, the server-side part has not changed in any meaningful way, so it'll be easy enough to port over your patch :)

Wim Leers’s picture

FYI, the node/1824100-createjs-d8 branch has been merged back into the 8.x-1.x branch; I'm currently testing Spark + this patch.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
5.34 KB

Rerolled; now it is working. (The difference: I'm setting the URL fragments; that's how it works now :))

  • Note that this removes the ugly, but functional way of ensuring no view/edit mode toggle appears if there is nothing to edit. Are we sure this is what we want? I'm fine with either, as long as it's conscious.
  • Is it intentional that menu items in the toolbar that are "active" (i.e. have the "active" class) are *not* styled differently?
Wim Leers’s picture

Now *with* icons.

Wim Leers’s picture

Here's a "Drupal core patch" version of the patch in #23, for use in the Spark distro.

Wim Leers’s picture

Reintroduce the #post_render callback, as mentioned in #22.1 after discussing with @webchick and @Jesse Beach.

Wim Leers’s picture

Note for #25: the #post_render callback is only called for the tray, not for the tab. In other words: the Edit tab is always present, even if zero editable fields exist on the page.

Wim Leers’s picture

Wim Leers’s picture

FileSize
38.88 KB
41.7 KB

Before:
before.png

After:

after.png

jessebeach’s picture

conditionally rendering the Edit module tab is blocked on: #1847198: Update the structure returned by hook_toolbar()

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added the dev branch info.