Skip to content
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

Feat/pages users #27

Merged
merged 28 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f868dd
feat: users page layout
ssagg Jun 11, 2024
ebb990c
fix:sidebar animations
ssagg Jun 12, 2024
20afe68
feat: added mock data
ssagg Jun 12, 2024
228f9f9
fix: sticky sidebar
ssagg Jun 12, 2024
64d5a92
feat:added organizations modal to users page, added notifications modal
ssagg Jun 13, 2024
6ddf63d
fix:sidebar pin position, sidebar styles, title style
ssagg Jun 13, 2024
adbd32a
fix: user-card layout
ssagg Jun 13, 2024
ff2805b
fix:checkbox uncheced icon added
ssagg Jun 14, 2024
d13efd2
fix: checkbox component fixed
ssagg Jun 14, 2024
ebd958f
fix:usercard checkbox scroll fix
ssagg Jun 14, 2024
0bb793c
feat:dummy data for usercard, data interfaces
ssagg Jun 14, 2024
17fcd34
fix:typecheck and lint
ssagg Jun 15, 2024
cf68a6a
Merge remote-tracking branch 'origin/master' into feat/pages-users
ssagg Jun 16, 2024
db715fd
fix:pull master
ssagg Jun 16, 2024
cb0a15f
fix:layout fix,routes as next router
ssagg Jun 17, 2024
b56a9d8
fix:ts interfaces for users
ssagg Jun 17, 2024
fff2774
fix:ts checks
ssagg Jun 17, 2024
14abb1a
fix:ts checks
ssagg Jun 17, 2024
65e9b1e
fix:ts checks
ssagg Jun 17, 2024
87d1816
fix:use client to fragments
ssagg Jun 17, 2024
c3a5f18
fix: ts check
ssagg Jun 17, 2024
a872abe
fix: 'use client' moved deeper, index page to server component
ssagg Jun 18, 2024
5c93f53
fix: conflicts resolving, fragments renamed to one style, theme selec…
ssagg Jun 19, 2024
bd07094
fix: theme selector unused styled removed
ssagg Jun 19, 2024
c6004eb
feat:preloader in base layout, sudebar links changed to next
ssagg Jun 19, 2024
4b3b8ed
fix:fragments renamed to the same style, usePath added to sidebar
ssagg Jun 19, 2024
42a2d87
fix:removed unused packages
ssagg Jun 19, 2024
e56d543
fix:unnecessary next.config removed
ssagg Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,846 changes: 2,768 additions & 2,078 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file modified .yarn/releases/yarn-remote.cjs
100755 → 100644
Empty file.
3 changes: 0 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
packageExtensions:
'@atls-ui-parts/sidebar@*':
peerDependencies:
'@atls-ui-parts/switch': '*'
glob-promise@*:
dependencies:
glob: '7.2.3'
Expand Down
3 changes: 2 additions & 1 deletion app/entrypoints/renderer/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"users-modal.subTitle": "Участники",
"users-modal.button-remove": "Удалить",
"users-title.title": "Команда",
"registration-page.login-button": "Войти с помощью GitHub"
"registration-page.login-button": "Войти с помощью GitHub",
"preloader.text": "Загрузка..."
}
8 changes: 8 additions & 0 deletions app/entrypoints/renderer/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ const __dirname = dirname(__filename)

/** @type {import('next').NextConfig} */
export default {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
},
experimental: {
externalDir: true,
outputFileTracingRoot: join(__dirname, './'),
Expand Down
6 changes: 4 additions & 2 deletions app/entrypoints/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"react-intl": "6.6.8"
},
"devDependencies": {
"@app/base-layout-fragment": "workspace:*",
"@app/dashboard-redirect-page": "workspace:*",
"@app/base-layout": "workspace:*",
"@app/index-page": "workspace:*",
"@app/loading": "workspace:*",
"@app/organizations-page": "workspace:*",
"@app/registration-page": "workspace:*",
"@app/users-page": "workspace:*",
"@emotion/react": "11.11.4",
"@types/node": "20.12.12",
"@types/react": "18.3.3",
Expand Down
10 changes: 8 additions & 2 deletions app/entrypoints/renderer/src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import React from 'react'
import { Suspense } from 'react'

import { BaseLayout } from '@app/base-layout-fragment'
import { BaseLayout } from '@app/base-layout'
import { Loading } from '@app/loading'

const Layout = ({ children }) => <BaseLayout>{children}</BaseLayout>
const Layout = ({ children }) => (
<BaseLayout>
<Suspense fallback={<Loading />}>{children}</Suspense>
</BaseLayout>
)

export default Layout
1 change: 1 addition & 0 deletions app/entrypoints/renderer/src/app/(dashboard)/users/page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@app/users-page'
2 changes: 1 addition & 1 deletion app/entrypoints/renderer/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@app/dashboard-redirect-page'
export { default } from '@app/index-page'
31 changes: 0 additions & 31 deletions app/entrypoints/renderer/src/next.config.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export const AddMemberModal: FC<AddMemberModalProps> = memo(({ open, onBackdropC
return (
<Modal open={open} padding={theme.spaces.increased} onBackdropClick={onBackdropClick}>
<Column gap={theme.spaces.moderate}>
<Text fontSize='normal.increased'>{formatMessage({ id: 'add-member-modal.header' })}</Text>
<Text fontSize='normal.increased'>
{formatMessage({ id: 'app-add-member-modal.header' })}
</Text>
{inputValues.map((_inputValue: string, index: number) => (
<AddMemberModalInput
inputIndex={index}
Expand Down Expand Up @@ -99,7 +101,7 @@ export const AddMemberModal: FC<AddMemberModalProps> = memo(({ open, onBackdropC
size='middlingRoundedPadding'
>
<Text fontSize='normal.semiDefault' fontWeight='normal' color={theme.colors.white}>
{formatMessage({ id: 'add-member-modal.invite' })}
{formatMessage({ id: 'app-add-member-modal.invite' })}
</Text>
</Button>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>
<Modal open={open} width={theme.spaces.superPuperExtra} onBackdropClick={onBackdropClick}>
<Column flexDirection='column' gap={theme.spaces.large}>
<Text fontSize='medium.semiReduced' fontWeight='normal' padding={theme.spaces.micro}>
{formatMessage({ id: 'add-member-to-organization-modal.header' })}
{formatMessage({ id: 'app-add-member-to-organization-modal.header' })}
</Text>
<SelectInput
placeholder={formatMessage({ id: 'add-member-to-organization-modal_input.placeholder' })}
Expand All @@ -65,7 +65,7 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>
rowGap={theme.spaces.large}
>
<Text fontSize='normal.semiIncreased' width='100%'>
{formatMessage({ id: 'add-member-to-organization-modal.teams' })}
{formatMessage({ id: 'app-add-member-to-organization-modal.teams' })}
</Text>
<TeamSwitch teamName='Design' onChange={(e) => handlerSwitch(e, 'design')} />
<TeamSwitch teamName='Frontend' onChange={(e) => handlerSwitch(e, 'frontend')} />
Expand All @@ -80,7 +80,7 @@ export const AddMemberToOrganizationModal: FC<AddMemberToOrganizationModalProps>
size='middlingRoundedPadding'
>
<Text fontSize='normal.semiDefault' fontWeight='normal' color={theme.colors.white}>
{formatMessage({ id: 'add-member-to-organization-modal.button' })}
{formatMessage({ id: 'app-add-member-to-organization-modal.button' })}
</Text>
</Button>
</Row>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@app/base-layout-fragment",
"name": "@app/base-layout",
"version": "0.0.1",
"private": true,
"license": "BSD-3-Clause",
Expand Down
41 changes: 41 additions & 0 deletions app/fragments/app-base-layout/src/base-layout.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
'use client'

import { useTheme } from '@emotion/react'

import React from 'react'
import { FC } from 'react'
import { PropsWithChildren } from 'react'

import { ThemeSelector } from '@app/theme-selector'
import { UsersTitle } from '@app/users-title'
import { Row } from '@ui/layout'
import { Column } from '@ui/layout'
import { Sidebar } from '@ui/sidebar'

import { AVATAR } from './base-layout.constants.js'
import { EMAIL } from './base-layout.constants.js'
import { NAME } from './base-layout.constants.js'
import { BaseLayoutProps } from './base-layout.interfaces.js'

export const BaseLayout: FC<PropsWithChildren<BaseLayoutProps>> = ({ children }) => {
const theme: any = useTheme()
return (
<Row backgroundColor={theme.backgrounds.main}>
<Sidebar name={NAME} email={EMAIL} src={AVATAR} />
<Column alignItems='center' flex={1}>
<ThemeSelector />
<Column
maxWidth={theme.spaces.extraSuperLarge}
margin={theme.spaces.horizontalAutoMargin}
minHeight={theme.spaces.fullVh}
gap={theme.spaces.large}
justifyContent='flex-start'
alignItems='flex-start'
>
<UsersTitle />
{children}
</Column>
</Column>
</Row>
)
}
3 changes: 3 additions & 0 deletions app/fragments/app-base-layout/src/base-layout.constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const NAME = 'Bill Gates'
export const EMAIL = '[email protected]'
export const AVATAR = '/profile.png'
5 changes: 5 additions & 0 deletions app/fragments/app-base-layout/src/base-layout.interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface BaseLayoutProps {
name?: string
email?: string
avatar?: string
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@app/dashboard-redirect-page",
"name": "@app/loading",
"version": "0.0.1",
"private": true,
"type": "module",
Expand All @@ -8,14 +8,15 @@
},
"main": "src/index.ts",
"dependencies": {
"@app/dashboard-redirect": "workspace:*"
"@ui/preloader": "workspace:*"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"@emotion/react": "11.11.4",
"@types/react": "^18.3.2",
"@types/react-dom": "18.3.0"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
"@emotion/react": "*",
"react": "*"
}
}
1 change: 1 addition & 0 deletions app/fragments/app-loading/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './loading.component.js'
10 changes: 10 additions & 0 deletions app/fragments/app-loading/src/loading.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use client'

import React from 'react'
import { FC } from 'react'

import { Preloader } from '@ui/preloader'

const Loading: FC = () => <Preloader />

export { Loading }
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ const NotificationsModal: FC<NotificationsModalProps> = ({
date,
open,
notifiaction,
onBackdropClick,
}) => {
const { formatMessage } = useIntl()
const theme = useTheme() as ThemeType

return (
<Modal
top={theme.spaces.huge}
left='auto'
bottom='auto'
right={theme.spaces.mini}
open={open}
position='absolute'
width={theme.spaces.largeSemiLargeIncreased}
onBackdropClick={() => undefined as void}
onBackdropClick={onBackdropClick}
>
<Column>
<Text
maxWidth={theme.spaces.superBiggest}
marginBottom={theme.spaces.micro}
fontSize='medium.semiReduced'
color='GRAY_1600'
>
<Text marginBottom={theme.spaces.micro} fontSize='medium.semiReduced' color='GRAY_1600'>
{formatMessage({ id: 'notifications-modal.title' })}
</Text>
<Scroll height={theme.spaces.largeSemiDecreased}>
Expand Down Expand Up @@ -76,12 +77,7 @@ const NotificationsModal: FC<NotificationsModalProps> = ({
</Scroll>

<Box justifyContent='center'>
<Text
color='indigo'
maxWidth={theme.spaces.superBiggest}
marginBottom={theme.spaces.micro}
fontSize='normal.semiDefault'
>
<Text color='indigo' marginBottom={theme.spaces.micro} fontSize='normal.semiDefault'>
{formatMessage({ id: 'notifications-modal.mark-all-read' })}
</Text>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export interface NotificationsModalProps {
avatar: string
name: string
date: string
name?: string
date?: string
open: boolean
notifiaction: boolean
notifiaction?: boolean
onBackdropClick: () => void
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ import { Modal } from '@ui/modal'
import { Text } from '@ui/text'
import { ThemeType } from '@ui/theme'

import { Organization } from './organizations-modal.interfaces.js'
import { OrganizationsModalProps } from './organizations-modal.interfaces.js'

const OrganizationsModal: FC<OrganizationsModalProps> = memo(({ organization, img, open }) => {
const OrganizationsModal: FC<OrganizationsModalProps> = memo(({
organizationsData,
open,
onBackdropClick,
}) => {
const { formatMessage } = useIntl()
const theme = useTheme() as ThemeType

Expand All @@ -24,7 +29,7 @@ const OrganizationsModal: FC<OrganizationsModalProps> = memo(({ organization, im
open={open}
width={theme.spaces.superExtraIncreased}
padding={theme.spaces.large}
onBackdropClick={() => undefined as void}
onBackdropClick={onBackdropClick}
>
<Column>
<Text
Expand All @@ -41,7 +46,9 @@ const OrganizationsModal: FC<OrganizationsModalProps> = memo(({ organization, im
alignItems='flex-start'
maxWidth={theme.spaces.largeDefaultIncreased}
>
<AnimatedCard img={img} organization={organization} />
{organizationsData.map((org: Organization) => (
<AnimatedCard img={org.organizationLogo} organization={org.name} />
))}
</Box>

<Box justifyContent='flex-end'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
export interface OrganizationsModalProps {
organization: string
img: string
organizationsData: Organization[]
open: boolean
onBackdropClick: () => void
}

export interface Organization {
name: string
organizationLogo: string
}
1 change: 1 addition & 0 deletions app/fragments/app-theme-selector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"main": "src/index.ts",
"dependencies": {
"@app/notifications-modal": "workspace:*",
"@ui/button": "workspace:*",
"@ui/icons": "workspace:*",
"@ui/layout": "workspace:*",
Expand Down
Loading