fix(需求池): 优化待评审操作列展示
This commit is contained in:
@@ -19,6 +19,16 @@ test('uses fixed table layout without horizontal scrolling for requirement list'
|
||||
assert.equal(totalWidth, 100);
|
||||
});
|
||||
|
||||
test('reserves enough width for pending-review row actions without horizontal scrolling', () => {
|
||||
const sourceColumnWidth = REQUIREMENT_TABLE_COLUMN_WIDTHS[2];
|
||||
const creatorColumnWidth = REQUIREMENT_TABLE_COLUMN_WIDTHS[9];
|
||||
const actionColumnWidth = REQUIREMENT_TABLE_COLUMN_WIDTHS[11];
|
||||
|
||||
assert.ok(sourceColumnWidth <= 10);
|
||||
assert.ok(creatorColumnWidth <= 4);
|
||||
assert.ok(actionColumnWidth >= 20);
|
||||
});
|
||||
|
||||
test('keeps requirement table headers on one line', () => {
|
||||
assert.match(REQUIREMENT_TABLE_HEADER_CELL_CLASS, /\bwhitespace-nowrap\b/);
|
||||
});
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export type RequirementTableTextColumn = 'source' | 'project' | 'type' | 'version' | 'creator';
|
||||
|
||||
const TEXT_COLUMN_MAX_WIDTH: Record<RequirementTableTextColumn, string> = {
|
||||
source: 'max-w-[170px]',
|
||||
source: 'max-w-[120px]',
|
||||
project: 'max-w-[120px]',
|
||||
type: 'max-w-[96px]',
|
||||
version: 'max-w-[92px]',
|
||||
creator: 'max-w-[96px]',
|
||||
creator: 'max-w-[64px]',
|
||||
};
|
||||
|
||||
export const REQUIREMENT_TABLE_CONTAINER_CLASS =
|
||||
@@ -13,7 +13,7 @@ export const REQUIREMENT_TABLE_CONTAINER_CLASS =
|
||||
|
||||
export const REQUIREMENT_TABLE_CLASS = 'w-full table-fixed text-left text-[13px]';
|
||||
|
||||
export const REQUIREMENT_TABLE_COLUMN_WIDTHS = [6, 15, 14, 7, 6, 6, 5, 6, 7, 6, 8, 14] as const;
|
||||
export const REQUIREMENT_TABLE_COLUMN_WIDTHS = [6, 15, 10, 7, 6, 6, 5, 6, 7, 4, 8, 20] as const;
|
||||
|
||||
export const REQUIREMENT_TABLE_HEADER_CELL_CLASS =
|
||||
'px-3 py-2.5 whitespace-nowrap text-[11px] font-medium uppercase tracking-wide text-[var(--ink-muted)]';
|
||||
|
||||
Reference in New Issue
Block a user