Skip to content

Commit

Permalink
feat(global): apollo, miniapp utils and tracing ADRs 👣😎 (#5202)
Browse files Browse the repository at this point in the history
* feat(miniapp-utils): INFRA-456 miniapp utils introduced 🤗

* feat(apollo): INFRA-456 apollo package introduced 🤗

* fix(global): INFRA-456 update contact info

* fix(global): INFRA-456 list helpers added

* feat(apollo): INFRA-456 apollo utils added

* fix(apollo): INFRA-456 fix typings

* feat(apollo): INFRA-456 main exports added

* feat(global): INFRA-456 build setup

* refactor(resident-app): INFRA-456 update ts

* fix(global): INFRA-456 fixed typings

* docs(miniapp-utils): INFRA-456 JSDocs added

* chore(dev-portal): INFRA-456 fix styling after antd update

* chore(global): INFRA-456 remove debug build

* docs(apollo): INFRA-456 added JSDoc

* chore(resident-app): INFRA-456 tmp commit

* chore(resident-app): INFRA-456 tmp commit

* refactor(resident-app): INFRA-456 hooks replaced

* refactor(resident-app): INFRA-456 extractor replaced

* refactor(resident-app): INFRA-456 persistor migrated

* refactor(resident-app): INFRA-456 list helper migrated

* refactor(resident-app): INFRA-456 migration finished

* fix(apollo): INFRA-456 fix esm module bundling

* feat(apollo): INFRA-456 compare caches by identity

* chore(apollo): INFRA-456 fixed addClientCache types

* chore(apollo): INFRA-456 fixed rollup scans

* fix(apollo): INFRA-456 fixed readPage length check

* fix(apollo): INFRA-456 fixed readPage length check

* feat(miniapp-utils): INFRA-456 apollo tracing middleware added

* feat(miniapp-utils): INFRA-456 apollo prepare context added

* feat(miniapp-utils): INFRA-456 apollo prepare context added

* feat(miniapp-utils): INFRA-456 added getClientSideFingerprint and getClientSideSenderInfo helpers

* docs(miniapp-utils): INFRA-456 readme finalized

* docs(miniapp-utils): INFRA-456 typos fixed

* docs(apollo): INFRA-456 readme drafted

* docs(apollo): INFRA-456 doc added

* docs(apollo): INFRA-456 docs finished

* chore(global): INFRA-456 sync modules to main branches
  • Loading branch information
SavelevMatthew authored Sep 16, 2024
1 parent aec60d0 commit a9b7477
Show file tree
Hide file tree
Showing 34 changed files with 2,518 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: grid;
grid-column-gap: 20px;
grid-template-columns: 100px 1fr;
width: 100%;
}

.sub-section-main-col {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export const IconsSubsection: React.FC<{ id: string }> = ({ id }) => {

const { data } = useGetB2CAppQuery({ variables: { id } })

const name = get(data, ['app', 'name'], '')
const logo = get(data, ['app', 'logo', 'publicUrl'], DEFAULT_B2C_LOGO_URL)
const name = get(data, ['app', 'name'], '') as string
const logo = get(data, ['app', 'logo', 'publicUrl'], DEFAULT_B2C_LOGO_URL) as string

const [form] = Form.useForm()

Expand Down Expand Up @@ -131,28 +131,30 @@ export const IconsSubsection: React.FC<{ id: string }> = ({ id }) => {
<Col span={FULL_COL_SPAN}>
<Row gutter={ICON_WARNING_ROW_GUTTER}>
<Col span={FULL_COL_SPAN} className={styles.subSectionContainer}>
<B2CAppCard name={name} logo={logo}/>
<Row gutter={ROW_ICONS_CONTENT_GUTTER}>
<Col span={FULL_COL_SPAN}>
<Typography.Title type='secondary' level={4}>{MainIconTitle}</Typography.Title>
</Col>
<Col span={FULL_COL_SPAN}>
<Typography.Paragraph size='medium'>{MainIconDescription}</Typography.Paragraph>
<Typography.Paragraph size='medium'>{IconGuideText}</Typography.Paragraph>
</Col>
<Col span={FULL_COL_SPAN}>
<Form.Item name='mainIcon' valuePropName='fileList' getValueFromEvent={getFormFile}>
<Upload
listType='picture'
beforeUpload={beforeUpload}
maxCount={1}
multiple={false}
>
<UploadText>{UploadImageMessage}</UploadText>
</Upload>
</Form.Item>
</Col>
</Row>
<div className={styles.subSectionContainer}>
<B2CAppCard name={name} logo={logo}/>
<Row gutter={ROW_ICONS_CONTENT_GUTTER}>
<Col span={FULL_COL_SPAN}>
<Typography.Title type='secondary' level={4}>{MainIconTitle}</Typography.Title>
</Col>
<Col span={FULL_COL_SPAN}>
<Typography.Paragraph size='medium'>{MainIconDescription}</Typography.Paragraph>
<Typography.Paragraph size='medium'>{IconGuideText}</Typography.Paragraph>
</Col>
<Col span={FULL_COL_SPAN}>
<Form.Item name='mainIcon' valuePropName='fileList' getValueFromEvent={getFormFile}>
<Upload
listType='picture'
beforeUpload={beforeUpload}
maxCount={1}
multiple={false}
>
<UploadText>{UploadImageMessage}</UploadText>
</Upload>
</Form.Item>
</Col>
</Row>
</div>
</Col>
<Col span={FULL_COL_SPAN}>
<Alert
Expand Down
3 changes: 3 additions & 0 deletions apps/dev-portal/lib/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ let apolloClient: ApolloClient<NormalizedCacheObject> | undefined
function createApolloClient (): ApolloClient<NormalizedCacheObject> {
return new ApolloClient({
ssrMode: typeof window === 'undefined',
// NOTE: @types/apollo-upload-client has its own apollo-client as dep, so type mismatch is here
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
link: createUploadLink({
uri: `${serviceUrl}/api/graphql`,
credentials: 'include',
Expand Down
2 changes: 1 addition & 1 deletion apps/dev-portal/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function DevPortalApp ({ Component, pageProps, router }: AppProps): ReactNode {
const client = useApollo(pageProps)

return (
<IntlProvider locale={locale} messages={get(MESSAGES, locale, {})}>
<IntlProvider locale={locale} messages={get(MESSAGES, locale)}>
<SeoProvider/>
<ApolloProvider client={client}>
<AuthProvider>
Expand Down
2 changes: 1 addition & 1 deletion apps/registry
2 changes: 1 addition & 1 deletion apps/resident-app
Loading

0 comments on commit a9b7477

Please sign in to comment.