Skip to content

Feature Request: Advanced Animations, Responsive UI, Grid, Media, Overlays, and File Attachments #2967

Description

@muhammad-fiaz

Overview

I would like to request expanding GPUI Kit with more comprehensive out of the box support for animations, transitions, responsive layouts, dialogs, popups, containers, grids, media, content overlays, file attachments, folders, and drag and drop.

GPUI Kit already provides a strong foundation for reusable components, polished interactions, layout, and productive defaults. These improvements would make it much easier to build modern desktop applications without repeatedly implementing the same UI infrastructure.

1. Advanced Animation and Transition Support

Add first class support for animations and transitions across the component system.

Support should include:

  1. Fade animations
  2. Slide animations
  3. Scale animations
  4. Expand and collapse animations
  5. Size transitions
  6. Position transitions
  7. Opacity transitions
  8. Transform animations
  9. Spring based animations
  10. Configurable animation duration
  11. Configurable animation delay
  12. Easing support
  13. Animation sequencing
  14. Staggered animations
  15. Reusable animation presets
  16. Interruptible animations
  17. Smooth state transitions
  18. Reduced motion support

Animations should work consistently across components instead of requiring each application to implement its own animation system.

2. More Responsive Dialogs and Popups

Dialogs, modals, popups, dropdowns, popovers, tooltips, menus, sheets, and other overlay components should have much stronger responsive behavior.

They should gracefully adapt when:

  1. The application window becomes smaller
  2. Content becomes larger
  3. Text becomes longer
  4. A dialog contains many controls
  5. Nested content is added
  6. Display scaling changes
  7. Available screen space is limited

Support should include:

  1. Automatic sizing within available space
  2. Maximum width and height handling
  3. Minimum size handling
  4. Automatic scrolling when content exceeds available space
  5. Viewport boundary detection
  6. Automatic repositioning
  7. Better placement near screen edges
  8. Responsive padding and spacing
  9. Content wrapping
  10. Text truncation where appropriate
  11. Better nested popup behavior
  12. Smooth opening and closing transitions
  13. Better keyboard interaction
  14. Proper focus management

A dialog, popup, or modal should not unexpectedly overflow outside its usable area.

3. More Responsive Containers and Layouts

Containers and layout components should have stronger protection against unexpected overflow.

Support should include:

  1. Automatic shrinking
  2. Flexible sizing
  3. Minimum and maximum dimensions
  4. Content aware sizing
  5. Safe nested layouts
  6. Better overflow handling
  7. Scrollable content
  8. Text wrapping
  9. Text truncation
  10. Responsive spacing
  11. Adaptive padding
  12. Better handling of long content
  13. Better behavior when children exceed available space
  14. Better behavior during window resizing

The goal is for containers to remain stable and usable even when their content or available space changes significantly.

4. Responsive Layout System

It would be valuable to have a more comprehensive responsive layout system throughout GPUI Kit.

Components should adapt naturally to:

  1. Different window sizes
  2. Different display scaling
  3. Different font metrics
  4. Dynamic content
  5. Long text
  6. Large amounts of content
  7. Nested components
  8. Resizable panels
  9. Different desktop platforms

The framework should make it difficult for normal application layouts to accidentally overflow.

5. Grid Component

Add a dedicated production ready Grid component.

Support should include:

  1. Fixed columns
  2. Flexible columns
  3. Automatic column sizing
  4. Minimum and maximum column sizes
  5. Row gaps
  6. Column gaps
  7. Row spanning
  8. Column spanning
  9. Responsive column counts
  10. Alignment
  11. Justification
  12. Nested grids
  13. Dynamic content
  14. Scrollable grids
  15. Virtualized grids

The grid should automatically adapt to the available space.

For example:

Large window:  4 columns
Medium window: 3 columns
Small window:  2 columns
Very small:    1 column

6. Flexible Image, Text, and Content Display

It would be very useful to have more flexible support for displaying images, text, icons, badges, buttons, metadata, and other content in different compositions.

For example:

  1. Image with text below
  2. Image with text above
  3. Text over an image
  4. Text over an image with a gradient or background treatment
  5. Text positioned at the top of an image
  6. Text positioned at the bottom of an image
  7. Centered text over an image
  8. Icon over an image
  9. Badge over an image
  10. Buttons over an image
  11. Multiple elements layered over an image
  12. Image with a caption
  13. Image with metadata
  14. Image with actions
  15. Image with hover controls
  16. Image with hover text
  17. Image with hover overlay
  18. Image with hover actions
  19. Content revealed only when hovering
  20. Content visible by default and enhanced on hover

For example, a media card could support:

┌────────────────────────────┐
│                            │
│          IMAGE             │
│                            │
│      Title over image      │
│      Description           │
│                     ● Play │
└────────────────────────────┘

Another application may want:

┌────────────────────────────┐
│          IMAGE             │
├────────────────────────────┤
│ Title                      │
│ Description                │
│ Metadata          Actions  │
└────────────────────────────┘

Both layouts should be easy to create without having to build custom positioning and interaction logic for every application.

7. Image and Content Overlay Support

A reusable overlay system would be particularly useful for media and content heavy applications.

Support should include:

  1. Text overlays
  2. Icon overlays
  3. Button overlays
  4. Badge overlays
  5. Gradient overlays
  6. Scrim overlays
  7. Loading overlays
  8. Selection overlays
  9. Hover overlays
  10. Contextual action overlays
  11. Play button overlays
  12. Status overlays
  13. Progress overlays

Overlay positioning should support:

  1. Top left
  2. Top center
  3. Top right
  4. Center left
  5. Center
  6. Center right
  7. Bottom left
  8. Bottom center
  9. Bottom right

It would also be useful to support combinations of multiple overlay elements.

8. Hover Based Content and Transitions

Components should support content that changes or appears based on interaction.

Examples include:

  1. Text appearing when hovering
  2. Image controls appearing when hovering
  3. Action buttons appearing when hovering
  4. Metadata appearing when hovering
  5. Overlay appearing when hovering
  6. Additional information being revealed
  7. Image scaling on hover
  8. Image brightness or opacity changing on hover
  9. Icons transitioning on hover
  10. Cards transitioning on hover

These interactions should integrate with the animation and transition system.

The default behavior should also remain usable without hover, especially where keyboard navigation or accessibility requires it.

9. Multiple Content Display Modes

Components should support different ways of presenting the same content.

For example:

  1. Image only
  2. Image with text below
  3. Image with text above
  4. Image with text overlay
  5. Image with hover overlay
  6. Image with actions
  7. Image with metadata
  8. Text only
  9. Icon with text
  10. Icon with metadata
  11. Compact view
  12. Detailed view
  13. Grid view
  14. List view

This would be especially useful for media browsers, galleries, dashboards, file managers, cards, search results, and application launchers.

10. Video Player Component

Add a complete reusable Video Player component.

Support should include:

  1. Play and pause
  2. Seeking
  3. Timeline
  4. Current time
  5. Duration
  6. Buffering state
  7. Playback speed
  8. Restart
  9. Skip forward and backward
  10. Looping
  11. Muted playback
  12. Volume control
  13. Mute and unmute
  14. Fullscreen
  15. Picture in picture where supported
  16. Aspect ratio handling
  17. Fit, fill, and contain modes
  18. Poster and thumbnail support
  19. Loading state
  20. Error state
  21. Hover controls
  22. Automatically hiding controls
  23. Keyboard shortcuts
  24. Smooth control transitions

11. Advanced File Attachment Support

Expand the existing attachment functionality into a complete multi file and folder aware attachment system.

Support should include:

  1. Multiple file selection
  2. Multiple file drag and drop
  3. Incremental attachment
  4. Removing individual attachments
  5. Removing multiple attachments
  6. Reordering attachments
  7. File previews
  8. Upload progress
  9. Duplicate handling
  10. File type validation
  11. File size validation

12. Folder and Nested Folder Support

Allow users to attach complete folders and preserve their structure.

Support should include:

  1. Selecting folders
  2. Dragging folders
  3. Dropping folders
  4. Recursive folder handling
  5. Nested folder support
  6. Preserving folder hierarchy
  7. Including files from nested directories
  8. Displaying folder structure
  9. Showing file counts
  10. Handling large folder structures efficiently

For example:

Project/
├── images/
│   ├── logo.png
│   └── banner.jpg
├── videos/
│   └── demo.mp4
├── documents/
│   └── specification.pdf
└── src/
    └── main.rs

The structure should ideally remain available instead of flattening everything into one file list.

13. Mixed File and Folder Attachments

Users should be able to combine different types of attachments at the same time.

For example:

Selected:

photo.png
video.mp4
document.pdf
Project/
AnotherFolder/

This should support multiple files, multiple folders, nested folders, images, videos, documents, and other supported file types in the same attachment experience.

14. Improved Drag and Drop

Drag and drop should be treated as a first class interaction.

Support should include:

  1. Multiple files
  2. Multiple folders
  3. Nested folders
  4. Visual drop target states
  5. Drag enter states
  6. Drag leave states
  7. Animated drop feedback
  8. Invalid file feedback
  9. Upload progress
  10. Cancel support
  11. Drop previews

The interaction should provide clear visual feedback throughout the entire drag and drop process.

15. Native File Explorer and File Picker Support

Attachment components should provide integrated support for opening the native file picker or file explorer.

Users should be able to:

  1. Click the attachment area
  2. Click an add attachment action
  3. Select multiple files
  4. Select folders
  5. Add additional files later
  6. Continue building an attachment collection incrementally

This should ideally work consistently across Windows, macOS, and Linux.

16. Media Aware Attachment Previews

Attachments should automatically provide appropriate previews based on their type.

Images should support thumbnails and relevant metadata.

Videos should support thumbnails, duration, metadata, and playback previews.

Audio should support appropriate icons or artwork and playback information.

Documents should display appropriate file type information.

Folders should display folder information, file counts, and nested folder indicators.

17. Attachment Grid and List Views

The attachment system could support both grid and list presentations.

The grid should automatically adapt to available width.

The list should handle long filenames, metadata, actions, and different attachment types without causing overflow.

Applications should be able to choose the presentation that best fits their use case.

18. Responsive Attachment UI

The attachment UI should remain responsive regardless of the number or type of attachments.

For example:

Wide:
[File] [File] [File] [File]

Medium:
[File] [File] [File]

Small:
[File] [File]

Very small:
[File]
[File]

Long filenames should truncate gracefully rather than breaking the layout.

Large attachment collections should also remain performant and usable.

19. Consistent Hover and Interaction Effects

All relevant components should have consistent interaction states.

Support should include:

  1. Hover
  2. Pressed
  3. Focused
  4. Active
  5. Selected
  6. Disabled
  7. Loading
  8. Dragging
  9. Drop target
  10. Keyboard navigation

These states should integrate naturally with the animation and transition system.

20. Unified Loading and Async States

Provide consistent visual states for asynchronous operations.

Examples include:

  1. Loading
  2. Uploading
  3. Processing
  4. Success
  5. Error
  6. Cancelled
  7. Retrying

These states should support consistent visual feedback and transitions.

21. Accessibility and Keyboard Support

All these components should provide strong support for:

  1. Keyboard navigation
  2. Focus management
  3. Focus visible states
  4. Enter and Space interaction
  5. Escape to close or cancel
  6. Appropriate accessibility semantics
  7. Reduced motion
  8. Clear disabled states

Expected Outcome

The main goal is to make GPUI Kit much easier to use for building modern, polished, highly responsive desktop applications out of the box.

In particular, I would like responsive behavior to work reliably across:

  1. Dialogs
  2. Popups
  3. Modals
  4. Containers
  5. Panels
  6. Cards
  7. Menus
  8. Dropdowns
  9. Tooltips
  10. Forms
  11. Grids
  12. Images
  13. Text
  14. Media
  15. Attachment areas
  16. File browsers
  17. Video players
  18. Other reusable components

I would also like the component system to provide flexible composition of images, text, icons, metadata, badges, actions, overlays, and hover content, including displaying text over images, text below images, content by default, or additional content when hovering.

The framework should handle resizing, constrained space, long content, dynamic content, nested layouts, media content, and overflow gracefully.

The overall objective is to provide a cohesive foundation for:

  1. Responsive UI
  2. Animation
  3. Transitions
  4. Image and content composition
  5. Hover interactions
  6. Media
  7. File workflows
  8. Drag and drop
  9. Responsive dialogs and popups
  10. Robust container layouts
  11. Modern interaction states

This would allow developers to focus on their applications instead of repeatedly rebuilding common UI infrastructure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions