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(styleguide): auto-collapse Figma embed for known non-Codecademy-admin user #2795

Closed

Conversation

JoshuaKGoldberg
Copy link
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 12, 2023

Overview

Auto-collapses the Figma embed in Storybook docs pages if the Codecademy user is loaded and not an admin.

Context: I'd like to show off Gamut to people in my talks about design systems. But the giant Figma embeds are getting in the way for non-employees like me. I chatted with @dreamwasp who chatted with the team about the strategy in this PR: auto-collapsing them by default if we know the user isn't a Codecademy admin.

I'm getting Uncaught Error: Cannot find module '@codecademy/variance' locally (and yes, I did yarn build from the root). So I haven't tried it out locally.

PR Checklist

I can't do any of these things :c

  • Related to designs:
  • Related to JIRA ticket: [ABC-123]
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

Don't make me tap the sign.

PR Links and Envs

i don't know what all this is :c sorry

Repository PR Link PR Env
Monolith Monolith PR Monolith Env
Portal Portal Link Portal Env
Another Repo Another Link Another Env

Comment on lines +14 to +17
onClick={(event) => {
console.log("Without an onClick, is this where we'd save preference?");
console.log('DOM event:', event);
}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pending storybookjs/addon-designs#216 and/or my ability to run this all locally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now that storybookjs/addon-designs#217 is in, once Gamut is updated to the latest Storybook then we can get this working!

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.

2 participants