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

[Layout][M] Refactor layout for grid-based components and better aesthetic #40

Open
amrutha97 opened this issue Jan 16, 2025 · 0 comments
Labels

Comments

@amrutha97
Copy link
Member

amrutha97 commented Jan 16, 2025

Preswald UI improvement ideas

The current layout in Preswald is functional but lacks usability and aesthetics. Components like Plotly charts and sliders behave awkwardly, leading to a subpar UX. The absence of a grid-based layout exacerbates the issue, making the UI feel cluttered and inconsistent. The goal is to create a UI that feels intentional, cohesive, and easy to navigate.

Quick Audit Focus

Identify low-effort, high-impact changes such as:

  • Standardizing font weights, colors, and spacing.
  • Improving component behavior and alignment.

Desired State

1. Structured Grid Layout

  • Alignment & Spacing: Components can be optionally placed within a grid-based layout.
  • Responsiveness: Grid system supports responsive resizing and maintains a clean, polished look.

2. Improved Plotly Interaction

  • Smooth Behavior: Plotly charts should allow smooth zoom and pan behavior that aligns with user expectations.
  • Predictable Interactions: Avoid disruptive scaling during viewport resizing or user interactions.

3. Better Component Sizing

  • Adaptive Components: Sliders and other components should adapt to container sizes, avoiding unnecessary full-width spans.
  • Visual Harmony: Consistent margins, paddings, and spacing create a unified UI.

Suggestions for Approach

1. Adopt a Grid System

  • Libraries to Explore:
    • CSS Grid
    • Flexbox
    • React Grid Layout
  • Implementation Goals:
    • Define breakpoints for responsiveness across devices.
    • Abstract grid logic into reusable layout utilities or components.

2. Fine-Tune Plotly Settings

  • Configuration Options:
    • Optimize scrollZoom, displayModeBar, and dragMode for smoother interactions.
    • Set default axis ranges or disable autoscale for predictable behavior.
  • Test Edge Cases:
    • Browser window resizing.
    • Smaller container embedding.

3. Refactor Component Sizing

  • Dynamic Sizing:
    • Use container-based width calculations (e.g., percentage or max-width).
  • Consistent Design System:
    • Standardize margins, paddings, and font sizes for a unified aesthetic.
@amrutha97 amrutha97 added the ui label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant