feat(FN-3989): align inline metadata row
Aligns the inline metadata row in TaskDetailModal via CSS adjustments, with corresponding test coverage expanded in both the inline-editing/integrations and responsive/dependencies test suites. Fusion-Task-Id: FN-3989
This commit is contained in:
@@ -170,8 +170,9 @@
|
||||
.detail-meta-inline-controls {
|
||||
--detail-priority-control-min-height: calc(var(--space-2xl) + var(--space-xs));
|
||||
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-wrap: nowrap;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
@@ -1535,13 +1536,6 @@
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.detail-meta-inline-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.detail-priority-select {
|
||||
min-height: var(--detail-priority-control-min-height);
|
||||
}
|
||||
@@ -1654,3 +1648,10 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.detail-meta-inline-controls {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,10 +872,17 @@ describe("TaskDetailModal", () => {
|
||||
/>,
|
||||
);
|
||||
|
||||
fireEvent.change(screen.getByRole("combobox", { name: "Task priority" }), {
|
||||
const controls = screen.getByTestId("detail-meta-inline-controls");
|
||||
const prioritySelect = screen.getByRole("combobox", { name: "Task priority" });
|
||||
const executionModeToggle = screen.getByRole("button", { name: "Execution mode: standard" });
|
||||
|
||||
expect(prioritySelect.parentElement).toBe(controls.firstElementChild);
|
||||
expect(executionModeToggle.parentElement).toBe(controls);
|
||||
|
||||
fireEvent.change(prioritySelect, {
|
||||
target: { value: "urgent" },
|
||||
});
|
||||
fireEvent.click(screen.getByRole("button", { name: "Execution mode: standard" }));
|
||||
fireEvent.click(executionModeToggle);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockUpdate).toHaveBeenNthCalledWith(1, "FN-001", { priority: "urgent" }, undefined);
|
||||
|
||||
@@ -20,6 +20,13 @@ setupTaskDetailModalHooks();
|
||||
|
||||
describe("TaskDetailModal", () => {
|
||||
describe("mobile responsive structure", () => {
|
||||
it("keeps inline metadata controls in a row by default with a narrow-screen column fallback", () => {
|
||||
const css = readDashboardStylesSource();
|
||||
|
||||
expectBaseRule(css, ".detail-meta-inline-controls", "display: flex;");
|
||||
expectBaseRule(css, ".detail-meta-inline-controls", "flex-wrap: nowrap;");
|
||||
expect(css).toMatch(/@media \(max-width: 640px\)\s*\{[\s\S]*?\.detail-meta-inline-controls\s*\{[\s\S]*?flex-direction: column;/);
|
||||
});
|
||||
it("renders responsive structural classes (modal-lg, overlay, spacer, tabs, detail-body)", () => {
|
||||
const { container } = render(
|
||||
<TaskDetailModal
|
||||
|
||||
Reference in New Issue
Block a user