Skip to content
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

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Nov 14, 2024

image

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 10:07am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Nov 15, 2024 10:07am

Copy link
Contributor

github-actions bot commented Nov 14, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

process.env.UNLEASH_EXPERIMENTAL_SHOW_USER_DEVICE_COUNT,
false,
),
showUserDeviceCount: {
Copy link
Contributor

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>
Copy link
Contributor

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?

Copy link
Member Author

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) => (
Copy link
Contributor

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

Copy link
Member Author

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})`}>
Copy link
Contributor

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,
Copy link
Contributor

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?

@Tymek Tymek enabled auto-merge (squash) November 15, 2024 10:00
@Tymek Tymek merged commit 9d5fceb into main Nov 15, 2024
12 checks passed
@Tymek Tymek deleted the feat/show-parallel-sessions branch November 15, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants