Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fix-notification-banner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sable: patch
---

fix: in-app notification banner placement

Render `NotificationBanner` in `ClientLayout` so it occupies the full viewport width as `position: fixed` and doesn't displace any page content. Previously it was rendered inside `Room.tsx`, which caused layout shift and meant it only appeared while a room was open.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ const slideOut = keyframes({
},
});

// Floats at the top of the chat area, starting after the icon sidebar.
// Floats at the top of the viewport, spanning full width on all platforms.
export const BannerContainer = style({
position: 'fixed',
top: 0,
// 66px = sidebar icon strip width — overridden to 0 on mobile below
left: toRem(66),
left: 0,
right: 0,
zIndex: 9999,
display: 'flex',
Expand All @@ -37,13 +36,6 @@ export const BannerContainer = style({
padding: config.space.S400,
pointerEvents: 'none',
alignItems: 'stretch',

'@media': {
// On narrow screens the sidebar collapses, so span the full width.
'(max-width: 768px)': {
left: 0,
},
},
});

export const Banner = style({
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/room/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useCallback } from 'react';
import { Box, Line } from 'folds';
import { useParams } from 'react-router-dom';
import { isKeyHotkey } from 'is-hotkey';
import { useAtomValue } from 'jotai';
import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize';
import { useSetting } from '$state/hooks/settings';
import { settingsAtom } from '$state/settings';
Expand All @@ -13,7 +14,6 @@ import { useMatrixClient } from '$hooks/useMatrixClient';
import { useRoomMembers } from '$hooks/useRoomMembers';
import { CallView } from '$features/call/CallView';
import { WidgetsDrawer } from '$features/widgets/WidgetsDrawer';
import { useAtomValue } from 'jotai';
import { callChatAtom } from '$state/callEmbed';
import { RoomViewHeader } from './RoomViewHeader';
import { MembersDrawer } from './MembersDrawer';
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/client/ClientLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ReactNode } from 'react';
import { Box } from 'folds';
import { NotificationBanner } from '$components/notification-banner';

type ClientLayoutProps = {
nav: ReactNode;
Expand All @@ -8,6 +9,7 @@ type ClientLayoutProps = {
export function ClientLayout({ nav, children }: ClientLayoutProps) {
return (
<Box grow="Yes">
<NotificationBanner />
<Box shrink="No">{nav}</Box>
<Box grow="Yes">{children}</Box>
</Box>
Expand Down
2 changes: 0 additions & 2 deletions src/app/pages/client/ClientNonUIFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getReactCustomHtmlParser, LINKIFY_OPTS } from '$plugins/react-custom-ht
import { sanitizeCustomHtml } from '$utils/sanitize';
import { roomToUnreadAtom } from '$state/room/roomToUnread';
import LogoSVG from '$public/res/svg/cinny.svg';
import { NotificationBanner } from '$components/notification-banner';
import LogoUnreadSVG from '$public/res/svg/cinny-unread.svg';
import LogoHighlightSVG from '$public/res/svg/cinny-highlight.svg';
import NotificationSound from '$public/sound/notification.ogg';
Expand Down Expand Up @@ -559,7 +558,6 @@ export function ClientNonUIFeatures({ children }: ClientNonUIFeaturesProps) {
<MessageNotifications />
<BackgroundNotifications />
<SyncNotificationSettingsWithServiceWorker />
<NotificationBanner />
{children}
</>
);
Expand Down
Loading