Problem/Motivation

When a user clicks on preview button, then the logo overlaps with view mode text and also view mode select box is show full width, which not look good.

I have attached the screen shot for more clarity:
Before:
before

Proposed resolution

Move view mode select box to after the label, we need to change select box width.

Update: Also proposing to make the preview form sticky, which overrides the default node.preview styling that makes it fixed.

Comments

bandanasharma created an issue. See original summary.

bandanasharma’s picture

StatusFileSize
new328 bytes

Added the patch for select box width.
Can be also add some background on node preview header to resolve logo overlap issue?

bandanasharma’s picture

Status: Active » Needs review
serg2’s picture

Status: Needs review » Needs work

Thank you for the bug and patch.

I have changed to 'Needs work' because we need to make any styling fixes both to css and scss, as the theme supports both.

bandanasharma’s picture

Status: Needs work » Needs review
StatusFileSize
new2.86 KB

@serg2 thanks for the review.
Make changes according to your comment and add updated patch.

sim_1’s picture

Issue summary: View changes
StatusFileSize
new127.33 KB
new84.5 KB
new3.27 KB
new1.09 KB

I tested your patch and it worked to shrink the size of the select box, but because the preview form is fixed at the top of the page, it still overlaps with whatever's there. I'd like to suggest that we make it sticky so that keeps it's place at the top, but also doesn't overlap with other page elements quite as much.

After changing the form width:
after changing form width

After making the form sticky instead of fixed:
after making sticky instead of fixed

Attaching an updated patch and and interdiff.

sim_1’s picture

Component: Code » User interface
StatusFileSize
new3.47 KB
new1.28 KB

Ok, after revisiting this patch, I think that the simplest possible solution is probably our goal. And so I made a small change to the previous patch to remove any extra styling and just keep the view-mode form positioned relatively instead of sticky or fixed.

sim_1’s picture

StatusFileSize
new1.94 KB

Ok, so I needed this patch for a project but it didn't apply cleanly so I re-rolled it. I also realized that I had forgotten to make the change in the STARTER theme, and I thought better of my sneaky plan to get in code style fixes all in the same patch. So here's the simplified patch with the change also made in the STARTER theme so people will have it even if they turn off the base theme's CSS.

frob’s picture

Status: Needs review » Reviewed & tested by the community

It worked for me, I tested against a fresh install of zurb_foundation 8.x-6.x tested the sub-theme as well.

  • sim_1 committed 964a6d2 on 8.x-6.x
    Issue #2966672 by sim_1, bandanasharma, serg2, frob: View mode select...
sim_1’s picture

Status: Reviewed & tested by the community » Fixed

Great, thank you for the review @frob. Marking as fixed after committing the last patch and updating the 8.x-6.x-dev page with the release notes for this patch.

Status: Fixed » Closed (fixed)

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