Skip to content

Commit 9f22a6c

Browse files
committed
chore: solved confs
2 parents a457bcf + adbd017 commit 9f22a6c

File tree

72 files changed

+5577
-7038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+5577
-7038
lines changed

.changeset/afraid-geese-mix.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kadena/graph-client': patch
3+
---
4+
5+
Prefill module field and add labels

.changeset/chilly-bees-leave.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@kadena/graph-client': patch
3+
'@kadena/graph': patch
4+
---
5+
6+
Show tx overview in block page and create transactions page; make transactions query dynamically assign filters; minor fixes and refactoring

.changeset/funny-boxes-live.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/modern-needles-shave.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kadena/docs': minor
3+
---
4+
5+
search component added as dynamic import

.changeset/neat-otters-shout.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@kadena/graph-client': patch
3+
'@kadena/graph': patch
4+
---
5+
6+
Added fragments for the graph fields and fixed some field names

.changeset/rich-emus-develop.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kadena/docs': minor
3+
---
4+
5+
fix the searchresult breadcrumb

.changeset/short-shirts-explain.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/thin-crews-complain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kadena/react-ui': minor
3+
---
4+
5+
change the twitter icon to X

.changeset/three-planets-laugh.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@kadena/cryptography-utils': none
3+
'@kadena-dev/e2e-tests': none
4+
'@kadena-dev/markdown': none
5+
'@kadena/docs': none
6+
---
7+
8+
Update some dependencies + fix local `pnpm turbo format`

.changeset/twelve-ants-drive.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.syncpackrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const config = {
1212
'@kadena/fonts',
1313
'@kadena/pactjs-cli',
1414
'@kadena-dev/eslint-plugin',
15+
'remark-gfm',
1516
],
1617
isIgnored: true, // Toggle flag or or remove group to see inconsistencies
1718
},

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "Kadena JS monorepo",
66
"license": "ISC",
77
"scripts": {
8+
"build": "turbo run build",
89
"format": "pnpm run /^format:.*/",
910
"format:md": "remark *.md docs/*.md -o --use @kadena-dev/markdown",
1011
"format:pkgs": "tsx packages/tools/scripts/generate-packages-json.ts",

packages/apps/docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"rehype-pretty-code": "~0.9.5",
6363
"rehype-raw": "^7.0.0",
6464
"remark": "~14.0.3",
65-
"remark-frontmatter": "~4.0.1",
65+
"remark-frontmatter": "~5.0.0",
6666
"remark-gfm": "~3.0.1",
6767
"shiki": "~0.14.2",
6868
"styled-components": "~5.3.10"

packages/apps/docs/src/components/Layout/components/Header/styles.css.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const headerButtonClass = style([
1919
borderRadius: '$lg',
2020
cursor: 'pointer',
2121
color: '$neutral2',
22-
height: '$11',
22+
paddingY: '$2',
2323
width: '$11',
2424
}),
2525
{
@@ -69,9 +69,11 @@ export const hamburgerButtonClass = style([
6969
export const searchButtonClass = style([
7070
sprinkles({
7171
backgroundColor: '$neutral4',
72+
paddingX: '$2',
7273
}),
7374
{
7475
width: 'inherit',
76+
7577
selectors: {
7678
[`${darkThemeClass} &`]: {
7779
backgroundColor: vars.colors.$neutral3,
@@ -83,6 +85,7 @@ export const searchButtonClass = style([
8385
export const searchButtonSlashClass = style([
8486
sprinkles({
8587
borderRadius: '$lg',
88+
marginLeft: '$2',
8689
backgroundColor: '$neutral3',
8790
color: '$white',
8891
}),
@@ -160,7 +163,10 @@ export const spacerClass = style({
160163
export const headerIconGroupClass = style([
161164
sprinkles({
162165
display: 'flex',
163-
gap: '$1',
166+
gap: {
167+
xs: '$3',
168+
lg: '$6',
169+
},
164170
marginLeft: '$6',
165171
}),
166172
]);
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,15 @@
1-
import { useSearch } from '@/hooks/useSearch/useSearch';
2-
import { mapMatches } from '@/pages/api/semanticsearch';
3-
import { analyticsEvent, EVENT_NAMES } from '@/utils/analytics';
1+
import dynamic from 'next/dynamic';
42
import type { FC } from 'react';
5-
import React, { useEffect, useState } from 'react';
6-
import { SearchResults } from './components/SearchResults';
7-
import useAlgoliaSearch from './useAlgoliaSearch';
3+
import React from 'react';
84

9-
interface IProps {
5+
const SearchTab = dynamic(() => import('./SearchTab'));
6+
7+
export interface ISearchProps {
108
query?: string;
119
hasScroll?: boolean;
1210
limitResults?: number;
1311
}
1412

15-
export const Search: FC<IProps> = ({ query, hasScroll, limitResults }) => {
16-
const [tabName, setTabName] = useState<string | undefined>('docs');
17-
const { metadata, handleSubmit, error, isLoading } =
18-
useAlgoliaSearch(limitResults);
19-
20-
const {
21-
outputStream,
22-
conversation,
23-
error: conversationError,
24-
isLoading: conversationIsLoading,
25-
handleSubmit: handleConversationSubmit,
26-
} = useSearch();
27-
28-
const semanticResults = metadata?.map(mapMatches);
29-
30-
useEffect(() => {
31-
if (
32-
query !== undefined &&
33-
query.trim() !== '' &&
34-
tabName !== undefined &&
35-
tabName.trim() !== ''
36-
) {
37-
if (tabName === 'docs') {
38-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
39-
handleSubmit(query);
40-
} else {
41-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
42-
handleConversationSubmit(query);
43-
}
44-
analyticsEvent(EVENT_NAMES['click:search'], { query, tabName });
45-
}
46-
// eslint-disable-next-line react-hooks/exhaustive-deps
47-
}, [query, tabName]);
48-
49-
const onTabSelect = (tabName: string): void => {
50-
setTabName(tabName);
51-
};
52-
53-
return (
54-
<section>
55-
<SearchResults
56-
semanticResults={semanticResults}
57-
semanticIsLoading={isLoading}
58-
conversation={conversation}
59-
outputStream={outputStream}
60-
query={query}
61-
error={error || conversationError}
62-
isLoading={conversationIsLoading}
63-
hasScroll={hasScroll}
64-
onTabSelect={onTabSelect}
65-
limitResults={limitResults}
66-
/>
67-
</section>
68-
);
13+
export const Search: FC<ISearchProps> = (props) => {
14+
return <SearchTab {...props} />;
6915
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { useSearch } from '@/hooks/useSearch/useSearch';
2+
import { mapMatches } from '@/pages/api/semanticsearch';
3+
import { analyticsEvent, EVENT_NAMES } from '@/utils/analytics';
4+
import type { FC } from 'react';
5+
import React, { useEffect, useState } from 'react';
6+
import { SearchResults } from './components/SearchResults';
7+
import type { ISearchProps } from './Search';
8+
import useAlgoliaSearch from './useAlgoliaSearch';
9+
10+
const SearchTab: FC<ISearchProps> = ({ query, hasScroll, limitResults }) => {
11+
const [tabName, setTabName] = useState<string | undefined>('docs');
12+
const { metadata, handleSubmit, error, isLoading } =
13+
useAlgoliaSearch(limitResults);
14+
15+
const {
16+
outputStream,
17+
conversation,
18+
error: conversationError,
19+
isLoading: conversationIsLoading,
20+
handleSubmit: handleConversationSubmit,
21+
} = useSearch();
22+
23+
const semanticResults = metadata?.map(mapMatches);
24+
25+
useEffect(() => {
26+
if (
27+
query !== undefined &&
28+
query.trim() !== '' &&
29+
tabName !== undefined &&
30+
tabName.trim() !== ''
31+
) {
32+
if (tabName === 'docs') {
33+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
34+
handleSubmit(query);
35+
} else {
36+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
37+
handleConversationSubmit(query);
38+
}
39+
analyticsEvent(EVENT_NAMES['click:search'], { query, tabName });
40+
}
41+
// eslint-disable-next-line react-hooks/exhaustive-deps
42+
}, [query, tabName]);
43+
44+
const onTabSelect = (tabName: string): void => {
45+
setTabName(tabName);
46+
};
47+
48+
return (
49+
<section>
50+
<SearchResults
51+
semanticResults={semanticResults}
52+
semanticIsLoading={isLoading}
53+
conversation={conversation}
54+
outputStream={outputStream}
55+
query={query}
56+
error={error || conversationError}
57+
isLoading={conversationIsLoading}
58+
hasScroll={hasScroll}
59+
onTabSelect={onTabSelect}
60+
limitResults={limitResults}
61+
/>
62+
</section>
63+
);
64+
};
65+
66+
export default SearchTab;

packages/apps/docs/src/components/Search/components/StaticResults.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ interface IBreadCrumbProps {
2121
url: string;
2222
}
2323

24+
const removeHashFromString = (str: string): string => {
25+
return str.split('#')[0];
26+
};
27+
2428
const ItemBreadCrumb: FC<IBreadCrumbProps> = ({ url }) => {
2529
const urlArray = url.split('/');
2630

@@ -29,7 +33,7 @@ const ItemBreadCrumb: FC<IBreadCrumbProps> = ({ url }) => {
2933
{urlArray.map((str, idx) => {
3034
return (
3135
<Text size="sm" bold={idx === 0} key={str + idx}>
32-
{str} {idx < urlArray.length - 1 ? ' / ' : ''}
36+
{removeHashFromString(str)} {idx < urlArray.length - 1 ? ' / ' : ''}
3337
</Text>
3438
);
3539
})}

packages/apps/graph-client/src/components/compact-transactions-table/compact-transactions-table.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type {
22
GetAccountQuery,
33
GetBlockFromHashQuery,
44
GetChainAccountQuery,
5+
GetTransactionsQuery,
56
} from '@/__generated__/sdk';
67
import routes from '@constants/routes';
78
import { Box, Button, ContentHeader, Link, Table } from '@kadena/react-ui';
@@ -14,7 +15,8 @@ interface ICompactTransactionsTableProps {
1415
transactions:
1516
| GetAccountQuery['account']['transactions']
1617
| GetChainAccountQuery['chainAccount']['transactions']
17-
| GetBlockFromHashQuery['block']['transactions'];
18+
| GetBlockFromHashQuery['block']['transactions']
19+
| GetTransactionsQuery['transactions'];
1820
}
1921

2022
export const CompactTransactionsTable = (
@@ -30,7 +32,7 @@ export const CompactTransactionsTable = (
3032
description={
3133
description
3234
? description
33-
: 'All transactions where this account is the initiator.'
35+
: 'All transactions where this account is the initiator'
3436
}
3537
/>
3638
<Box margin={'$4'} />
@@ -58,7 +60,9 @@ export const CompactTransactionsTable = (
5860
</Table.Td>
5961
<Table.Td>{edge?.node.height}</Table.Td>
6062
<Table.Td>
61-
<Link href={`${routes.TRANSACTION}/${edge?.node.requestKey}`}>
63+
<Link
64+
href={`${routes.TRANSACTIONS}/${edge?.node.requestKey}`}
65+
>
6266
<span title={edge?.node.requestKey}>
6367
{truncate(edge?.node.requestKey)}
6468
</span>

packages/apps/graph-client/src/components/compact-transfers-table/compact-transfers-table.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export const CompactTransfersTable = (
7676
</Link>
7777
</Table.Td>
7878
<Table.Td>
79-
<Link href={`${routes.TRANSACTION}/${edge?.node.requestKey}`}>
79+
<Link
80+
href={`${routes.TRANSACTIONS}/${edge?.node.requestKey}`}
81+
>
8082
<span title={edge?.node.requestKey}>
8183
{truncate(edge?.node.requestKey)}
8284
</span>

0 commit comments

Comments
 (0)