Repository navigation
Show mini nav - #17075
Show mini nav#17075OlwenPearce wants to merge 27 commits into
Conversation
This was useful for testing but not to keep in
ff71550 to
5ede409
Compare
🚀 Image pushed to AWS ECRImage digest: 🐛 Run the image locallyThe following can be used to run the image locally: # Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:c4f0a2b45267523592079170773588d96cc5764064f7f61e36543d74114d3a01"
# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-show-mini-nav"
# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-33948"
# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"
IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/artifacts --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering/dotcom-rendering${IMAGE_IDENTIFIER}"
# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
# Pull the image
docker pull $IMAGE
# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGEFrom guardian/actions-ecr. |
Instead of section colour
…into show-mini-nav
The mini nav is on a card and so does not card about this
| .video-container:not( | ||
| ${isLoopAndInLoopClickTestVariant | ||
| ? `.cinemagraph, .loop` | ||
| : `.cinemagraph`} | ||
| ):hover, |
There was a problem hiding this comment.
is the loop / cinemagraph hover behaviour part of this PR
| customSubNav: CustomSubnav; | ||
| renderingPage: RenderingPage; | ||
| pageId: string; | ||
| pageId?: string; |
There was a problem hiding this comment.
is there a reason this is now optional?
There was a problem hiding this comment.
The pageId is used on the subnav to bold the page the subnav is currently on. This doesn't make sense in the context of a card - the card doesn't have a page Id to pass in when calling this, and we don't need to display it either
| * article min-height, otherwise the outer row remains taller than the | ||
| * inline list itself. | ||
| */ | ||
| min-height: 0; |
There was a problem hiding this comment.
Would removing this min-height altogether work?
There was a problem hiding this comment.
I did try to do it without this - the 0 here is an override of the article settings. Without it, my attempts to reduce the padding did nothing because it was inheriting the shared article minimum height and refusing to go below it. This is very much "I found a way to make it work" though - suggestions for other approaches are welcome
| const articleHeaderGapStyles = css` | ||
| margin-left: ${space[1]}px; | ||
| padding-left: ${space[1]}px; | ||
| `; |
There was a problem hiding this comment.
How come we're using a mix of margin and padding?
| padding-left: 1px; | ||
| margin-left: 1px; |
There was a problem hiding this comment.
should these be space values?
| <div | ||
| className="mini-nav" | ||
| css={css` | ||
| position: relative; | ||
| z-index: ${getZIndex('card-nested-link')}; | ||
| min-width: 0; | ||
| --custom-subnav-header-text: ${palette( | ||
| trail.miniNavData.header.dotcomPath | ||
| ? '--card-kicker-text' | ||
| : '--card-headline', | ||
| )}; | ||
| --masthead-nav-link-text: ${palette('--card-headline')}; | ||
| --masthead-nav-link-text-hover: ${palette( | ||
| '--card-headline', | ||
| )}; | ||
| `} | ||
| > |
There was a problem hiding this comment.
I wonder if this could be its own component MiniNav? Unsure how it relates to CustomSubNav – is it just a wrapper element?
What does this change?
Renders a mini nav on a card, when provided and supported
This includes some general tweaks to support it:
Why?
New feature
How has this change been tested?
Tests
Automated tests
Unit and Storybook tests added
Manual testing
I tested local running with local frontend and fonts tool. Steps were
-->
Screenshots
Here it is deploying on a local run
I have indented it slightly to fix the below tab issue, and visually separate it from the title

I've justified this by it being slightly indented on fimga, but this may not be intentional

In general I have made padding consisent with figma (to my eyes)


It's worth looking on storybook because this does look different with different styles - e.g. the apperence here, which is overall fine but the section looks much smaller with the image underneath and no title
