-
Notifications
You must be signed in to change notification settings - Fork 862
[wip] flyout manager #8876
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
[wip] flyout manager #8876
Conversation
packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This is a work-in-progress pull request that introduces a flyout manager system to the EUI component library. The changes implement a managed flyout system that allows multiple flyouts to be stacked and coordinated through a centralized context provider.
- Adds a new ManagedFlyoutProvider to the main EuiProvider for global flyout management
- Implements a complete flyout management system with context, reducer, and hooks
- Creates a new managed flyout API that can be used alongside the existing unmanaged flyouts
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/eui/src/components/provider/provider.tsx | Integrates ManagedFlyoutProvider into the main EuiProvider component tree |
| packages/eui/src/components/provider/component_defaults/component_defaults.tsx | Adds commented-out type definitions for future managed flyout component defaults |
| packages/eui/src/components/flyout/managed/types.ts | Defines TypeScript interfaces and types for the managed flyout system |
| packages/eui/src/components/flyout/managed/reducer.ts | Implements the state management reducer for flyout operations |
| packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx | Provides Storybook examples demonstrating managed flyout usage |
| packages/eui/src/components/flyout/managed/index.ts | Exports the public API for the managed flyout system |
| packages/eui/src/components/flyout/managed/hooks.ts | Implements React hooks for interacting with the flyout manager |
| packages/eui/src/components/flyout/managed/eui_flyout_managed.tsx | Core managed flyout component with registration and lifecycle management |
| packages/eui/src/components/flyout/managed/eui_flyout.tsx | Unified flyout component that supports both managed and unmanaged modes |
| packages/eui/src/components/flyout/managed/context.tsx | React context provider and related components for flyout state management |
| packages/eui/src/components/flyout/index.ts | Updates flyout exports with commented references to managed flyouts |
| packages/eui/src/components/flyout/flyout.tsx | Exports internal props interface for use in managed flyouts |
| packages/eui/src/components/flyout/flyout.stories.tsx | Adds commented-out examples for component defaults integration |
| isOpen.current = true; | ||
| } | ||
| if (isOpen.current && !isRegistered) { | ||
| onClose?.({ type: 'external', flyoutId } as any); |
Copilot
AI
Jul 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'as any' bypasses TypeScript's type checking. Define a proper type for the onClose event parameter instead of using type assertion.
| onClose?.({ type: 'external', flyoutId } as any); | |
| onClose?.({ type: 'external', flyoutId }); |
| setRenderedManagedFlyouts((prev) => prev.filter((f) => f.id !== id)); | ||
| dispatch({ type: 'CLOSE_FLYOUT', id }); | ||
| if (userOnClose) { | ||
| userOnClose({ type: 'internal', flyoutId: id } as any); |
Copilot
AI
Jul 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'as any' bypasses TypeScript's type checking. Define a proper type for the onClose event parameter instead of using type assertion.
packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/flyout/managed/managed_flyouts.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/flyout/managed/eui_flyout_managed.tsx
Outdated
Show resolved
Hide resolved
579f17f to
50291ee
Compare
|
@clintandrewhall you'll want to retarget this to |
50291ee to
68b8592
Compare
💔 Build Failed
Failed CI StepsHistory
|
💔 Build Failed
Failed CI StepsHistory
|
1fb4398 to
10b6549
Compare
780899d to
67b1f48
Compare
6c9eac3 to
d811dac
Compare
d199818 to
32edff0
Compare
Summary
WIP