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

feat(v2): add isCloseable property for theme-classic announcement bar #3388

Merged
merged 3 commits into from
Sep 2, 2020

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Sep 1, 2020

Motivation

User not always should be able to close the announcement bar. The decision should be on the docs creator side.

This PR adds isCloseable property to the theme-classic announcement bar options, which defaults to true, to retain the previous behavior.

The documentation has been also updated within this PR.

I'm open to rename the property, this was the first, good idea which came to my mind. 🙂

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Change has been tested locally with Docusaurus V2 website.

Related PRs

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Sep 1, 2020

Deploy preview for docusaurus-2 ready!

Built with commit eaea10e

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

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 1, 2020
@Simek
Copy link
Contributor Author

Simek commented Sep 1, 2020

I have added in the second commit fix for the non-cloaseable announcement bar style.

Unfortunately in the way which announcement bar structure and styling is implemented margin-right: 55px is not working "as intend" on the resolution above 1024px due to width: 100% style of announcementBarContent.

To reserve the place for the close button on the right side this can be changed to padding-right on larger resolutions or the general announcementBarContent style can be adjusted. I can address this in the separate PR.

@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Sep 2, 2020
@slorber
Copy link
Collaborator

slorber commented Sep 2, 2020

Thanks.

I don't see any issue with both true/false value, that seems fine

@slorber slorber merged commit e8e16a4 into facebook:master Sep 2, 2020
@slorber
Copy link
Collaborator

slorber commented Sep 3, 2020

Released in alpha 63 🎊 please spread the word 🙏 and tell me if this works fine for you
https://twitter.com/docusaurus/status/1301562737693138944
https://github.com/facebook/docusaurus/releases/tag/v2.0.0-alpha.63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants