-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into refactor/teamInfo
- Loading branch information
Showing
67 changed files
with
1,221 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixed Security tab visibility to allow password changes when 2FA/E2E is disabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Increased the timeout between calls for the three remaining Omnichannel Agenda Jobs. This should make them happen less often and reduce the load on MongoDB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
Introduces sidebar navigability, allowing users to navigate on sidebar channels through keyboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixed supported versions not being updated in airgapped environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixed custom OAuth roles not synced on the first login (on user creation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { makeFunction } from '@rocket.chat/patch-injection'; | ||
import type { BrokerNode } from 'moleculer'; | ||
|
||
export const getInstanceList = makeFunction(async (): Promise<BrokerNode[]> => []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { HTMLAttributes, Ref } from 'react'; | ||
import React, { forwardRef } from 'react'; | ||
|
||
const RoomListRoomWrapper = forwardRef(function RoomListRoomWrapper(props: HTMLAttributes<HTMLDivElement>, ref: Ref<HTMLDivElement>) { | ||
return <div role='listitem' ref={ref} {...props} />; | ||
}); | ||
|
||
export default RoomListRoomWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useMergedRefs } from '@rocket.chat/fuselage-hooks'; | ||
import { useTranslation } from '@rocket.chat/ui-contexts'; | ||
import type { HTMLAttributes, Ref } from 'react'; | ||
import React, { forwardRef } from 'react'; | ||
|
||
import { useSidebarListNavigation } from './useSidebarListNavigation'; | ||
|
||
const RoomListWrapper = forwardRef(function RoomListWrapper(props: HTMLAttributes<HTMLDivElement>, ref: Ref<HTMLDivElement>) { | ||
const t = useTranslation(); | ||
const { sidebarListRef } = useSidebarListNavigation(); | ||
const mergedRefs = useMergedRefs(ref, sidebarListRef); | ||
|
||
return <div role='list' aria-label={t('Channels')} ref={mergedRefs} {...props} />; | ||
}); | ||
|
||
export default RoomListWrapper; |
99 changes: 99 additions & 0 deletions
99
apps/meteor/client/sidebar/RoomList/useSidebarListNavigation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { useFocusManager } from '@react-aria/focus'; | ||
import { useCallback } from 'react'; | ||
|
||
const isListItem = (node: EventTarget) => (node as HTMLElement).classList.contains('rcx-sidebar-item'); | ||
const isListItemMenu = (node: EventTarget) => (node as HTMLElement).classList.contains('rcx-sidebar-item__menu'); | ||
|
||
/** | ||
* Custom hook to provide the sidebar navigation by keyboard. | ||
* @param ref - A ref to the message list DOM element. | ||
*/ | ||
export const useSidebarListNavigation = () => { | ||
const sidebarListFocusManager = useFocusManager(); | ||
|
||
const sidebarListRef = useCallback( | ||
(node: HTMLElement | null) => { | ||
let lastItemFocused: HTMLElement | null = null; | ||
|
||
if (!node) { | ||
return; | ||
} | ||
|
||
node.addEventListener('keydown', (e) => { | ||
if (!e.target) { | ||
return; | ||
} | ||
|
||
if (!isListItem(e.target)) { | ||
return; | ||
} | ||
|
||
if (e.key === 'Tab') { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
|
||
if (e.shiftKey) { | ||
sidebarListFocusManager.focusPrevious({ | ||
accept: (node) => !isListItem(node) && !isListItemMenu(node), | ||
}); | ||
} else if (isListItemMenu(e.target)) { | ||
sidebarListFocusManager.focusNext({ | ||
accept: (node) => !isListItem(node) && !isListItemMenu(node), | ||
}); | ||
} else { | ||
sidebarListFocusManager.focusNext({ | ||
accept: (node) => !isListItem(node), | ||
}); | ||
} | ||
} | ||
|
||
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') { | ||
if (e.key === 'ArrowUp') { | ||
sidebarListFocusManager.focusPrevious({ accept: (node) => isListItem(node) }); | ||
} | ||
|
||
if (e.key === 'ArrowDown') { | ||
sidebarListFocusManager.focusNext({ accept: (node) => isListItem(node) }); | ||
} | ||
|
||
lastItemFocused = document.activeElement as HTMLElement; | ||
} | ||
}); | ||
|
||
node.addEventListener( | ||
'blur', | ||
(e) => { | ||
if ( | ||
!(e.relatedTarget as HTMLElement)?.classList.contains('focus-visible') || | ||
!(e.currentTarget instanceof HTMLElement && e.relatedTarget instanceof HTMLElement) | ||
) { | ||
return; | ||
} | ||
|
||
if (!e.currentTarget.contains(e.relatedTarget) && !lastItemFocused) { | ||
lastItemFocused = e.target as HTMLElement; | ||
} | ||
}, | ||
{ capture: true }, | ||
); | ||
|
||
node.addEventListener( | ||
'focus', | ||
(e) => { | ||
const triggeredByKeyboard = (e.target as HTMLElement)?.classList.contains('focus-visible'); | ||
if (!triggeredByKeyboard || !(e.currentTarget instanceof HTMLElement && e.relatedTarget instanceof HTMLElement)) { | ||
return; | ||
} | ||
|
||
if (lastItemFocused && !e.currentTarget.contains(e.relatedTarget) && node.contains(e.target as HTMLElement)) { | ||
lastItemFocused?.focus(); | ||
} | ||
}, | ||
{ capture: true }, | ||
); | ||
}, | ||
[sidebarListFocusManager], | ||
); | ||
|
||
return { sidebarListRef }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.