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

refactor(theme-classic): split AnnouncementBar, increase z-index, use shadow #7940

Merged
merged 2 commits into from Aug 12, 2022

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Aug 11, 2022

Motivation

  • Split theme AnnouncementBar component: extract CloseButton + Content.
  • Use z-index to make it render just above the navbar
  • Use shadow instead of border-bottom (requiring the z-index change to work)

Note: I didn't extract a Layout/Container component as it wasn't very easy to design those properly without introducing some extra dom nodes.

Test Plan

preview vs prod (almost not visible in dark mode), subtle changes only: shadow instead of border + 1px additional space.

Before:

CleanShot 2022-08-11 at 12 23 57@2x

After:

CleanShot 2022-08-11 at 12 23 33@2x

Test links

Deploy preview: https://deploy-preview-7940--docusaurus-2.netlify.app/

Related issues/PRs

#7827

- z-index above navbar
- use shadow instead of border
@slorber slorber added pr: polish This PR adds a very minor behavior improvement that users will enjoy. domain: theme Related to the default theme components labels Aug 11, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 11, 2022
@netlify
Copy link

netlify bot commented Aug 11, 2022

[V2]

Name Link
🔨 Latest commit ec65a40
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62f4d8d1de891c00085c0eee
😎 Deploy Preview https://deploy-preview-7940--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 78 🟢 98 🟢 100 🟢 100 🟠 80 Report
/docs/installation 🟠 82 🟢 100 🟢 100 🟢 100 🟢 90 Report

@github-actions
Copy link

Size Change: +740 B (0%)

Total Size: 813 kB

Filename Size Change
website/build/assets/css/styles.********.css 111 kB +30 B (0%)
website/build/assets/js/main.********.js 608 kB +680 B (0%)
website/build/index.html 40.7 kB +30 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 52.5 kB

compressed-size-action

@slorber slorber merged commit 53bb030 into main Aug 12, 2022
@slorber slorber deleted the slorber/announcement-bar-refactors branch August 12, 2022 10:34
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Aug 12, 2022
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Sep 28, 2022
slorber added a commit to adnanhashmi09/docusaurus that referenced this pull request Oct 6, 2022
@slorber
Copy link
Collaborator Author

slorber commented Oct 6, 2022

FYI the z-index change is reverted in #8163 because of facebookincubator/infima#275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus CLA Signed Signed Facebook CLA domain: theme Related to the default theme components pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants