Follow-up to #1510544: Allow to preview content in an actual live environment

Problem

The current node preview bar looks like this:
node preview

Proposed resolution

  • Allow admin themes to provide a stylsheet for the preview bar
  • Change the styling of the button to match Seven link
  • Change the colour of the toolbar to match the standard horizontal bar in the toolbar.

Before


 
After

API Changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because the button doesn't match the Seven primary button and the color of the toolbar doesn't match the standard horizontal bar in the toolbar.
Issue priority Not critical because it functionally it doesn't change a think. It's a UI improvement.
Unfrozen changes Unfrozen because it only changes css.

Why this change should be committed during RC

There are several reasons this should be submitted:

  • This fixes a big bug that you can't properly use the preview bar on your mobile phone.
  • The design is currently completely out of line with the rest of our style guide implementation.
  • The current design has various usability issues, as uncovered in earlier testing - this design should resolve that.
  • This has no impact on the larger ecosystem as it only touches the preview bar.

As far as I am aware there is no impact in other places and/or will cause any contrib having to re-do work. Since I didn't see any D8 module that alters this yet.

CommentFileSizeAuthor
#172 screenshot-preview-bar.png126.68 KBchr.fritsch
#172 interdiff-2341221-166-172.txt490 byteschr.fritsch
#172 node_preview_bar_has-2341221-172.patch3.76 KBchr.fritsch
#167 previewbar-issue.png213.8 KBmanjit.singh
#166 Bildschirmfoto 2016-04-15 um 16.19.33.png122.88 KBchr.fritsch
#166 Bildschirmfoto 2016-04-15 um 16.19.54.png106.53 KBchr.fritsch
#166 node_preview_has-2341221-166.patch3.52 KBchr.fritsch
#161 node_preview_has-2341221-161.patch3.52 KBchr.fritsch
#159 node_preview_has-2341221-159.patch3.52 KBlewisnyman
#156 Screenshot 2015-11-15 20.51.59.jpg709.38 KBlewisnyman
#156 node_preview_has-2341221-156.patch3.46 KBlewisnyman
#156 interdiff.txt5.04 KBlewisnyman
#138 tweak_the_design_of_the-2341221-138.patch8.42 KBlewisnyman
#138 interdiff.txt634 byteslewisnyman
#134 tweak_the_design_of_the-2341221-134.patch8.43 KBlewisnyman
#134 interdiff.txt646 byteslewisnyman
#131 tweak_the_design_of_the-2341221-131-reroll.patch8.52 KBjoelpittet
#118 tweak_the_design_of_the-2341221-118.patch8.52 KBmgifford
#111 tweak_the_design_of_the-2341221-111.patch5.99 KBmartins.kajins
#108 tweak_the_design_of_the-2341221-108.patch6.02 KBmartins.kajins
#106 tweak_the_design_of_the-2341221-105.patch8.49 KBlewisnyman
#106 interdiff.txt646 byteslewisnyman
#98 preview-after.png38.47 KBemma.maria
#98 Before.png45.92 KBemma.maria
#97 tweak_the_design_of_the-2341221-97.patch8.44 KBemma.maria
#92 IMG_4567.jpg38.01 KBemma.maria
#92 Screen Shot 2015-09-07 at 13.07.28.png61.17 KBemma.maria
#92 Screen Shot 2015-09-07 at 13.15.52.png78.92 KBemma.maria
#92 IMG_4565.jpg47.48 KBemma.maria
#88 tweak_the_design_of_the-2341221-88.patch8.45 KBlewisnyman
#88 interdiff.txt1.28 KBlewisnyman
#85 Screenshot 2015-09-02 13.48.43.jpg941.49 KBlewisnyman
#85 tweak_the_design_of_the-2341221-84.patch8.42 KBlewisnyman
#81 interdiff.txt1.14 KBrteijeiro
#81 tweak_the_design_of_the-2341221-81.patch11.63 KBrteijeiro
#81 node-preview-before.png97.5 KBrteijeiro
#81 node-preview-after.png96.71 KBrteijeiro
#76 tweak_the_design_of_the-2341221-76.patch11.62 KBlewisnyman
#76 interdiff.txt4.85 KBlewisnyman
#76 Screen Shot 2015-07-24 at 14.56.33.jpg775.28 KBlewisnyman
#69 Tweak-the-design-2341221-69.patch8.98 KBmanjit.singh
#68 Tweak-the-design-2341221-68.patch7.88 KBmanjit.singh
#55 2341221-55.patch8.94 KBrpayanm
#55 2341221-interdiff.txt475 bytesrpayanm
#52 2341221-52.patch8.97 KBlewisnyman
#52 interdiff.txt3.85 KBlewisnyman
#43 2341221-43.patch3.69 KBlewisnyman
#43 interdiff.txt499 byteslewisnyman
#43 Screen Shot 2014-11-29 at 00.28.46.jpg407.47 KBlewisnyman
#42 Selection_017.png37.81 KBrpayanm
#40 Selection_016.png38.96 KBrpayanm
#40 Selection_015.png37.7 KBrpayanm
#40 2341221-40.patch3.69 KBrpayanm
#40 2363717-interdiff.txt4.41 KBrpayanm
#37 default_links.png17.5 KBvermario
#35 2341221-35_2.png81.31 KBvermario
#35 2341221-35_1.png80.97 KBvermario
#31 Selection_009.png28.31 KBrpayanm
#31 Selection_010.png28.2 KBrpayanm
#31 2341221-31.patch3.55 KBrpayanm
#31 2341221-interdiff.txt1.95 KBrpayanm
#29 2341221-22-preview.png49.8 KBvermario
#27 2341221-22-preview-900px.jpg56.88 KBdahousecat
#27 2341221-22-preview.png34.46 KBdahousecat
#25 2341221-22-preview.jpg188.52 KBvermario
#22 2341221-22.patch3.98 KBrpayanm
#22 2341221-interdiff.txt868 bytesrpayanm
#20 2341221-20.patch659 bytesByronNorris
#20 2341221-20-preview.png66.44 KBByronNorris
#18 2341221-18.patch4.28 KBrpayanm
#18 2341221-interdiff.txt532 bytesrpayanm
#16 tweak_the_design_of_the-2341221-16.patch3.95 KBrudins
#12 Screen Shot 2014-10-06 at 21.57.20.png62.24 KBsqndr
#12 tweak_the_design_of_the-2341221-12.patch3.87 KBsqndr
#9 2341221-preview-bar.png76.22 KByoroy

Comments

lewisnyman’s picture

Category: Bug report » Task
Priority: Critical » Normal
lewisnyman’s picture

Status: Fixed » Active
Bojhan’s picture

Wait - we have a standard horizontal bar? This should not have the same background color as the toolbar second menu - that would be confusing.

Button would be nice to fix, including adding a proper <

lewisnyman’s picture

@Bojhan I thought you would have an opinion on this :-P Why would it be confusing?

yoroy’s picture

My take: because we need a unique look here to clearly signal that you're looking at a preview, this should not blend in but stick out a bit instead.

Bojhan’s picture

I will just nod at what yoroy said.

lewisnyman’s picture

Ok, I see what you're saying. We should signify that this is a preview. I still think that this blue is a not the best way to do this. It feels very weird on a static element as that blue is used as a hover affordance on tables and else where (yet to be implemented dropbutton/autocomplete menus).

sqndr’s picture

Assigned: Unassigned » sqndr
yoroy’s picture

StatusFileSize
new76.22 KB

Taking it litterally that we want to warn people we could maybe derive a nice yellow from our warning message. I'm reusing the yellow from our warning messages in the attached mockup but it looks a bit weak to me. I simplefied the button because maybe it needs less of an accent when the whole bar gets more noticeable.

sqndr’s picture

Issue tags: +Amsterdam2014

I like the way this is going. Maybe we could have a small talk tomorrow about which direction we'd like to go with this. I like the idea proposed in #9.

cato’s picture

That looks great @yoroy. Did you decide on anything @sqndr?

sqndr’s picture

We haven't decided on anything at Amsterdam. Here's a patch implementing (more or less) the solution from #9.

sqndr’s picture

Status: Active » Needs review
wim leers’s picture

I definitely like how much simpler the CSS becomes — this patch mostly deletes code! :)

+++ b/core/themes/bartik/css/style.css
@@ -847,9 +847,7 @@ ul.links {
+  background: #FFFCE5;

Don't we use lowercase hexadecimals in our CSS?

lewisnyman’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

From the CSS standards:

When hex values are used for colors, use lowercase and, if possible, the shorthand syntax, e.g. #aaa. Colors may be expressed with any valid CSS value, such as hex value, color keyword, rgb() or rgba(). Note that IE8 does not support all color syntaxes and will require a fallback value.

Yes we should.

+++ b/core/themes/bartik/css/style.css
@@ -847,9 +847,7 @@ ul.links {
   font-family: Arial, sans-serif;

Update this to the Seven font stack, at least it will be consistent then.

rudins’s picture

Status: Needs work » Needs review
StatusFileSize
new3.95 KB

Some fixed lines...

lewisnyman’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll +Novice

The font stack still needs to be changed to:
"Lucida Grande", "Lucida Sans Unicode", "DejaVu Sans", "Lucida Sans", sans-serif;

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new532 bytes
new4.28 KB
lewisnyman’s picture

Status: Needs review » Needs work
+++ b/core/themes/bartik/css/style.css
@@ -81,7 +81,7 @@ samp,
 var {
   padding: 0 0.4em;
   font-size: 0.857em;
-  font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", "Nimbus Mono L", "DejaVu Sans Mono", monospace, "Courier New";
+  font-family: "Lucida Grande", "Lucida Sans Unicode", "DejaVu Sans", "Lucida Sans", sans-serif;
 }

Thanks for the patch. Sorry this is the wrong font stack to change, I wasn't very descriptive. We need to change this one:

+++ b/core/themes/bartik/css/style.css
@@ -857,66 +857,14 @@ ul.links {
 .node-preview-container {
-  background: #d1e8f5;
-  background-image: -webkit-linear-gradient(top, #d1e8f5, #d3e8f4);
-  background-image: linear-gradient(to bottom, #d1e8f5, #d3e8f4);
-  font-family: Arial, sans-serif;
+  background: #fffce5;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.3333);
   position: fixed;
ByronNorris’s picture

Status: Needs work » Needs review
StatusFileSize
new66.44 KB
new659 bytes

Here is a patch from #19:

preview of new css changes on the bartik preview toolbar

lewisnyman’s picture

Status: Needs review » Needs work

@bluegriff Looks like we lost the rest of the patch?

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new868 bytes
new3.98 KB

fixed :)

sqndr’s picture

Status: Needs review » Needs work

Patch does not apply any more.

Status: Needs work » Needs review

vermario queued 22: 2341221-22.patch for re-testing.

vermario’s picture

StatusFileSize
new188.52 KB

Trying to review this.
The patch in #22 applies correctly in my environment.

The button is gone, the font looks correct to me, but the underlying bar is blue.

sqndr queued 22: 2341221-22.patch for re-testing.

dahousecat’s picture

StatusFileSize
new34.46 KB
new56.88 KB

Patch from #22 applied cleanly.

Can confirm button is gone and the bar is blue.

2341221-22 preview

However once the screen width drops to 900px the edit bar sites over the top of the Drupal logo:

2341221-22 preview 900px

lewisnyman’s picture

Status: Needs review » Needs work

The bar should be yellow as it is in #20

vermario’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new49.8 KB

Ok, I revisited the patch at #22, and everything seems to be actually ok. The bar is indeed yellow, and I could not replicate the problem pointed out by @dahousecat about the bar going over the logo. Attaching screenshot. (Chrome - mac - 890px).

Marking as reviewed, but feel free to double check.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

This issue is a normal task so we need to outline how it fits within the allowable Drupal 8 beta criteria. Can someone add Drupal 8 beta phase evaluation template to the issue summary.

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.95 KB
new3.55 KB
new28.2 KB
new28.31 KB

What you think of this?

LTR:
ltr

RTL:
rtl

sqndr’s picture

Issue summary: View changes

Updated the issue summary as per #30.

sqndr’s picture

+++ b/core/modules/node/src/Form/NodePreviewForm.php
@@ -83,7 +83,7 @@ public function buildForm(array $form, FormStateInterface $form_state, EntityInt
-      '#options' => array('attributes' => array('class' => array('node-preview-backlink'))) + $query_options,
+      '#options' => $query_options,

Why did you revert this? I felt like it's was a good thing to remove the class?

rpayanm’s picture

I revert this for styling the element "Back to content editing" to "< Back to content editing", because I found no way to apply a css style.

vermario’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new80.97 KB
new81.31 KB

I have reviewed the patch in #31. All seems good to me.

Screenshots:
LTR:

RTL:

Bojhan’s picture

Why do we have the dotted line under the back link? We dont need that.

vermario’s picture

StatusFileSize
new17.5 KB

It looks like this is the default way of displaying "actionable" links in the bartik theme:

so to me it makes sense, at least?

Bojhan’s picture

Not really, we should use Seven's pattern here. Just like the toolbar doesn't follow Bartik. This should not follow Bartik.

lewisnyman’s picture

Status: Reviewed & tested by the community » Needs work

Yes please! We don't have a great way for handling this so it means a few overrides

rpayanm’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new4.41 KB
new3.69 KB
new37.7 KB
new38.96 KB

and now?

RTL
RTL

LTR
LTR

rpayanm’s picture

Status: Reviewed & tested by the community » Needs review
rpayanm’s picture

StatusFileSize
new37.81 KB
lewisnyman’s picture

StatusFileSize
new407.47 KB
new499 bytes
new3.69 KB

One minor change, which is to change the colour of the icon to match the link colour.

sqndr’s picture

Status: Needs review » Reviewed & tested by the community

Patch #43 looks good. Tested and confirmed that with the patch it looks like the screenshot from Lewis.

manjit.singh’s picture

Status: Reviewed & tested by the community » Needs work
Related issues: +#2384153: Node preview bar should re-calculate BODY padding-top, otherwise user menu (top of page) is obscured

Please consider this issue also, https://www.drupal.org/node/2384153

swentel’s picture

Status: Needs work » Reviewed & tested by the community

That can be a follow up.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 43: 2341221-43.patch, failed testing.

Status: Needs work » Needs review

LewisNyman queued 43: 2341221-43.patch for re-testing.

rpayanm’s picture

Status: Needs review » Reviewed & tested by the community

Restoring...

ricovandevin’s picture

Following this so that I can re-roll the patch in #2384169: The node preview bar is not usable without Bartik once this one is committed.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/bartik/css/style.css
    @@ -870,49 +868,32 @@ ul.links {
    +  background: url(../../../misc/icons/0074bd/chevron-left.svg) left no-repeat;
    ...
    +  background: url(../../../misc/icons/000000/chevron-left.svg) left no-repeat;
    

    missing /* LTR */

  2. +++ b/core/themes/bartik/css/style.css
    @@ -870,49 +868,32 @@ ul.links {
     .node-preview-backlink:hover {
    ...
    +  text-decoration: underline;
    +  border-bottom-style: none;
    ...
     [dir="rtl"] .node-preview-backlink:hover {
    ...
    +  text-decoration: underline;
    +  border-bottom-style: none;
    

    I don't think that we need the same styles on the rtl only css.

lewisnyman’s picture

StatusFileSize
new3.85 KB
new8.97 KB

I rerolled, fixed the RTL styling, and then also realised I could cut down on some of the overriding CSS by using the 'link' class. I also noticed that we accidentally duplicated the CSS for node preview in two files in Bartik.

lewisnyman’s picture

Status: Needs work » Needs review
aspilicious’s picture

Status: Needs review » Needs work
+}
\ No newline at end of file
rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new475 bytes
new8.94 KB
emma.maria’s picture

Assigned: sqndr » Unassigned
cluther’s picture

NOTE: At Drupal Sprint in Austin and looking at this.

cluther’s picture

Tested patch #55.
Patch applied cleanly
The trailing space issue has been resolved.
Both RTL and LTR displays are a shown in @rpayanm comment #40.

cluther’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Assigned: Unassigned » alexpott
Issue tags: +SprintWeekend2015

Alex has been most involved here, so kicking back to him.

lewisnyman’s picture

Thanks for the manual testing and the patches. The code looks good to me. RTBC++

yoroy’s picture

And the UI is as intended, so we're good on that part too.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 55: 2341221-55.patch, failed testing.

Status: Needs work » Needs review

Gábor Hojtsy queued 55: 2341221-55.patch for re-testing.

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Unrelated fail in useradmintest.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/bartik/css/components/node-preview.css
@@ -1,8 +1,6 @@
+  font-family: "Lucida Grande", "Lucida Sans Unicode", "DejaVu Sans", "Lucida Sans", sans-serif;

So... this entangles bartik with seven's font stack. Should we be doing that? This feels problematic for admin themes other than seven. Not sure what to do here. The least we should do is add a comment.

lewisnyman’s picture

@alexpott How would you feel if we merged #2384169: The node preview bar is not usable without Bartik into this issue and moved the CSS into the module?

manjit.singh’s picture

Status: Needs work » Needs review
StatusFileSize
new7.88 KB

rerolling a patch #55 :)

manjit.singh’s picture

StatusFileSize
new8.98 KB

forget to add SVG icons ;)

lewisnyman’s picture

Assigned: alexpott » Unassigned
Status: Needs review » Reviewed & tested by the community

Great this looks good, I'm going to mark this RTBC and then we can follow up #2384169: The node preview bar is not usable without Bartik to move a lot of the node-preview component styling into the module instead of Bartik so this is less confusing.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

I still don't think putting seven's font stack in bartik makes sense since this means that we're saying bartik should be used with seven - but other admin themes are possible.

lewisnyman’s picture

Ok sure, there's no good way for Seven to define CSS that would be loaded on the frontend right now, see: #2195695: Admin UIs on the front-end are difficult to theme

So that means

+++ b/core/themes/bartik/css/components/node-preview.css
@@ -1,8 +1,6 @@
+  font-family: "Lucida Grande", "Lucida Sans Unicode", "DejaVu Sans", "Lucida Sans", sans-serif;

We need to move this property into node.preview.css

lewisnyman’s picture

Title: Tweak the design of the node preview bar to align with the Seven style guide and current toolbar designs » Tweak the design of the node preview bar to align with the Seven style guide and current toolbar designs, move styling into the admin theme
Issue summary: View changes

Ok so I spoke to Alex about how we can deal with #2195695: Admin UIs on the front-end are difficult to theme for Drupal 8. The imperfect solution we have right now in the quickedit module is something we can reuse to allow admin themes to influence the styling of the these admin elements.

See quickedit.module:

/**
 * Implements hook_library_info_alter().
 *
 * Includes additional stylesheets defined by the admin theme to allow it to
 * customize the Quick Edit toolbar appearance.
 *
 * An admin theme can specify CSS files to make the front-end administration
 * experience of in-place editing match the administration experience in the
 * back-end.
 *
 * The CSS files can be specified via the "edit_stylesheets" property in the
 * .info.yml file:
 * @code
 * quickedit_stylesheets:
 *   - css/quickedit.css
 * @endcode
 */
function quickedit_library_info_alter(&$libraries, $extension) {
  if ($extension === 'quickedit' && isset($libraries['quickedit'])) {
    $theme = Drupal::config('system.theme')->get('admin');

    // First let the base theme modify the library, then the actual theme.
    $alter_library = function(&$library, $theme) use (&$alter_library) {
      if (isset($theme) && $theme_path = drupal_get_path('theme', $theme)) {
        $info = system_get_info('theme', $theme);
        // Recurse to process base theme(s) first.
        if (isset($info['base theme'])) {
          $alter_library($library, $info['base theme']);
        }
        if (isset($info['quickedit_stylesheets'])) {
          foreach ($info['quickedit_stylesheets'] as $path) {
            $library['css']['theme']['/' . $theme_path . '/' . $path] = [];
          }
        }
      }
    };

    $alter_library($libraries['quickedit'], $theme);
  }
}

This solution would also solve #2384169: The node preview bar is not usable without Bartik, as changing the frontend theme would not break the preview bar, so I'm closing it as a duplicate.

deepakaryan1988’s picture

Issue tags: -SprintWeekend2015

Removing sprint weekend tag!!
As suggested by @YesCT

deepakaryan1988’s picture

Issue tags: +SprintWeekend2015

Sorry, these issues were actually worked on during the 2015 Global Sprint
Weekend https://groups.drupal.org/node/447258

lewisnyman’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new775.28 KB
new4.85 KB
new11.62 KB

Here is my proposal patch, I had to make a few tweaks due to CSS loading order but it looks the same.

Status: Needs review » Needs work

The last submitted patch, 76: tweak_the_design_of_the-2341221-76.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 76: tweak_the_design_of_the-2341221-76.patch, failed testing.

berdir’s picture

Component: entity system » node system

This has nothign to do with the entity system :)

rteijeiro’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new96.71 KB
new97.5 KB
new11.63 KB
new1.14 KB

I don't the problem with the test. It seems there is a wrong theme name parameter with value 0 passed to the function drupal_get_filename() at some point but can't debug it ATM.

Fixed a couple of nits and it looks great. Check the screenshots:

NODE PREVIEW BEFORE

NODE PREVIEW AFTER

Status: Needs review » Needs work

The last submitted patch, 81: tweak_the_design_of_the-2341221-81.patch, failed testing.

The last submitted patch, 81: tweak_the_design_of_the-2341221-81.patch, failed testing.

lewisnyman’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new8.42 KB
new941.49 KB

Here's a reroll and a screenshot of it in action.

wim leers’s picture

  1. +++ b/core/modules/node/node.module
    @@ -155,6 +155,48 @@ function node_theme() {
    + * An admin theme can specify CSS files to make the front-end administration
    + * experience of in-place editing match the administration experience in the
    + * back-end.
    

    How is this related to in-place editing?

  2. +++ b/core/modules/node/node.module
    @@ -155,6 +155,48 @@ function node_theme() {
    +function node_library_info_alter(&$libraries, $extension) {
    

    This is the exact same logic as quickedit_library_info_alter(), which has been thoroughly analyzed, and which has proven to work well.

  3. +++ b/core/modules/node/node.module
    @@ -155,6 +155,48 @@ function node_theme() {
    +            $library['css']['theme']['/' . $theme_path . '/' . $path] = ['weight' => 20 ];
    

    This weight is the only change compared to quickedit_library_info_alter(). If we really need it, we should document why it's necessary.

  4. +++ b/core/modules/node/node.module
    @@ -155,6 +155,48 @@ function node_theme() {
    +}
    +
    +
    +/**
    

    Nit: two \ns, should be one.

Status: Needs review » Needs work

The last submitted patch, 85: tweak_the_design_of_the-2341221-84.patch, failed testing.

lewisnyman’s picture

Status: Needs work » Needs review
Issue tags: -Novice
StatusFileSize
new1.28 KB
new8.45 KB

Thanks for the review! Here are the changes.

Status: Needs review » Needs work

The last submitted patch, 88: tweak_the_design_of_the-2341221-88.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 88: tweak_the_design_of_the-2341221-88.patch, failed testing.

emma.maria’s picture

Issue summary: View changes
StatusFileSize
new47.48 KB
new78.92 KB
new61.17 KB
new38.01 KB

There are no longer any traces of the node preview bar in Bartik.

I noticed a few visual issues at mobile widths.

The dropdown section and back link do not sit next to each other at small widths and it looks messy - noticed on an iPhone 5.
 

 
With Deutsch at around 400px.
 

 
Also when testing in Chrome, the toolbar would appear over the preview bar if you scrolled through the content and then went back to the top.
 

 
However in iOS this wasn't the case and the preview bar left a toolbar sized gap above it no matter how much you scrolled.
 

 

lewisnyman’s picture

@emma.maria You're right, and we already have an issue for this: #2524284: The spacing of the buttons in the preview bar is cramped on narrow screens. Setting this back to needs review with that in mind.

lewisnyman’s picture

Status: Needs work » Needs review
emma.maria’s picture

StatusFileSize
new8.44 KB

Reroll

emma.maria’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new45.92 KB
new38.47 KB

The node preview styles no longer exist or referenced within Bartik ✔︎
Node preview now belongs to Seven and loads the files correctly ✔︎

Here are before and after screenshots.

Before

 
After

The node preview bar now has a yellow background to warn the user that the content is just a preview ✔︎
The overall design has been tidied up and I feel matches the Seven theme + style guide well ✔︎

I approve — RTBC!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 97: tweak_the_design_of_the-2341221-97.patch, failed testing.

The last submitted patch, 97: tweak_the_design_of_the-2341221-97.patch, failed testing.

jaxxed’s picture

strange test failure, I am re-queueing and will take a quick look at the test.

The last submitted patch, 97: tweak_the_design_of_the-2341221-97.patch, failed testing.

jaxxed’s picture

I can recreate the test error failure locally, and the same error does not occur for me without your patch (althought I do get a different error.) I wonder if your closure trick is tripping out PHP?

Corroboration would be helpful. Can someone else run the tests locally after applying the patch.

emma.maria’s picture

The fail started showing up after the hook added in #76. I can try and help but I do not know how to set up tests locally

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new646 bytes
new8.49 KB

It seems like there is a point in ConfigTranslationUiTest.php that sets the admin theme to '0'. We don't consider this in the alter_hook. I've added a check for it in the if statement.

jaxxed’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

error: patch failed: core/themes/seven/seven.info.yml:13

martins.kajins’s picture

Assigned: Unassigned » martins.kajins
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new6.02 KB

Tests which failed before, are not failing now.
I have a bit problems with testing, but i think it is just problems with my virtual box.

Status: Needs review » Needs work

The last submitted patch, 108: tweak_the_design_of_the-2341221-108.patch, failed testing.

emma.maria’s picture

+++ /dev/null
--- a/core/themes/seven/seven.info.yml
+++ b/core/themes/seven/seven.info.yml

+++ b/core/themes/seven/seven.info.yml
+++ b/core/themes/seven/seven.info.yml
@@ -10,8 +10,8 @@ libraries:

@@ -10,8 +10,8 @@ libraries:
  - seven/global-styling
 stylesheets-remove:
   - core/assets/vendor/jquery.ui/themes/base/dialog.css
-quickedit_stylesheets:
-  - css/components/quickedit.css
+node_preview_stylesheets:
+  - css/components/node-preview.css
 regions:
   header: 'Header'
   pre_content: 'Pre-content'
 

The patch is failing because you accidentally removed the quick edit stylesheet, the rest is fine :-)

martins.kajins’s picture

Status: Needs work » Needs review
StatusFileSize
new5.99 KB

@emma.maria I put back quick edit stylesheets

lauriii’s picture

I reviewed the PHP and it looks good for me.

emma.maria’s picture

Status: Needs review » Reviewed & tested by the community

Now that we have had a visual and a code review, let's do this!

*throws RTBC confetti in the air*

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 111: tweak_the_design_of_the-2341221-111.patch, failed testing.

Status: Needs work » Needs review
lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC.

lewisnyman’s picture

Status: Reviewed & tested by the community » Needs work

Nope, wait a second. We are missing the files that were added to the patch in comment #106

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new8.52 KB

Ok, I put back in those files.

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

Thank you. I manually tested this and it looks correct.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 118: tweak_the_design_of_the-2341221-118.patch, failed testing.

Status: Needs work » Needs review
jaxxed’s picture

Status: Needs review » Reviewed & tested by the community

tests passed, RTBC by @lewisnyman.

martins.kajins’s picture

T

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 118: tweak_the_design_of_the-2341221-118.patch, failed testing.

Status: Needs work » Needs review
mgifford’s picture

Status: Needs review » Reviewed & tested by the community

glitchy bot.. Not really RTBC'ing my own patch, really...

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

This should be done somewhere else than in Seven per. discussion that was had in DrupalCon Barcelona.

Bojhan’s picture

Assigned: martins.kajins » lewisnyman

Hmm, lets have Lewis chime in here yet - because we have don't really have a decision there yet.

lewisnyman’s picture

Assigned: lewisnyman » Unassigned
Priority: Normal » Major
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs issue summary update

This should be done somewhere else than in Seven per. discussion that was had in DrupalCon Barcelona.

This was discussed, but we ran out of time far before we reached a consensus. I still don't feel like I fully understand your concerns here Lauri. I'm happy to have this discussion in the #2566775: [Voltron patch] Move all remaining *.admin.theme.css to Seven.

For this issue, the concerns raised in #71 but @alexpott and the solution that came out of that in #73 still stands. We have to move this out of Bartik and right now the admin theme makes the most sense. We don't have another direction so far so kicking this back to RTBC so Alex can weigh in.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 118: tweak_the_design_of_the-2341221-118.patch, failed testing.

joelpittet’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new8.52 KB

Re-roll.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/node/node.module
@@ -155,6 +155,47 @@ function node_theme() {
+  if ($extension === 'node' && isset($libraries['drupal.node.preview']) && Drupal::config('system.theme')->get('admin') != '0' ) {

This != '0' is really weird. Where in ConfigTranslationUiTest does it do this - I couldn't spot it.

lewisnyman’s picture

@alexpott Good spot, looks like this code has been removed in #2571337: Node type title label cannot be translated in the UI. We can remove the check from here.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new646 bytes
new8.43 KB

Here's the reroll and the removal of the if statement. If this comes back green we should be good to go.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests
+++ b/core/modules/node/node.module
@@ -155,6 +155,47 @@ function node_theme() {
+            // Ensure it overrides any styling from the frontend theme.

It doesn't override any CSS from frontend theme, its loaded where module CSS which is before theme CSS. Either there is something wrong in the logic or the comment is wrong. Anyway do we want to give all the power for the admin theme? What about the case of having dark and light themes? What if those themes are dynamic?

lauriii’s picture

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new634 bytes
new8.42 KB

Good point, I've amended the comment with the correct effect/intention.

dawehner’s picture

Issue tags: +Needs screenshots

It would be nice to have a screenshot here.

lewisnyman’s picture

Issue summary: View changes
Issue tags: -Needs screenshots

Sure thing, added screenshots from #98 to the issue summary

dawehner’s picture

Thank you @LewisNyman

lauriii’s picture

Status: Needs review » Needs work

It would be nice to see test coverage that the CSS files are being added and maybe additionally if its simple enough for the order too. I think its also worth at least a manual test (automated test preferred) to ensure it works with base themes too.

lewisnyman’s picture

Issue tags: +rc deadline
wim leers’s picture

Status: Needs work » Reviewed & tested by the community

@lauriii:

It would be nice to see test coverage that the CSS files are being added and maybe additionally if its simple enough for the order too. I think its also worth at least a manual test (automated test preferred) to ensure it works with base themes too.

Note that quickedit.module has an identical feature: it allows admin themes to specify quickedit_stylesheets. Seven uses that to make in-place editing on the front-end be consistent with the back-end. See quickedit_library_info_alter(). To my great shame, there apparently is no test coverage for that. It was committed as part of #1824500: In-place editing for Fields in December 2012, and has not been broken once. But, it really should have test coverage. It slipped through the review cracks back then, and was forgotten until now.

So, I think it makes more sense to not hold this issue back on those tests, because Quick Edit should also get those tests. Furthermore, even if this were broken in some subtle way that all the manual testing so far has not yet uncovered: then it'd only affect pages adding the node/drupal.node.preview asset library. So the damage would be extremely isolated.

I think it's important this follows the same pattern as Quick Edit: just like Quick Edit shows some UI bits that should match the back-end's theme, so should this.

Moving back to RTBC.

lauriii’s picture

One more thing that should be considered before committing the fix as is the admin theme permissions that this patch might have to check.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 138: tweak_the_design_of_the-2341221-138.patch, failed testing.

lewisnyman’s picture

Issue tags: +rc target triage

Adding triage tag, if we can't do this now then we have to re-open #2384169: The node preview bar is not usable without Bartik, which is a major bug.

xjm’s picture

Thanks @LewisNyman! Can we add a more detailed explanation of why that's the case to the summary (e.g. <h3>Why this change should be committed during RC</h3>)? Also include any disruptions from the change.

Bojhan’s picture

Issue summary: View changes

Status: Needs work » Needs review
Bojhan’s picture

Updated per #148. The fail seems weird, rerunning tests.

xjm’s picture

Title: Tweak the design of the node preview bar to align with the Seven style guide and current toolbar designs, move styling into the admin theme » Node preview has usability issues, is difficult to use on mobile, not usable without Bartik, and does not align with the Seven style guide and current toolbar designs
Category: Task » Bug report

Giving a stronger title; "tweak" sounds like polish as opposed to a usability issue. Thanks!

xjm’s picture

Can someone clarify whether the bugs @emma.maria describes in #92 are fixed by this patch, or are out-of-scope bugs that will still need to be fixed later in #2524284: The spacing of the buttons in the preview bar is cramped on narrow screens?

webchick’s picture

I would feel a lot more comfortable evaluating this patch for RC target triage if the fix to make it work on mobile/not-Bartik were decoupled from the design changes. The former is a user-facing bug, and very easy to justify committing during RC, the latter feels like more of a minor version target at this point.

If for some reason they can't be split apart, the rationale for that would be good to understand.

lewisnyman’s picture

Status: Needs review » Needs work

@webchick They can be split up. We can definitely update the designs in a minor release if we move the styling to Seven, as it's unfrozen. Setting to needs work based on this.

lewisnyman’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new5.04 KB
new3.46 KB
new709.38 KB

Ok here's a patch the adds the old styling back into the Seven stylesheet.

Status: Needs review » Needs work

The last submitted patch, 156: node_preview_has-2341221-156.patch, failed testing.

The last submitted patch, 156: node_preview_has-2341221-156.patch, failed testing.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new3.52 KB

We've had this problem before in other issues where the admin theme is being set to '0' in some tests which throws a warning on this page. I've added the check back in.

Status: Needs review » Needs work

The last submitted patch, 159: node_preview_has-2341221-159.patch, failed testing.

chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.52 KB

Rerolled patch and fix warnings

manjit.singh’s picture

Version: 8.0.x-dev » 8.1.x-dev

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

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

xjm’s picture

Issue tags: -rc target triage
emma.maria’s picture

Issue tags: +Needs screenshots
chr.fritsch’s picture

Rerolled and added Screenshots

Image 1

Image 2

manjit.singh’s picture

Status: Needs review » Needs work
StatusFileSize
new213.8 KB

So the idea was, node preview bar not get hide any content but with the latest patch 'User account menu' is getting hidden. Screenshot attached.

FYI. I have disabled the background color of preview bar so that i can check the content.

previewbar

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

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pixelmord’s picture

Issue tags: +dcmuc16
catch’s picture

Title: Node preview has usability issues, is difficult to use on mobile, not usable without Bartik, and does not align with the Seven style guide and current toolbar designs » Node preview bar has usability issues, is difficult to use on mobile, not usable without Bartik, and does not align with the Seven style guide and current toolbar designs
Bojhan’s picture

Issue tags: -Needs screenshots
chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.76 KB
new490 bytes
new126.68 KB

Ok, i addressed the comment from #167

Preview bar issue

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

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now 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.

xjm’s picture

Issue tags: -rc deadline

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

borisson_’s picture

Status: Needs review » Needs work

This probably needs another redesign now that Claro is in core?

gábor hojtsy’s picture

It may already be entirely different in Claro, needs to be checked.

berdir’s picture

It's not, but it might be different in *Olivero*, because this really is about the frontend them, the backend theme currently has no control over it.

Tested quickly. Olivero is actually pretty decent I think, umami is completely broken. The approach here is about ensuring a consistent look no matter the frontend theme you use.

gábor hojtsy’s picture

That would be the realm of #2195695: Admin UIs on the front-end are difficult to theme though then as a concept?

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bnjmnm’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

The issue summary is referencing many no-longer-in-Drupal things. The summary needs to be updated to make this coherent.

I'm tempted to set this to closed (Outdated) as I'm not sure how beneficial the prior 189 comments would be to addressing any issues with this in Claro, etc, but I'll let someone else who has been more involved in that issue make that call more conclusively.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
Issue tags: +Bug Smash Initiative

It has been1 year and 3 months since @bnjmnm suggested closing this issue for reasons explained in their comment, #190. Since no one who has worked on this issue before has responded I think it is time to close this.