-
-
Couldn't load subscription status.
- Fork 10.3k
Add dynamic column generation for UnifiedLogs table #37239
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
Conversation
Eliminated the 'host' field from filter fields, schema definitions, and column configuration in UnifiedLogs. This streamlines the logs interface and removes unused or unnecessary data.
Replaces static column definitions with a dynamic generator that hides columns when all their values are empty. The UnifiedLogs table now adapts its columns based on the current data, improving readability and relevance.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Added explicit cell and header class names for column widths in the UnifiedLogs table to ensure consistent sizing and improve layout control.
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.
LGTM!
- Tested on preview
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.
blocking
The dynamic columns generator now returns both columns and their visibility state, allowing UnifiedLogs to merge dynamic visibility with existing column visibility. This improves control over which columns are shown based on the data.
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.
LGTM once again!
This PR enables dynamic column generation for the Unified Logs table, improving maintainability and flexibility. Key changes:
Dynamic Columns
• Added generateDynamicColumns in Columns.tsx to build columns based on data.
• Columns like method, pathname, and event_message are hidden if empty.
• Replaced static UNIFIED_LOGS_COLUMNS with dynamic version using useMemo in UnifiedLogs.tsx.
Simplified Definitions
• Removed unused metadata and class names from columns.
• Standardized column sizing and sorting behavior.
Fallback
• Added static fallback using generateDynamicColumns([]) when no data exists.