Problem/Motivation

I've just noticed in dev-1.x c490124 the drawer in is missing the drop shadow in Safari 17.4.1 (In Firefox and Edge the drop shadow is shown:

the new navigation sidebar with the drawer expanded for the structure sub menu

Steps to reproduce

  1. Install the Navigation module
  2. Open the site in Safari
  3. Hover over "Shortcuts" in the toolbar
  4. Confirm that the shadow is showing under the drawer

Proposed resolution

Changes the drop shadow to use a box-shadow because the type of shape is rectangle and Safari supports that.

GIF that displays no visual differences in Chrome and Safari:

A two frame animated image switching between Safari and Chrome with a box shadow on MacOS.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Issue fork drupal-3438878

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rkoller created an issue. See original summary.

ckrina’s picture

Please be aware of #3405006: The footer shadow disappears when a button is hovered because maybe the work here can close that other issue.

ckrina’s picture

Project: Navigation » Drupal core
Version: 1.x-dev » 11.x-dev
Component: Code » navigation.module
ckrina’s picture

Issue tags: +Portland2024, +Novice

skyriter made their first commit to this issue’s fork.

skyriter’s picture

StatusFileSize
new964.22 KB

I added this merge request during the Portland DrupalCon 2024 Contribution day.

skyriter’s picture

Status: Active » Needs review

Could someone take a look at this when they have a moment?

scottatdrake’s picture

I am not a front end expert but I imagine the values for -webkit-box-shadow and filter should be consistent. In the original CSS, the filter uses pixel values (px), but the added -webkit-box-shadow uses rem units.

gauravvvv’s picture

You can directly use box-shadow.

box-shadow:
      0 0 72px rgba(0, 0, 0, 0.2),
      0 0 8px rgba(0, 0, 0, 0.04),
      0 0 40px rgba(0, 0, 0, 0.06);

As box shadow is supported in safari browser, there is no need of using -webkit-box-shadow
Also, for consistency use px units over rem here. thanks

skyriter’s picture

@marky was mentoring at my table and helped me in my first time contribution.

skyriter’s picture

UPDATE: I just read the comment by @gauravvvv, who said the same thing yesterday. Thank you.

I'm continuing with this work. Whereas yesterday, I added a -webkit-drop-shadow to maintain Safari UI parity with Chrome and Firefox, I realized that the type of shape we are putting the shadow on was a rectangle and should be visually identical with box-shadow, which Safari supports. So I'm going to update the code accordingly.

skyriter’s picture

Compared in a visual diff tool both the Safari and Chrome output, and it was the same.

mradcliffe’s picture

Issue summary: View changes

I updated the issue summary to add the proposed resolution that @skyriter mentioned in #12.

mradcliffe’s picture

Issue summary: View changes

I embedded the gif in the issue summary as well.

mradcliffe’s picture

Issue summary: View changes

We should also add the steps to reproduce to the issue summary rather than in the merge request comment, @skyriter.

skyriter’s picture

Thank you for all your help, @mradcliffe. Those steps are now here in this issue. This should be ready once more to be reviewed.

ahsannazir’s picture

StatusFileSize
new775.45 KB

The changes look fine and are working as expected on safari as well.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe this one has been tested and working fine in safari. Issue summary looks good also.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

ahsannazir’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

There's already a branch for 11.x with an MR, don't think we need to start a new one.

ahsannazir changed the visibility of the branch 3438878-regression-the-drawer to hidden.

ahsannazir’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @omahane

Test failure is unrelated was fixed when #3208247: After deleting a translated article, search wants to reindex it was reverted.

nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 6fc1e6f2e9 to 11.x and 1f7b5b3b4c to 11.0.x and b17eca1c91 to 10.4.x and 590fb5278d to 10.3.x. Thanks!

nod_’s picture

  • nod_ committed 590fb527 on 10.3.x
    Issue #3438878 by skyriter, ahsannazir, rkoller, ckrina, mradcliffe,...

  • nod_ committed b17eca1c on 10.4.x
    Issue #3438878 by skyriter, ahsannazir, rkoller, ckrina, mradcliffe,...

  • nod_ committed 1f7b5b3b on 11.0.x
    Issue #3438878 by skyriter, ahsannazir, rkoller, ckrina, mradcliffe,...

  • nod_ committed 6fc1e6f2 on 11.x
    Issue #3438878 by skyriter, ahsannazir, rkoller, ckrina, mradcliffe,...

Status: Fixed » Closed (fixed)

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

jacobupal’s picture

Issue tags: -Novice