fix(FN-1917): fix mobile scrolling on roadmap screen

- Fix overflow issues on roadmap screen on mobile devices
- Ensure roadmap cards are properly scrollable on small screens
- Resolve merge conflict in memory-compaction tests by keeping non-null assertions
This commit is contained in:
Fusion
2026-04-16 13:09:47 -07:00
committed by gsxdsm
parent 11f84151ce
commit 18722ae361
2 changed files with 67 additions and 0 deletions

View File

@@ -881,5 +881,42 @@ describe("RoadmapsView", () => {
expect(screen.getByTestId("roadmap-title-input")).toBeInTheDocument();
});
});
it("mobile roadmap list has scrollable container structure", async () => {
render(<RoadmapsView addToast={mockAddToast} />);
await waitFor(() => {
expect(screen.getByTestId("roadmaps-view__mobile-list")).toBeInTheDocument();
});
// The mobile list should have the scrollable container
const mobileList = screen.getByTestId("roadmaps-view__mobile-list");
expect(mobileList).toBeInTheDocument();
// The list items container should exist and be scrollable
const listItems = mobileList.querySelector(".roadmaps-view__mobile-list-items");
expect(listItems).toBeInTheDocument();
});
it("selecting roadmap on mobile shows detail view with header and milestone content", async () => {
render(<RoadmapsView addToast={mockAddToast} />);
await waitFor(() => {
expect(screen.getByTestId("mobile-roadmap-item-RM-001")).toBeInTheDocument();
});
// Click on a roadmap item
fireEvent.click(screen.getByTestId("mobile-roadmap-item-RM-001"));
// Should show the mobile header with back button
await waitFor(() => {
expect(screen.getByTestId("roadmaps-view__mobile-header")).toBeInTheDocument();
expect(screen.getByTestId("mobile-back-btn")).toBeInTheDocument();
});
// Should show milestone content
expect(screen.getByText("Milestone 1")).toBeInTheDocument();
expect(screen.getByText("Milestone 2")).toBeInTheDocument();
});
});
});

View File

@@ -33329,10 +33329,24 @@ html .column.drag-over * {
/* Mobile responsive */
@media (max-width: 768px) {
/* Allow vertical scrolling on mobile for roadmap list and detail views */
.roadmaps-view {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.roadmaps-view__sidebar {
display: none;
}
/* Allow vertical scrolling in the main content area on mobile */
.roadmaps-view__main {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
flex: 1;
padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
}
/* Mobile Roadmap List */
.roadmaps-view__mobile-list {
display: flex;
@@ -33582,6 +33596,22 @@ html .column.drag-over * {
.roadmaps-view__create-form {
margin: var(--space-sm);
}
/* Bump icon button touch targets to 36px on mobile */
.roadmaps-view__icon-btn {
width: 36px;
height: 36px;
}
.roadmaps-view__icon-btn[role="button"] {
width: 36px;
height: 36px;
}
/* Feature create overlay - offset from mobile nav bar */
.roadmaps-view__feature-create-overlay {
bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--space-md));
}
}