Skip to content

Commit 54a9cda

Browse files
Merge branch 'main' into fix/implementer-tools-tree-description-crash
2 parents 9f8768a + bfcf444 commit 54a9cda

File tree

3 files changed

+56
-61
lines changed

3 files changed

+56
-61
lines changed

packages/framework/esm-styleguide/src/patient-banner/actions-menu/patient-banner-actions-menu.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function PatientBannerActionsMenu({
4141
</>
4242
}
4343
>
44-
<ExtensionSlot name="patient-actions-slot" key="patient-actions-slot" state={patientActionsSlotState} />
44+
<ExtensionSlot name={actionsSlotName} key={actionsSlotName} state={patientActionsSlotState} />
4545
</CustomOverflowMenu>
4646
</div>
4747
) : null}

packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
7676
workspaceTitleByWorkspaceName,
7777
setWorkspaceTitle,
7878
} = useWorkspace2Store();
79-
const { workspaceName, isRootWorkspace, isLeafWorkspace, closeWorkspace } = useContext(SingleSpaContext);
79+
const { workspaceName, isRootWorkspace, closeWorkspace } = useContext(SingleSpaContext);
8080

8181
const openedWindowIndex = getOpenedWindowIndexByWorkspace(workspaceName);
8282

@@ -138,6 +138,7 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
138138
className={classNames(styles.workspaceMiddleContainer, {
139139
[styles.maximized]: maximized,
140140
[styles.hidden]: openedWindow.hidden,
141+
[styles.isRootWorkspace]: isRootWorkspace,
141142
})}
142143
>
143144
<div
@@ -147,62 +148,60 @@ export const Workspace2: React.FC<Workspace2Props> = ({ title, children, hasUnsa
147148
[styles.isRootWorkspace]: isRootWorkspace,
148149
})}
149150
>
150-
{isLeafWorkspace && (
151-
<>
152-
<Header aria-label={getCoreTranslation('workspaceHeader')} className={styles.header}>
153-
<HeaderName prefix="">{title}</HeaderName>
154-
<div className={styles.overlayHeaderSpacer} />
155-
<HeaderGlobalBar className={styles.headerButtons}>
156-
{isDesktop(layout) ? (
157-
<>
158-
{(canMaximize || maximized) && (
159-
<HeaderGlobalAction
160-
aria-label={maximized ? getCoreTranslation('minimize') : getCoreTranslation('maximize')}
161-
onClick={() => setWindowMaximized(windowName, !maximized)}
162-
>
163-
{maximized ? <Minimize /> : <Maximize />}
164-
</HeaderGlobalAction>
165-
)}
166-
{canHide ? (
167-
<HeaderGlobalAction
168-
aria-label={getCoreTranslation('hide')}
169-
onClick={() => hideWindow(windowName)}
170-
>
171-
<ArrowRightIcon />
172-
</HeaderGlobalAction>
173-
) : (
174-
<HeaderGlobalAction
175-
aria-label={getCoreTranslation('close')}
176-
onClick={() => closeWorkspace({ closeWindow: true })}
177-
>
178-
<CloseIcon />
179-
</HeaderGlobalAction>
180-
)}
181-
</>
182-
) : (
183-
<>
184-
{canHide && (
185-
<HeaderGlobalAction
186-
aria-label={getCoreTranslation('hide')}
187-
onClick={() => hideWindow(windowName)}
188-
>
189-
<DownToBottom />
190-
</HeaderGlobalAction>
191-
)}
192-
151+
<>
152+
<Header aria-label={getCoreTranslation('workspaceHeader')} className={styles.header}>
153+
<HeaderName prefix="">{title}</HeaderName>
154+
<div className={styles.overlayHeaderSpacer} />
155+
<HeaderGlobalBar className={styles.headerButtons}>
156+
{isDesktop(layout) ? (
157+
<>
158+
{(canMaximize || maximized) && (
159+
<HeaderGlobalAction
160+
aria-label={maximized ? getCoreTranslation('minimize') : getCoreTranslation('maximize')}
161+
onClick={() => setWindowMaximized(windowName, !maximized)}
162+
>
163+
{maximized ? <Minimize /> : <Maximize />}
164+
</HeaderGlobalAction>
165+
)}
166+
{canHide ? (
167+
<HeaderGlobalAction
168+
aria-label={getCoreTranslation('hide')}
169+
onClick={() => hideWindow(windowName)}
170+
>
171+
<ArrowRightIcon />
172+
</HeaderGlobalAction>
173+
) : (
193174
<HeaderGlobalAction
194175
aria-label={getCoreTranslation('close')}
195176
onClick={() => closeWorkspace({ closeWindow: true })}
196177
>
197178
<CloseIcon />
198179
</HeaderGlobalAction>
199-
</>
200-
)}
201-
</HeaderGlobalBar>
202-
</Header>
203-
<div className={classNames(styles.workspaceContent)}>{children}</div>
204-
</>
205-
)}
180+
)}
181+
</>
182+
) : (
183+
<>
184+
{canHide && (
185+
<HeaderGlobalAction
186+
aria-label={getCoreTranslation('hide')}
187+
onClick={() => hideWindow(windowName)}
188+
>
189+
<DownToBottom />
190+
</HeaderGlobalAction>
191+
)}
192+
193+
<HeaderGlobalAction
194+
aria-label={getCoreTranslation('close')}
195+
onClick={() => closeWorkspace({ closeWindow: true })}
196+
>
197+
<CloseIcon />
198+
</HeaderGlobalAction>
199+
</>
200+
)}
201+
</HeaderGlobalBar>
202+
</Header>
203+
<div className={classNames(styles.workspaceContent)}>{children}</div>
204+
</>
206205
</div>
207206
</div>
208207
</div>

packages/framework/esm-styleguide/src/workspaces2/workspace2.module.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ $extraWideWorkspaceWidth: 48.25rem;
3636
inset-inline-end: var(--actionPanelOffset);
3737
z-index: 100;
3838

39-
animation: growToWidth 0.5s ease-in-out;
39+
&.isRootWorkspace {
40+
animation: growToWidth 0.5s ease-in-out;
41+
}
42+
4043
transition: width 0.5s ease-in-out;
4144

4245
&.maximized {
@@ -67,9 +70,7 @@ $extraWideWorkspaceWidth: 48.25rem;
6770
border-inline-start: 1px solid $text-03;
6871
background-color: #fff;
6972

70-
transition:
71-
width 0.5s ease-in-out,
72-
transform 0.5s ease-in-out;
73+
transition: width 0.5s ease-in-out;
7374

7475
&.maximized {
7576
width: calc(100vw - var(--actionPanelOffset));
@@ -176,7 +177,6 @@ $extraWideWorkspaceWidth: 48.25rem;
176177
.header {
177178
position: relative;
178179
background-color: var(--brand-02);
179-
margin-inline-start: layout.$spacing-04;
180180

181181
a {
182182
color: $ui-02;
@@ -209,10 +209,6 @@ $extraWideWorkspaceWidth: 48.25rem;
209209
&.isRootWorkspace {
210210
animation: slideFromBottom 0.5s ease-in-out;
211211
}
212-
213-
// .hidden {
214-
// width: 0 !important;
215-
// }
216212
}
217213

218214
.marginWorkspaceContent {

0 commit comments

Comments
 (0)