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

Docs: add enterprise admonition #1198

Merged
merged 10 commits into from
Jan 31, 2024
Merged

Conversation

ZPain8464
Copy link
Contributor

@ZPain8464 ZPain8464 commented Jan 24, 2024

Resolves https://github.com/pomerium/internal/issues/1696

This PR presents a first draft of the custom Enterprise admonition. For now, we're using an MUI icon as a stopgap until we decide on a different (or more custom) icon.

Copy link

netlify bot commented Jan 24, 2024

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit 2763c12
🔍 Latest deploy log https://app.netlify.com/sites/pomerium-docs/deploys/65ba9d8d513a94000860ce1b
😎 Deploy Preview https://deploy-preview-1198--pomerium-docs.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 configuration.

@ZPain8464 ZPain8464 marked this pull request as ready for review January 26, 2024 17:04
@ZPain8464 ZPain8464 requested a review from a team as a code owner January 26, 2024 17:04
@desimone
Copy link
Collaborator

Can you link to a few example pages for context @ZPain8464

@ZPain8464
Copy link
Contributor Author

@desimone I replaced the admonitions in Original User Context and Branding. I added a new one to PPL underneath the Criteria section.

@kenjenkins
Copy link
Contributor

Looks good to me! I like the purple.

What do you think about using the Mui "Business" icon instead?

Screen Shot 2024-01-26 at 9 33 07 AM

@ZPain8464
Copy link
Contributor Author

@kenjenkins I'm open to any icon here provided we all agree on it. The business one looks "enterprise-y" to me, I'd be fine with that.

@ZPain8464
Copy link
Contributor Author

@desimone what do you think of the business icon @kenjenkins proposed? @nhayfield if I could get your blessing on this as well that'd be great.

Copy link
Contributor

@nhayfield nhayfield left a comment

Choose a reason for hiding this comment

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

Lgtm

@ssveta7ak
Copy link
Contributor

Looks good for me. Also, I like the Mui business icon.

border-radius: 10px;
margin: 0 0 16px 0;
padding: 16px;
background-color: #f6f3ff;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll need a different set of colors for dark mode, as currently this has poor text contrast:

Screen Shot 2024-01-30 at 12 20 55 PM

import DefaultAdmonitionTypes from '@theme-original/Admonition/Types';
import BusinessIcon from '@mui/icons-material/Business';

import './types.css';
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're going to add a separate CSS file for this component, can it be scoped to just this component? (See src/theme/Footer/Logo/index.js for an example of using a CSS module.)

@ZPain8464
Copy link
Contributor Author

ZPain8464 commented Jan 31, 2024

@kenjenkins would you mind reviewing with the dark mode color palette? Also open to changing these a bit, but mainly wanted to make the text visible.

@ZPain8464 ZPain8464 requested a review from kenjenkins January 31, 2024 00:53
Copy link
Contributor

@kenjenkins kenjenkins left a comment

Choose a reason for hiding this comment

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

Thanks, the dark mode colors look much better to me.

I think the contrast may still be a little low... https://webaim.org/resources/contrastchecker/?fcolor=E3E3E3&bcolor=7161EF puts the text color contrast ratio at 3.51:1.

If we darken the background to say #4d25bb, we can bring that up to above 7: https://webaim.org/resources/contrastchecker/?fcolor=E3E3E3&bcolor=4D25BB.

Also, as discussed over Slack, I've gone ahead and simplified the component a little using [data-theme] rules in the CSS. (I also took the liberty of renaming the CSS module to styles.module.css, as that seems to be the convention from other components with style modules.)

@ZPain8464 ZPain8464 merged commit 4b3eae7 into main Jan 31, 2024
5 checks passed
@ZPain8464 ZPain8464 deleted the zpain/add-enterprise-admonition branch January 31, 2024 19:28
backport-actions-token bot pushed a commit that referenced this pull request Jan 31, 2024
* adds enterprise admonition

* adds inline styling

* adds styling to component

* swaps material ui icon

* adds enterprise admonition examples

* swaps mui icon and deletes gif example

* adds dark mode colors

* updates dark mode palette

* simplify dark mode styling

* updates hex code

---------

Co-authored-by: Kenneth Jenkins <[email protected]>
ZPain8464 added a commit that referenced this pull request Jan 31, 2024
Docs: add enterprise admonition (#1198)

* adds enterprise admonition

* adds inline styling

* adds styling to component

* swaps material ui icon

* adds enterprise admonition examples

* swaps mui icon and deletes gif example

* adds dark mode colors

* updates dark mode palette

* simplify dark mode styling

* updates hex code

---------

Co-authored-by: zachary painter <[email protected]>
Co-authored-by: Kenneth Jenkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants