Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .changeset/long-tools-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/web-ui-registration': patch
'@rocket.chat/meteor': patch
---

Fixes registration pages a11y color contrast and apply browser theme configuration
15 changes: 15 additions & 0 deletions apps/meteor/client/components/AppLayoutThemeWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { PaletteStyleTag } from '@rocket.chat/fuselage';
import { useDarkMode } from '@rocket.chat/fuselage-hooks';
import type { ReactNode } from 'react';

const AppLayoutThemeWrapper = ({ children }: { children: ReactNode }) => {
const dark = useDarkMode();
return (
<>
<PaletteStyleTag theme={dark ? 'dark' : 'light'} tagId='app-layout-palette' />
{children}
</>
);
};

export default AppLayoutThemeWrapper;
5 changes: 3 additions & 2 deletions apps/meteor/client/lib/appLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const ConnectionStatusBar = lazy(() => import('../components/connectionStatus/Co
const BannerRegion = lazy(() => import('../views/banners/BannerRegion'));
const ModalRegion = lazy(() => import('../views/modal/ModalRegion'));
const ActionManagerBusyState = lazy(() => import('../components/ActionManagerBusyState'));
const AppLayoutThemeWrapper = lazy(() => import('../components/AppLayoutThemeWrapper'));
const CloudAnnouncementsRegion = lazy(() => import('../views/cloud/CloudAnnouncementsRegion'));

type AppLayoutDescriptor = ReactElement | null;
Expand All @@ -28,14 +29,14 @@ class AppLayoutSubscription extends Emitter<{ update: void }> {

wrap(element: ReactElement): ReactElement {
return (
<>
<AppLayoutThemeWrapper>
<ConnectionStatusBar />
<ActionManagerBusyState />
<CloudAnnouncementsRegion />
<BannerRegion />
{element}
<ModalRegion />
</>
</AppLayoutThemeWrapper>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
"@rocket.chat/icons": "^0.42.0",
"@rocket.chat/instance-status": "workspace:^",
"@rocket.chat/jwt": "workspace:^",
"@rocket.chat/layout": "~0.32.0",
"@rocket.chat/layout": "^0.32.1",
"@rocket.chat/license": "workspace:^",
"@rocket.chat/log-format": "workspace:^",
"@rocket.chat/logger": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-ui-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/preset-react": "~7.25.9",
"@babel/preset-typescript": "~7.26.0",
"@rocket.chat/i18n": "workspace:~",
"@rocket.chat/layout": "~0.32.0",
"@rocket.chat/layout": "^0.32.1",
"@rocket.chat/mock-providers": "workspace:~",
"@rocket.chat/tools": "workspace:~",
"@rocket.chat/ui-client": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions packages/web-ui-registration/src/components/LoginTerms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const LoginTerms = (): ReactElement => {
return (
<HorizontalWizardLayoutCaption>
<Box
color='default'
withRichContent
dangerouslySetInnerHTML={{
__html: loginTerms !== '' ? DOMPurify.sanitize(loginTerms) : DOMPurify.sanitize(t('Layout_Login_Terms_Content')),
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8397,15 +8397,15 @@ __metadata:
languageName: unknown
linkType: soft

"@rocket.chat/layout@npm:~0.32.0":
version: 0.32.0
resolution: "@rocket.chat/layout@npm:0.32.0"
"@rocket.chat/layout@npm:^0.32.1":
version: 0.32.1
resolution: "@rocket.chat/layout@npm:0.32.1"
peerDependencies:
"@rocket.chat/fuselage": "*"
react: "*"
react-dom: "*"
react-i18next: "*"
checksum: 10/73b2aece24f974bc6ed339c5f3910824f7aa18d85be6f16ce48dcda2360b938c67a316100682850994bb4e046a20ace655e1d9615946e04bcbe1708fdb3038a9
checksum: 10/fccf3c862a053945eaabf56e87658f4b5f0f4a99141365195e175af47d49af68d9569e6dbe63e12b73eb0f8dcd2e7d641852374f5bcf458a43ca69bf56960bc2
languageName: node
linkType: hard

Expand Down Expand Up @@ -8656,7 +8656,7 @@ __metadata:
"@rocket.chat/instance-status": "workspace:^"
"@rocket.chat/jest-presets": "workspace:~"
"@rocket.chat/jwt": "workspace:^"
"@rocket.chat/layout": "npm:~0.32.0"
"@rocket.chat/layout": "npm:^0.32.1"
"@rocket.chat/license": "workspace:^"
"@rocket.chat/livechat": "workspace:^"
"@rocket.chat/log-format": "workspace:^"
Expand Down Expand Up @@ -9929,7 +9929,7 @@ __metadata:
"@babel/preset-react": "npm:~7.25.9"
"@babel/preset-typescript": "npm:~7.26.0"
"@rocket.chat/i18n": "workspace:~"
"@rocket.chat/layout": "npm:~0.32.0"
"@rocket.chat/layout": "npm:^0.32.1"
"@rocket.chat/mock-providers": "workspace:~"
"@rocket.chat/tools": "workspace:~"
"@rocket.chat/ui-client": "workspace:^"
Expand Down
Loading