fix(mobile): Studio's floating panels are opaque over the page, the journal header lays out in one row on a tablet, and the journal a trip links opens Studio too

This commit is contained in:
Maurice
2026-11-08 12:38:39 +01:00
parent a9af19f02a
commit 38e5d76ad2
3 changed files with 13 additions and 2 deletions
@@ -468,7 +468,7 @@ export default function MJourneyDetail({ journeyId, embedded = false }: JourneyD
)}
<div
data-view-switch
className="absolute left-1/2 top-0 flex -translate-x-1/2 rounded-full bg-[color:var(--m-sheet)] p-[3px] shadow-[0_5px_14px_-6px_rgba(0,0,0,.3)]"
className="absolute left-1/2 top-0 flex -translate-x-1/2 rounded-full wide:static wide:translate-x-0 bg-[color:var(--m-sheet)] p-[3px] shadow-[0_5px_14px_-6px_rgba(0,0,0,.3)]"
>
<button
type="button"
@@ -505,7 +505,7 @@ export default function MJourneyDetail({ journeyId, embedded = false }: JourneyD
<span className="h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
</span>
)}
{split && !embedded && (
{split && (
<button
type="button"
onClick={() => void navigate(`/journey/${current.id}/studio`)}
+4
View File
@@ -229,7 +229,10 @@
bottom: 0;
width: 300px;
box-shadow: var(--sh-lg);
/* Floating over the page, the glass let the page show through and the panel's
text washed out (an iPad in landscape): a floating panel is opaque. */
}
.trek-dash .st-panel.st-inspector { background: var(--surface); }
}
@media (max-width: 1079px) {
.trek-dash .st-body { grid-template-columns: minmax(64px, min-content) minmax(0, 1fr); }
@@ -240,6 +243,7 @@
width: 236px;
box-shadow: var(--sh-lg);
}
.trek-dash .st-panel.st-side { background: var(--surface); }
}
.trek-dash .st-panel {
@@ -856,6 +856,13 @@ describe('MJourneyDetail', () => {
expect(hook.navigate).toHaveBeenCalledWith(expect.stringMatching(/^\/journey\/\d+\/studio$/));
});
it("FE-MOB-JDET-053: the journal a trip links offers Studio too, on a tablet beside the map", () => {
setSizeClass('split');
mocks.detail = buildHook();
render(<MJourneyDetail journeyId={7} embedded />);
expect(screen.getByRole('button', { name: 'journey.studio.openAria' })).toBeInTheDocument();
});
it('FE-MOB-JDET-052: the phone and a single pane offer no Studio', () => {
setup();
expect(screen.queryByRole('button', { name: 'journey.studio.openAria' })).not.toBeInTheDocument();