-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: show users with multiple parallel sessions #8756
Conversation
Tymek
commented
Nov 14, 2024
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
process.env.UNLEASH_EXPERIMENTAL_SHOW_USER_DEVICE_COUNT, | ||
false, | ||
), | ||
showUserDeviceCount: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, didn't know we could do that :)
@@ -356,7 +374,10 @@ const UsersList = () => { | |||
} | |||
elseShow={ | |||
<TablePlaceholder> | |||
No users available. Get started by adding one. | |||
<span data-loading> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it some extra cleanup you're doing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. Quick fix to not show "no users available" when loading. This table needs proper placeholder loading, but that will be done in another PR
Header: ' ', | ||
accessor: (row: any) => row.name || '', | ||
maxWidth: 40, | ||
Cell: ({ row: { original: user } }: any) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I normally specify a proper type I expect instead of any here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's an issue with old react-table. It's the same for other columns in this file. maybe we need to clean this up and migrate fully
<IconCell | ||
icon={ | ||
<> | ||
<Tooltip title={`Multiple parallel sessions (${count})`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe multiple browser sessions? for users it's probably more important that it's many browsers using the same app. It's more important for us that they are parallel.
export const UserSessionsCell: FC<UserSessionsCellProps> = ({ count }) => { | ||
const { uiConfig } = useUiConfig(); | ||
const minimumCountToShow = useVariant<number>( | ||
uiConfig.flags.showUserDeviceCount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a string as in other flags?
frontend/src/component/admin/users/UsersList/UserSessionsCell/UserSessionsCell.tsx
Outdated
Show resolved
Hide resolved
…UserSessionsCell.tsx