Repository navigation
refactor: admin workspace screens compose layout containers instead of Box #43275
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
Open
juliajforesti
wants to merge
4
commits into
develop
Choose a base branch
from
refactor/layout-admin-workspace
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+501
−208
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2d2dddd
fix: inset the workspace page content like the other admin pages
juliajforesti c5e051b
test: stories for admin workspace states the app rarely shows
juliajforesti 0c48ded
refactor: admin workspace screens compose layout containers instead o…
juliajforesti 15bb20f
refactor: the token modal's steps set their own font scale
juliajforesti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
13 changes: 5 additions & 8 deletions
13
...client/views/admin/workspace/DeploymentCard/components/InstancesModal/DescriptionList.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -1,23 +1,20 @@ | ||
| import { Box, Table, TableBody } from '@rocket.chat/fuselage'; | ||
| import { Table, TableBody } from '@rocket.chat/fuselage'; | ||
| import type { ReactNode } from 'react'; | ||
| import { memo } from 'react'; | ||
|
|
||
| import DescriptionListFrame from './layout/DescriptionListFrame'; | ||
|
|
||
| export type DescriptionListProps = { | ||
| children: ReactNode; | ||
| title?: string; | ||
| }; | ||
|
|
||
| const DescriptionList = ({ children, title }: DescriptionListProps) => ( | ||
| <Box paddingBlockEnd={32}> | ||
| {title && ( | ||
| <Box display='flex' justifyContent='flex-end' width='30%' paddingInline={8}> | ||
| {title} | ||
| </Box> | ||
| )} | ||
| <DescriptionListFrame title={title}> | ||
| <Table striped> | ||
| <TableBody>{children}</TableBody> | ||
| </Table> | ||
| </Box> | ||
| </DescriptionListFrame> | ||
| ); | ||
|
|
||
| export default memo(DescriptionList); |
23 changes: 23 additions & 0 deletions
23
.../admin/workspace/DeploymentCard/components/InstancesModal/layout/DescriptionListFrame.tsx
This file contains hidden or 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,23 @@ | ||
| import { Box } from '@rocket.chat/fuselage'; | ||
| import type { ReactNode } from 'react'; | ||
|
|
||
| type DescriptionListFrameProps = { | ||
| title?: string; | ||
| children: ReactNode; | ||
| }; | ||
|
|
||
| /** | ||
| * Frames a description list: its optional title over the label column, and room below before the next list. | ||
| */ | ||
| const DescriptionListFrame = ({ title, children }: DescriptionListFrameProps) => ( | ||
| <Box paddingBlockEnd='x32'> | ||
| {title && ( | ||
| <Box display='flex' justifyContent='flex-end' width='30%' paddingInline='x8'> | ||
| {title} | ||
| </Box> | ||
| )} | ||
| {children} | ||
| </Box> | ||
| ); | ||
|
|
||
| export default DescriptionListFrame; |
This file contains hidden or 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
29 changes: 29 additions & 0 deletions
29
apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.stories.tsx
This file contains hidden or 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,29 @@ | ||
| import type { IStats } from '@rocket.chat/core-typings'; | ||
| import type { Meta, StoryObj } from '@storybook/react'; | ||
|
|
||
| import UsersUploadsCard from './UsersUploadsCard'; | ||
|
|
||
| export default { | ||
| component: UsersUploadsCard, | ||
| parameters: { | ||
| layout: 'centered', | ||
| }, | ||
| args: { | ||
| statistics: { | ||
| onlineUsers: 12, | ||
| busyUsers: 3, | ||
| awayUsers: 5, | ||
| offlineUsers: 80, | ||
| totalUsers: 100, | ||
| totalConnectedUsers: 20, | ||
| activeUsers: 90, | ||
| activeGuests: 4, | ||
| nonActiveUsers: 6, | ||
| appUsers: 2, | ||
| uploadsTotal: 321, | ||
| uploadsTotalSize: 123456789, | ||
| } as IStats, | ||
| }, | ||
| } satisfies Meta<typeof UsersUploadsCard>; | ||
|
|
||
| export const Default: StoryObj<typeof UsersUploadsCard> = {}; |
This file contains hidden or 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
33 changes: 33 additions & 0 deletions
33
...eor/client/views/admin/workspace/VersionCard/components/VersionCardActionItem.stories.tsx
This file contains hidden or 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,33 @@ | ||
| import { ExternalLink } from '@rocket.chat/ui-client'; | ||
| import type { Meta, StoryObj } from '@storybook/react'; | ||
|
|
||
| import VersionCardActionItem from './VersionCardActionItem'; | ||
|
|
||
| export default { | ||
| component: VersionCardActionItem, | ||
| parameters: { | ||
| layout: 'padded', | ||
| }, | ||
| args: { | ||
| icon: 'check', | ||
| label: 'Operating within plan limits', | ||
| }, | ||
| } satisfies Meta<typeof VersionCardActionItem>; | ||
|
|
||
| type Story = StoryObj<typeof VersionCardActionItem>; | ||
|
|
||
| export const Default: Story = {}; | ||
|
|
||
| export const Danger: Story = { | ||
| args: { danger: true, icon: 'warning', label: 'Plan limits reached' }, | ||
| }; | ||
|
|
||
| export const WithLink: Story = { | ||
| args: { | ||
| label: ( | ||
| <> | ||
| Version <ExternalLink to='https://go.rocket.chat/i/version-support'>supported</ExternalLink> until Dec 31, 2026 | ||
| </> | ||
| ), | ||
| }, | ||
| }; |
This file contains hidden or 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
20 changes: 20 additions & 0 deletions
20
...eteor/client/views/admin/workspace/VersionCard/components/VersionCardSkeleton.stories.tsx
This file contains hidden or 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,20 @@ | ||
| import { Card } from '@rocket.chat/fuselage'; | ||
| import type { Meta, StoryObj } from '@storybook/react'; | ||
|
|
||
| import { VersionCardSkeleton } from './VersionCardSkeleton'; | ||
|
|
||
| export default { | ||
| component: VersionCardSkeleton, | ||
| parameters: { | ||
| layout: 'padded', | ||
| }, | ||
| decorators: [ | ||
| (Story) => ( | ||
| <Card> | ||
| <Story /> | ||
| </Card> | ||
| ), | ||
| ], | ||
| } satisfies Meta<typeof VersionCardSkeleton>; | ||
|
|
||
| export const Default: StoryObj<typeof VersionCardSkeleton> = {}; |
16 changes: 9 additions & 7 deletions
16
apps/meteor/client/views/admin/workspace/VersionCard/components/VersionCardSkeleton.tsx
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.