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

Create doc banner #11464

Merged
merged 14 commits into from
Feb 13, 2023
Merged

Create doc banner #11464

merged 14 commits into from
Feb 13, 2023

Conversation

LizBaker
Copy link
Contributor

@LizBaker LizBaker commented Feb 9, 2023

This adds a dismiss-able banner to specific docs based on frontmatter. When dismissed a value is set in local storage unique to the doc title. You can test this out on /docs/mlops/get-started/intro-mlops/ and /docs/mlops/bring-your-own/mlops-byo/ which have temporary banners
fyi if you are logged into production it shouldn't show up at all 👀

TODO

  • delete temp banner frontmatter
  • design tweaks

screenshot

@LizBaker LizBaker requested a review from a team as a code owner February 9, 2023 21:26
@LizBaker LizBaker requested review from clarkmcadoo and tabathadelane and removed request for a team February 9, 2023 21:26
@github-actions github-actions bot added this to Hero to triage in Docs PRs and Issues Feb 9, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Hi @LizBaker 👋

Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.

Gatsby Cloud will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 20 to 30 minutes).

@gatsby-cloud
Copy link

gatsby-cloud bot commented Feb 9, 2023

✅ docs-website-develop deploy preview ready

@@ -34,6 +37,8 @@ const splitTOCTitle = (title = '') => {
return [titleText.join(' '), slug];
};

const bannerHeight = '78px';
Copy link
Contributor

Choose a reason for hiding this comment

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

can we SCREAMING_SNAKE_CASE this?

tabathadelane
tabathadelane previously approved these changes Feb 10, 2023
Copy link
Contributor

@tabathadelane tabathadelane left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@sunnyzanchi sunnyzanchi left a comment

Choose a reason for hiding this comment

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

looks great! just left a couple comments

src/templates/docPage.js Outdated Show resolved Hide resolved
src/components/DocPageBanner.js Outdated Show resolved Hide resolved
sunnyzanchi
sunnyzanchi previously approved these changes Feb 13, 2023
Copy link
Contributor

@sunnyzanchi sunnyzanchi left a comment

Choose a reason for hiding this comment

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

✨ ✅ ✨

@LizBaker LizBaker merged commit 4290d9e into develop Feb 13, 2023
@LizBaker LizBaker deleted the liz/doc-banner branch February 13, 2023 23:09
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.

None yet

4 participants