Skip to content

Commit

Permalink
App bar elements repositioning (#3288)
Browse files Browse the repository at this point in the history
* chore: app bar reposition of elements

* chore: adding changeset

* chore: remove the design token
  • Loading branch information
chloe0592 authored Nov 6, 2023
1 parent 50adbd2 commit 41b15c7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
6 changes: 6 additions & 0 deletions .changeset/shaggy-bags-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@commercetools-frontend/application-components': patch
'@commercetools-frontend/application-shell': patch
---

Reposition of the App bar elements
52 changes: 24 additions & 28 deletions packages/application-shell/src/components/app-bar/app-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const AppBar = (props: Props) => {
css={css`
background-color: ${uikitDesignTokens.colorSurface};
box-shadow: ${appKitDesignTokens.shadowForAppbar};
padding: 0 40px;
min-height: ${DIMENSIONS.header};
position: relative;
width: 100%;
Expand All @@ -36,16 +37,6 @@ const AppBar = (props: Props) => {
`}
data-test="top-navigation"
>
<Spacings.Inline>
<div
id={REQUESTS_IN_FLIGHT_LOADER_DOM_ID}
css={css`
display: flex;
flex: 1;
`}
/>
</Spacings.Inline>

<div
css={css`
float: right;
Expand All @@ -58,8 +49,6 @@ const AppBar = (props: Props) => {
>
<Spacings.Inline scale="m" alignItems="center">
<Spacings.Inline scale="m" alignItems="center">
{/* This node is used by a react portal */}
<div id={CONTAINERS.LOCALE_SWITCHER} />
{(() => {
if (!props.user) {
return <LoadingPlaceholder shape="rect" size="s" />;
Expand All @@ -80,26 +69,33 @@ const AppBar = (props: Props) => {
if (!props.user.defaultProjectKey) return null;
return <BackToProject projectKey={previousProjectKey} />;
})()}
{/* This node is used by a react portal */}
<div id={CONTAINERS.LOCALE_SWITCHER} />
</Spacings.Inline>
<div
css={css`
border-left: 1px ${uikitDesignTokens.colorNeutral90} solid;
height: ${DIMENSIONS.headerItemDivider};
`}
/>
{props.user ? (
<UserSettingsMenu
language={props.user.language}
firstName={props.user.firstName}
lastName={props.user.lastName}
gravatarHash={props.user.gravatarHash}
email={props.user.email}
<Spacings.Inline>
<div
id={REQUESTS_IN_FLIGHT_LOADER_DOM_ID}
css={css`
display: flex;
flex: 1;
`}
/>
) : (
<LoadingPlaceholder shape="dot" size="l" />
)}
</Spacings.Inline>
</Spacings.Inline>
</div>
<div>
{props.user ? (
<UserSettingsMenu
language={props.user.language}
firstName={props.user.firstName}
lastName={props.user.lastName}
gravatarHash={props.user.gravatarHash}
email={props.user.email}
/>
) : (
<LoadingPlaceholder shape="dot" size="l" />
)}
</div>
</div>
);
};
Expand Down
1 change: 0 additions & 1 deletion packages/application-shell/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const DIMENSIONS = {
header: '56px',
headerItemDivider: '24px',
navMenu: '80px',
navMenuExpanded: '256px',
navMenuItemHeight: '48px',
Expand Down

2 comments on commit 41b15c7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-k2g29v352-commercetools.vercel.app

Built with commit 41b15c7.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for application-kit-custom-views ready!

✅ Preview
https://application-kit-custom-views-8tdosnpze-commercetools.vercel.app

Built with commit 41b15c7.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.