-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: tests * fix: allow http only in local env * fix: enable submit btn * fix: skip un-implemented feature tests * fix: updated password to meet validation requirements * fix: close color picker * fix: data test id and password * fix: get sub value and intercept * fix: editor not submiting * fix: add side nav * revert: changes * test: Force when off screen * test: More force * test: Attempt flakiness fix for org switcher * refactor: Extract SidebarFormless and reuse const + styles * refactor: Use new SidebarFormless component * ci: Skip playwright test * ci: Clean-up to retrigger pipelines * test: Add mock feature flag false to old test --------- Co-authored-by: Joel Anton <[email protected]>
- Loading branch information
1 parent
37efbbe
commit d3c9e17
Showing
18 changed files
with
343 additions
and
208 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
apps/api/src/app/organization/dtos/update-branding-details.dto.ts
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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,7 @@ | ||
export const COLLAPSED_WIDTH = 600; | ||
export const NAVIGATION_WIDTH = 272; | ||
/** | ||
* @deprecated | ||
* TODO:Remove this once Information Architecture is 100% live | ||
*/ | ||
export const LEGACY_NAVIGATION_WIDTH = 300; |
This file contains 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,83 @@ | ||
import { css } from '@emotion/css'; | ||
import styled from '@emotion/styled'; | ||
import { createStyles, MantineTheme } from '@mantine/core'; | ||
import { FeatureFlagsKeysEnum } from '@novu/shared'; | ||
import { useFeatureFlag } from '@novu/shared-web'; | ||
import { colors, shadows } from '../config'; | ||
import { NAVIGATION_WIDTH, LEGACY_NAVIGATION_WIDTH, COLLAPSED_WIDTH } from './Sidebar.const'; | ||
import { ISidebarBaseProps } from './Sidebar.types'; | ||
|
||
export const HeaderHolder = styled.div` | ||
display: flex; | ||
flex-wrap: nowrap; | ||
gap: 12px; | ||
margin: 24px; | ||
margin-bottom: 0; | ||
`; | ||
|
||
export const scrollable = css` | ||
overflow-x: hidden; | ||
overflow-y: auto; | ||
`; | ||
|
||
export const BodyHolder = styled.div<{ isParentScrollable: boolean }>` | ||
display: flex; | ||
flex-direction: column; | ||
${(props) => !props.isParentScrollable && scrollable}; | ||
margin: 0 24px; | ||
gap: 24px; | ||
padding-right: 5px; | ||
margin-right: 19px; | ||
height: 100%; | ||
`; | ||
|
||
export const FooterHolder = styled.div` | ||
display: flex; | ||
flex-wrap: nowrap; | ||
gap: 6px; | ||
margin: 24px; | ||
margin-top: 0; | ||
margin-top: auto; | ||
`; | ||
|
||
export const useDrawerStyles = createStyles( | ||
(theme: MantineTheme, { isExpanded }: Pick<ISidebarBaseProps, 'isExpanded'>) => { | ||
/** | ||
* TODO: Remove this feature flag and navigationWidth once the information architecture is enabled for all users | ||
*/ | ||
const isInformationArchitectureEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_INFORMATION_ARCHITECTURE_ENABLED); | ||
const navigationWidth = isInformationArchitectureEnabled ? NAVIGATION_WIDTH : LEGACY_NAVIGATION_WIDTH; | ||
|
||
return { | ||
root: { | ||
position: 'absolute', | ||
}, | ||
drawer: { | ||
position: 'fixed', | ||
top: 40, | ||
right: 0, | ||
bottom: 0, | ||
backgroundColor: theme.colorScheme === 'dark' ? colors.B17 : colors.white, | ||
borderTopLeftRadius: 7, | ||
borderBottomLeftRadius: 7, | ||
boxShadow: shadows.dark, | ||
width: isExpanded ? `calc(100% - ${navigationWidth}px)` : COLLAPSED_WIDTH, | ||
transition: 'all 300ms ease !important', | ||
'@media screen and (max-width: 768px)': { | ||
width: isExpanded ? `100%` : COLLAPSED_WIDTH, | ||
}, | ||
}, | ||
body: { | ||
height: '100%', | ||
}, | ||
}; | ||
} | ||
); | ||
|
||
export const sidebarDrawerContentClassName = css` | ||
height: 100%; | ||
overflow: hidden; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 24px; | ||
`; |
Oops, something went wrong.