facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.63k stars 8.51k forks source link

Announcement bar text being cut off #7815

Open andrewsemchism opened 2 years ago

andrewsemchism commented 2 years ago

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

Announcement bar text is being cut off on some display sizes if the announcement is long enough.

View demo on codesandbox. In this example the bug will occur at a screen size of 997px.

Reproducible demo

https://codesandbox.io/s/blissful-currying-nqeocf?file=/docusaurus.config.js&resolutionWidth=997&resolutionHeight=675

Steps to reproduce

  1. Add an announcement that is sufficiently long
  2. Shrink the window size down and the issue should appear when the announcement occupies more than 1 line.

Expected behavior

The announcement bar should resize to fit the whole message.

Actual behavior

The announcement bar is too small to fit the whole message. It clips the message vertically.

image

Your environment

No response

Self-service

Josh-Cena commented 2 years ago

Could be a regression from https://github.com/facebook/docusaurus/pull/5430

slorber commented 2 years ago

Probably not a regression, this is what we had before:

https://deploy-preview-5000--docusaurus-2.netlify.app/

CleanShot 2022-07-25 at 12 08 54

slorber commented 1 year ago

Related to https://github.com/facebook/docusaurus/issues/8370, we should probably fix both issues at once ensuring an announcement bar with dynamic height is possible and does not mess up with the docs layout