Skip to content

Update navigation #603

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

Merged
merged 12 commits into from
Jul 20, 2023
Merged

Update navigation #603

merged 12 commits into from
Jul 20, 2023

Conversation

josepmartins
Copy link
Contributor

@josepmartins josepmartins commented Jul 17, 2023

Fixes https://github.com/github/primer/issues/2426

👓 : https://primer-6f994bf089-26493675.drafts.github.io/

  • Remove monospace font (SFMono?)
  • Remove dark background and update link colors (this is in preparation for color mode support)
  • Use UnderlineNav for top right links to provide the correct styling + selected states (example)
  • Remove "View components" and "React components" from top
  • Add "Brand" link in the top navigation
  • Add "About us" link (if it wasn't already added from https://github.com/github/primer/issues/2425)

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2023

🦋 Changeset detected

Latest commit: 5170f84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/gatsby-theme-doctocat Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@josepmartins josepmartins temporarily deployed to github-pages July 17, 2023 15:57 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 18, 2023 08:57 — with GitHub Actions Inactive
@josepmartins josepmartins changed the title Remove mono font Update Doctocat navigation Jul 18, 2023
@josepmartins josepmartins changed the title Update Doctocat navigation Update navigation Jul 18, 2023
@josepmartins josepmartins temporarily deployed to github-pages July 18, 2023 09:07 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 18, 2023 09:39 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 18, 2023 09:46 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 18, 2023 09:52 — with GitHub Actions Inactive
Copy link
Contributor

@mperrotti mperrotti left a comment

Choose a reason for hiding this comment

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

I used the Canary release to test this locally in primer/design and everything looked as I'd expect. 👍

- Remove monospace font
- Remove dark background and update link colors
- Use UnderlineNav for top right links to provide the correct styling
- Remove "View components" and "React components" from top and leave "Brand" and "About"
Copy link
Contributor

Choose a reason for hiding this comment

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

@emilybrick - are we really ready to remove these? I think there are still some React-specific and Rails-specific pages in those sections. Maybe this isn't actually an issue though...when I tested with a local build of primer/design, they were still there because they were still defined in primer/design's primer-nav.yml

(non-blocking feedback)

- Remove monospace font
- Remove dark background and update link colors
- Use UnderlineNav for top right links to provide the correct styling
- Remove "View components" and "React components" from top and leave "Brand" and "About"
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little strange that there's no navigation item for the "main" docs. How do I get back to primer.style/design if I navigate to Brand?

Copy link
Contributor Author

@josepmartins josepmartins Jul 19, 2023

Choose a reason for hiding this comment

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

That's a good point 🤔 . I guess we shouldn't release this changes until this is done? https://github.com/github/primer/issues/2428? @emilybrick

EDIT: Just learned that primer.style redirects to https://primer.style/design, so the github logo and the Primer design system title in the top navigation would always bring you back to primer.style/design

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's ok to release without the homepage redesign. It just felt strange that the "main" Primer docs don't have their own item in the UnderlineNav.

Copy link
Contributor

@emilybrick emilybrick Jul 20, 2023

Choose a reason for hiding this comment

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

Hey chiming in -

As mentioned the Primer Design System link is the link to the root URL (primer.style, + primer.style/design which will eventually just be primer.style)
Screenshot 2023-07-20 at 10 44 48 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm ok with this if everybody else is

mr: 2
}}
>
<UnderlineNav.Link key={index} href={item.url} selected={item.url === path}>
Copy link
Contributor

Choose a reason for hiding this comment

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

item.url === path may return false if item.url is something like "https://primer.style/brand", and path is something like "/brand".

I'm not sure if this is actually an issue, but it's something to be aware of when we deploy to prod.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Should we go with something like this instead?

selected = {item.url === siteMetadata.header.url + path }

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try it! Maybe we can test this by opening a draft PR in primer/design so we can test a preview deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

preview deployments generate unique domains like https://primer-6f994bf089-26493675.drafts.github.io/ so I don't think using the header.url will work 😱 . I think there's only one way to know 🚢 🤣

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's do it :shipit: 🤞

@josepmartins josepmartins temporarily deployed to github-pages July 19, 2023 08:10 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 19, 2023 09:03 — with GitHub Actions Inactive
@josepmartins josepmartins deleted the josepmartins/test branch July 19, 2023 09:27
@josepmartins josepmartins restored the josepmartins/test branch July 19, 2023 09:28
@josepmartins josepmartins reopened this Jul 19, 2023
@josepmartins josepmartins temporarily deployed to github-pages July 19, 2023 09:31 — with GitHub Actions Inactive
@josepmartins josepmartins temporarily deployed to github-pages July 19, 2023 14:48 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants