@@ -28,6 +28,8 @@ import type { FC, ReactNode } from "react";
28
28
import { useNavigate } from "react-router-dom" ;
29
29
import { getDisplayWorkspaceTemplateName } from "utils/workspace" ;
30
30
import { WorkspacesEmpty } from "./WorkspacesEmpty" ;
31
+ import { useDashboard } from "modules/dashboard/useDashboard" ;
32
+ import { visuallyHidden } from "@mui/utils" ;
31
33
32
34
export interface WorkspacesTableProps {
33
35
workspaces ?: readonly Workspace [ ] ;
@@ -52,6 +54,7 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
52
54
canCreateTemplate,
53
55
} ) => {
54
56
const theme = useTheme ( ) ;
57
+ const dashboard = useDashboard ( ) ;
55
58
56
59
return (
57
60
< TableContainer >
@@ -172,7 +175,7 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
172
175
) }
173
176
</ Stack >
174
177
}
175
- subtitle = { workspace . owner_name }
178
+ subtitle = { `user: ${ workspace . owner_name } ` }
176
179
avatar = {
177
180
< ExternalAvatar
178
181
src = { workspace . template_icon }
@@ -189,7 +192,29 @@ export const WorkspacesTable: FC<WorkspacesTableProps> = ({
189
192
</ TableCell >
190
193
191
194
< TableCell >
192
- { getDisplayWorkspaceTemplateName ( workspace ) }
195
+ < span css = { { display : "block" } } >
196
+ { getDisplayWorkspaceTemplateName ( workspace ) }
197
+ </ span >
198
+
199
+ { dashboard . showOrganizations && (
200
+ < span
201
+ css = { {
202
+ display : "block" ,
203
+ fontSize : 13 ,
204
+ color : theme . palette . text . secondary ,
205
+ lineHeight : 1.5 ,
206
+ } }
207
+ >
208
+ { /*
209
+ Only using shorthand version of "organizations" for aesthetics,
210
+ but because screen readers don't care about aesthetics, we can
211
+ always display the full text to them
212
+ */ }
213
+ org
214
+ < span css = { { ...visuallyHidden } } > anization</ span > :
215
+ { workspace . organization_name }
216
+ </ span >
217
+ ) }
193
218
</ TableCell >
194
219
195
220
< TableCell >
0 commit comments