Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions airflow-core/src/airflow/ui/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,6 @@ export const customConfig = defineConfig({

export const system = createSystem(defaultConfig, customConfig);

// Once the system is created, make it globally available to dynamically imported React plugins.
Reflect.set(globalThis, "ChakraUISystem", system);

// Utility function to resolve CSS variables to their computed values
// See: https://github.com/chakra-ui/panda/discussions/2200
export const getComputedCSSVariableValue = (variable: string): string =>
Expand Down
2 changes: 0 additions & 2 deletions dev/react-plugin-tools/react_plugin_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ For development and testing, use `pnpm dev` which will:
- Start a development server on port 5173
- Load the component using `src/dev.tsx` entry point
- Enable hot module replacement
- Chakra Theme provided for local development is the default one, but in production when the plugin is loaded into the Airflow Core UI,
it will inherit the main application theme for a consistent look and feel.

### Library Configuration

Expand Down
24 changes: 0 additions & 24 deletions dev/react-plugin-tools/react_plugin_template/src/global.d.ts

This file was deleted.

8 changes: 1 addition & 7 deletions dev/react-plugin-tools/react_plugin_template/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { FC } from "react";
import { ColorModeProvider } from "src/context/colorMode";
import { HomePage } from "src/pages/HomePage";

import { localSystem } from "./theme";
import { system } from "./theme";

export interface PluginComponentProps {
// Add any props your plugin component needs
Expand All @@ -33,12 +33,6 @@ export interface PluginComponentProps {
* Main plugin component
*/
const PluginComponent: FC<PluginComponentProps> = (props) => {

// Use the globalChakraUISystem provided by the Airflow Core UI,
// so the plugin has a consistent theming with the host Airflow UI,
// fallback to localSystem for local development.
const system = (globalThis.ChakraUISystem) ?? localSystem;

return (
<ChakraProvider value={system}>
<ColorModeProvider>
Expand Down
Loading