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

fix(toolbar): Do not import Button into toolbar #80880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Nov 16, 2024

Not all core components are supported inside the app/components/toolbar/* folder, Button is one of them.

What's going on inside this folder is we've created a new react context, and mounted the toolbar into it. So stuff like useOrganization and useRoutes doesn't work because we didn't inject the providers. So instead we need to make our own buttons and any other core components that depend on these, also core, providers.


By using <button> instead of <Button> the Custom Feature Flag override slide-out is fixed, and so is the "Overrides" list view.

These were previously working on dev but not prod. The reason is that there's a process.env.NODE_ENV invariant inside the core react context codepath, which runs differently depending on the build :(

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 16, 2024
@ryan953 ryan953 requested a review from a team November 16, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant