umami icon indicating copy to clipboard operation
umami copied to clipboard

style: to keep table header within sight when browsing many records, …

Open kamaslau opened this issue 1 month ago • 2 comments

…make it sticky

Being frankly, I'm quite a stranger to zenui, please forgive me that I write an inline style and it will be helpful to instruct me on if there is a possibly formal way to do it.

kamaslau avatar Dec 01 '25 09:12 kamaslau

@kamaslau is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 01 '25 09:12 vercel[bot]

Greptile Overview

Greptile Summary

Added sticky positioning to table header column to keep it visible when scrolling through many records in metrics tables.

  • Incorrect React syntax used: the style prop must be an object (e.g., style={{ position: 'sticky' }}) not a string (e.g., style="position:sticky")
  • Hardcoded color #0f0f0f should use the CSS variable var(--base-color-2) to support theme switching

Confidence Score: 0/5

  • This PR cannot be merged due to critical syntax error that will cause runtime failure
  • The code uses incorrect React syntax (string instead of object for style prop), which will cause the component to fail at runtime. This is a critical error that must be fixed before merging.
  • src/components/metrics/MetricsExpandedTable.tsx requires immediate attention to fix the syntax error

Important Files Changed

File Analysis

Filename Score Overview
src/components/metrics/MetricsExpandedTable.tsx 1/5 Added sticky positioning to table header, but uses incorrect string syntax for style prop instead of object syntax, causing a critical error

Sequence Diagram

sequenceDiagram
    participant User
    participant MetricsExpandedTable
    participant DataTable
    participant DataColumn
    participant Browser

    User->>MetricsExpandedTable: View metrics with many records
    MetricsExpandedTable->>DataTable: Render table with data
    DataTable->>DataColumn: Render label column with style prop
    Note over DataColumn: Applies sticky positioning<br/>to keep header visible
    DataColumn->>Browser: Render header with CSS
    Browser->>Browser: Position header at top: 0
    Browser->>Browser: Apply background color
    User->>Browser: Scroll table content
    Browser-->>User: Header remains visible at top

greptile-apps[bot] avatar Dec 01 '25 09:12 greptile-apps[bot]