Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ DOP-4791 introduces new next/prev button #1156

Merged
merged 6 commits into from
Jul 9, 2024
Merged

✨ DOP-4791 introduces new next/prev button #1156

merged 6 commits into from
Jul 9, 2024

Conversation

caesarbell
Copy link
Collaborator

@caesarbell caesarbell commented Jul 3, 2024

Stories/Links:

DOP-4791

Current Behavior:

MongoDB Atlas

Staging Links:

Staged: MongoDB Atlas

Staged MongoDB Manual

Notes:

  • Introduces the new next/prev component which is used at the bottom of the docs page to navigate to the next section.
  • Proposes the use of conditional class names, which I believe allows us to use static styling. It is a proposal, so please oppose if there are any opinions. I battled with myself if I should use dynamic styles aka returning the css`` via a function, but seeing one gives us static styles and the other dynamic styles, I went with the static.

Figma

Discussion with the design team

README updates

    • This PR introduces changes that should be reflected in the README, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README

@caesarbell caesarbell marked this pull request as ready for review July 3, 2024 22:44
Copy link
Collaborator

@mayaraman19 mayaraman19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks really good! i'm going to leave approval for when other members of the team have gotten a chance to review things + discuss conditional class names.

image one thing i noticed is the hover on light mode seems a litttle bit low contrast? i don't see anything on the figma, so maybe something to check with design?

import { theme } from '../theme/docsTheme';
import { getPageTitle } from '../utils/get-page-title';
import Link from './Link';

const StyledContainer = styled.div`
const styledContainer = css`
padding-top: 2em;
padding-bottom: 2.5em;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i noticed in the figma that we want the space between the bottom of the content and the top of the next/prev button to be 88px, although I'm not sure how strict that is

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mayaraman19 good question, let me get a confirmation from the design team.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mayaraman19 the PR has been updated.

@mayaraman19
Copy link
Collaborator

mayaraman19 commented Jul 8, 2024

@caesarbell I think now it might have too much space? since the margin is 88px and there is still padding as well

image

do you want to try removing the padding-top maybe? will defer to you 👍 although, i'm not sure if the spacing should also include the content's margin/padding.

Copy link
Collaborator

@rayangler rayangler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes generally look good. I saw that there was a separate design for mobile screen sizes in the Figma. Is that something we still need to implement?

@caesarbell
Copy link
Collaborator Author

Code changes generally look good. I saw that there was a separate design for mobile screen sizes in the Figma. Is that something we still need to implement?

I have confirmation from the design team to implement the stacking for mobile. I will update this PR to reflect that.

@caesarbell
Copy link
Collaborator Author

caesarbell commented Jul 8, 2024

@mayaraman19 @rayangler , I removed the padding-top but kept the padding-bottom

image

@caesarbell
Copy link
Collaborator Author

caesarbell commented Jul 8, 2024

The spacing should be correct for mobile as well
image

@caesarbell caesarbell requested a review from rayangler July 8, 2024 20:30
Copy link
Collaborator

@mmeigs mmeigs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so great. And your styling is really clear.

There is one odd piece of the design that has made the spacing slightly different. In the mobile column layout, they have oddly given us the space from the bottom button to the TEXT of the upper button... That doesn't jive with normal block css. So, inherently our 64px rowgap is actually a bigger space than theirs.

I just inspected it further and the space between the two buttons (rather than using the text) is 51px. Could we use that or ask design if that's the correct amount?

Attaching an awful photo. I couldn't take a screenshot while holding down option lol
Screenshot 2024-07-09 at 9 54 30 AM

const titleSpanStyling = css`
line-height: 28px;
--hover-text-decoration-color: var(--underline-color) !important;
const commonNextPrevTextStyling = css`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

total nit: Can we name this without common because it makes me think it's reused somewhere else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmeigs, thank you for your feedback. I renamed it to be a less confusing.

import { theme } from '../theme/docsTheme';
import { getPageTitle } from '../utils/get-page-title';
import Link from './Link';

const StyledContainer = styled.div`
padding-top: 2em;
const styledContainer = css`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit: Can we name it differently because it's not actually using styled anymore? I've seen patterns where using css would be named ___styles or ___styling or ___style.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmeigs, I opt for __styling to keep consistent with the other styles within this component.

@caesarbell
Copy link
Collaborator Author

it looks really good! i'm going to leave approval for when other members of the team have gotten a chance to review things + discuss conditional class names.

image one thing i noticed is the hover on light mode seems a litttle bit low contrast? i don't see anything on the figma, so maybe something to check with design?

I can check with the design team, but it is using LG hover styles + dark mode.

@caesarbell caesarbell requested a review from mmeigs July 9, 2024 16:56
@caesarbell caesarbell merged commit 9860dbf into main Jul 9, 2024
4 checks passed
@caesarbell caesarbell deleted the DOP-4791 branch July 9, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants