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

chore: rewrite Footer customization based on docusaurus 2.0.0-rc.1 #1114

Merged
merged 5 commits into from
Aug 4, 2022

Conversation

pepopowitz
Copy link
Collaborator

Partially addresses #1024

In the process of updating docusaurus in #1024, our customized Footer component became out-of-date. This PR rewrites that component based on the correct source, with no functional changes.

It includes a few other small tangential details:

  1. A README.md in the src/theme folder describing what lives there
  2. Notes on the ColorModeToggle component about when & why it was swizzled
  3. Remove an unused file (which was replaced by a previous upgrade & the docusaurus-gtm-plugin)
  4. Rewrite the ExternalLink icon based on the correct docusaurus source

Proof that the footer hasn't changed

image

Follow-up

  • After this is merged & deployed, test that MixPanel still sends messages in production! (According to this Slack thread) that's the only place I can test it. 😰 )

@pepopowitz pepopowitz added component:docs Documentation improvements, including new or updated content dx Documentation infrastructure typically handled by the Camunda DX team labels Aug 2, 2022
@pepopowitz pepopowitz self-assigned this Aug 2, 2022

function FooterLink({ to, href, label, prependBaseUrlToHref, ...props }) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One nice thing about newer versions of docusaurus -- they made it easier to "wrap" theme components, which allowed us to delete a lot of this file.

Comment on lines -8 to -15
.footerLogoLink {
opacity: 0.5;
transition: opacity 0.15s ease-in-out;
}

.footerLogoLink:hover {
opacity: 1;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These first two styles are from the classic theme, we can delete them because the theme takes care of them for us.

Comment on lines -17 to -41
/* Osano Styles */

.osano-cm-widget svg {
display: none;
}
.osano-cm-widget svg {
display: none;
}
.osano-cm-widget:focus,
.osano-cm-widget:hover {
opacity: 1;
transform: none;
}
.osano-cm-widget:active {
transform: translateY(1px);
}
.osano-cm-link {
color: #002f66 !important;
}
.osano-cm-close {
background: transparent !important;
}
.osano-cm-view--type_consent .osano-cm-list-item:nth-child(5) {
display: none;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These Osano styles are for the consent popup, but the ones that are actually used are in src/custom.css.

Copy link
Collaborator Author

@pepopowitz pepopowitz Aug 3, 2022

Choose a reason for hiding this comment

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

Visual proof that there is no regression in the consent popup due to removing these styles:

image

I say regression because @akeller raised concerns that the styles in the code do not match the styles given to us by marketing, which I will follow up on (and will not block the merge of this PR).

Copy link
Member

Choose a reason for hiding this comment

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

This was my 🗑️, but I followed up with you on Slack about some discrepancies and to check in with the web marketing team. This doesn't block this PR.

Copy link
Contributor

@christinaausley christinaausley left a comment

Choose a reason for hiding this comment

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

No changes on my end here!

Copy link
Member

@akeller akeller left a comment

Choose a reason for hiding this comment

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

I see no blocking issues and the CSS performs as expected. Thanks for cleaning this up! I love PRs that delete more than they add!!!

Regarding styles - Button styling is different on docs vs. camunda.com to match the respective button experience. Please don't change this because consistency should match the experience of the site.

The link is also a different color than I would expect.

image

@akeller
Copy link
Member

akeller commented Aug 3, 2022

That is by far the worst and laziest screenshot I've taken in my life, and I'd just like to apologize to the internet by letting everyone know I'm signing off for the day.

@pepopowitz
Copy link
Collaborator Author

Merging, and I'll deal with the cookie consent styling difference(s) in a follow-up.

@pepopowitz pepopowitz merged commit 405662d into main Aug 4, 2022
@pepopowitz pepopowitz deleted the pepopowitz/1024-beta-rewrite-footer branch August 4, 2022 15:57
lzgabel pushed a commit to lzgabel/camunda-platform-docs that referenced this pull request Aug 9, 2022
…amunda#1114)

* docs: add a description of the theme folder and some best practices for customizing

* docs: explain when & why ColorModeToggle was swizzled

* chore: remove unused gtag.js file

* chore: rewrite external link icon so that it's a straight swizzle

* chore: rewrite footer to swizzle current version of docusaurus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:docs Documentation improvements, including new or updated content dx Documentation infrastructure typically handled by the Camunda DX team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants