-
Notifications
You must be signed in to change notification settings - Fork 2
Platform-wide UI consistency: theme tokens, sidebar indicators, inline search, header styling, transition animations #821
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
Changes from all commits
fd20f2a
36d8e61
eb0f176
89455cf
3b014cb
60ee942
f47677a
3e2c554
e5cb719
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -104,6 +104,32 @@ export function formatPercent(value: number, precision: number = 0): string { | |||||
| return `${displayValue.toFixed(precision)}%`; | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * Format date as relative time (e.g., "2 days ago", "Today", "Overdue 3d") | ||||||
|
||||||
| * Format date as relative time (e.g., "2 days ago", "Today", "Overdue 3d") | |
| * Format date as relative time (e.g., "2 days ago", "Today", "In 3 days") |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,39 +12,39 @@ export function GridField({ value, field, readonly, ...props }: FieldWidgetProps | |||||
| const columns = gridField?.columns || []; | ||||||
|
|
||||||
| if (!value || !Array.isArray(value)) { | ||||||
| return <span className="text-sm text-gray-500">-</span>; | ||||||
| return <span className="text-sm text-muted-foreground">-</span>; | ||||||
| } | ||||||
|
|
||||||
| if (readonly) { | ||||||
| return ( | ||||||
| <div className={cn("text-sm", props.className)}> | ||||||
| <span className="text-gray-700">{value.length} rows</span> | ||||||
| <span className="text-foreground">{value.length} rows</span> | ||||||
| </div> | ||||||
| ); | ||||||
| } | ||||||
|
|
||||||
| // Simple read-only table view | ||||||
| return ( | ||||||
| <div className={cn("border border-gray-200 rounded-md overflow-hidden", props.className)}> | ||||||
| <div className={cn("border border-border rounded-lg overflow-hidden", props.className)}> | ||||||
| <div className="overflow-auto max-h-60"> | ||||||
| <table className="w-full text-sm"> | ||||||
| <thead className="bg-gray-50 border-b border-gray-200"> | ||||||
| <thead className="bg-muted border-b border-border"> | ||||||
| <tr> | ||||||
| {columns.map((col: any, idx: number) => ( | ||||||
| <th | ||||||
| key={idx} | ||||||
| className="px-3 py-2 text-left text-xs font-medium text-gray-700" | ||||||
| className="px-3 py-2 text-left text-xs font-medium text-muted-foreground" | ||||||
| > | ||||||
| {col.label || col.name} | ||||||
| </th> | ||||||
| ))} | ||||||
| </tr> | ||||||
| </thead> | ||||||
| <tbody className="divide-y divide-gray-200"> | ||||||
| <tbody className="divide-y divide-border"> | ||||||
| {value.slice(0, 5).map((row: any, rowIdx: number) => ( | ||||||
| <tr key={rowIdx} className="hover:bg-gray-50"> | ||||||
| <tr key={rowIdx} className="hover:bg-muted/50 transition-colors"> | ||||||
|
||||||
| <tr key={rowIdx} className="hover:bg-muted/50 transition-colors"> | |
| <tr key={rowIdx} className="hover:bg-muted/50 transition-colors duration-150"> |
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.
Section separators are keyed off the original section index (sectionIdx). If earlier sections are hidden via visibleWhen, the first visible section can incorrectly render with a leading . Track the index of the last rendered/visible section (or filter visible sections first) before inserting separators.