Skip to content

Commit b17fe4c

Browse files
Feature/add details page (#19)
* feat: add data table component and integrate with apps route * feat: add SearcherBar component and integrate it into apps and index routes * refactor: remove unused Link import from columns.tsx * feat: implement PaginatedNavigation component in AppsTable for pagination support * refactor: enhance pagination logic in PaginatedNavigation component for improved readability and functionality * refactor: adjust pagination logic in generatePaginationItems for improved visibility and functionality * fix: border transition looking bad * refactor: update useAppsData to accept currentPage for dynamic data fetching * fix: add placeholderData to useQuery for improved data handling * refactor: wrap app name in a div and fixe is width * fix: update TABLE_LENGTH to 16 for correct configuration * refactor: remove AppsTable component and integrate its functionality directly into AppsRoute with refetch indicator * feat: add Deals route with data fetching and pagination functionality * fix: rename taskQuery to tasksQuery for consistency in data fetching * refactor: reorganize imports and simplify conditional rendering in DealsRoute * feat: implement Tasks route with data fetching, pagination, and task table columns * refactor: replace inline type definitions with GraphQL query types for Apps and Deals * fix: display workerpool description directly in the table instead of using CopyButton * feat: add Workerpools route with data fetching, pagination, and table columns * fix: wrap CopyButton in a div to set a fixed width for app name display * fix: improve description display in workerpools table with consistent styling * fix: replace CopyButton with conditional rendering for dataset name display * feat: add Datasets route with data fetching, pagination, and table columns * fix: update PaginationEllipsis styling for better responsiveness * fix: update query state variables to indicate refetch and loading * fix: update loading indicator logic to show during loading or refetching * fix: adjust SearcherBar styling for improved layout and responsiveness * fix: refactor SearcherBar layout for improved structure and styling * fix: adjust SearcherBar padding for improved layout consistency * fix: simplify Button component structure in SearcherBar for cleaner code * fix: update PaginationPrevious and PaginationNext to use screen reader only text for accessibility * fix: refactor SearcherBar to improve button visibility and input class handling based on connection status * fix: update placeholder text in SearcherBar for clarity * feat: rename folder * feat: rename folder AppsTable/ to appTable/ * fix: remove unnecessary 'use client' directive from multiple components * feat: enhance DataTable component with tableLength and isLoading props for improved data handling * feat: move routes for apps, datasets, deals, tasks, and workerpools * fix: update destination paths for apps, datasets, deals, tasks, and workerpools routes * feat: implement DataTable component and update routes to use it * feat: replace useNavigate with Link in DataTable for improved navigation * feat: refactor preview tables to use DataTable component for improved rendering and data handling * fix: prevent default button behavior in CopyButton component * feat: rename WorkerpoolsPreviewTable component and update import path * fix: update import path for WorkerpoolsPreviewTable component * feat: add routes for datasets, deals, tasks, and workerpools with data handling and pagination * refactor: remove unused AppsTable component and related code * feat: add NextApps, NextDatasets, NextDeals, NextTasks, and NextWorkerpools to assure next page in pagination * fix: update import path for WorkerpoolsPreviewTable component * chore: update @radix-ui/react-slot version to 1.2.2 in package.json and package-lock.json * feat: update pagination logic in multiple routes to adjust current page and total pages * feat: add ChainSelector component and integrate new chain Arbitrum Sepolia and Avalanche Fuji * fix: update danger color variables for improved accessibility * fix: replace Terminal icon with AlertOctagon in UnsupportedChain component * fix: adjust border radius and add left border to destructive alert variant * fix: remove Avalanche Fuji from configuration * fix: add color property to chain objects and update background color in Index component * feat: integrate subgraph URL management in user store and update query execution across preview tables * fix: add query client initialization and invalidate queries in useSyncAccountWithUserStore * fix: update useUserStore import and refactor query execution in TasksPreviewTable and WorkerpoolsPreviewTable * fix: update query execution in apps, datasets, deals, tasks, and workerpools routes to include subgraph URL * fix: update query execution in preview tables to include chainId in query keys and invalidate query on chain update * fix: update query execution in WorkerpoolsPreviewTable to include chainId and subgraphUrl * fix: temps renaming * fix: rename WorkerpoolsPreviewTable * fix: correct import path for WorkerpoolsPreviewTable * fix: update ChainSelector to handle chainId as a required number * fix: update useSyncAccountWithUserStore to set chainId only when currentChain is found * fix: refactor to use chainId instead of subgraphUrl in various components and hooks * fix: update subgraphUrl for Arbitrum Sepolia in SUPPORTED_CHAINS * fix: simplify ChainSelector by removing local state and using chainId directly * feat: implement dynamic routes for chain-specific apps, datasets, tasks, and workerpools; remove deprecated deals route * feat: add missing deals page, lost during merge * fix: import filename casing issue * fix: make displayText optional in CopyButton component * fix: update DataTable and Table components for improved styling; enhance formatElapsedTime utility for better timestamp handling * feat: implement deal details and tasks tables * fix: update TableCell and buildDealDetails components to use <p> tags for better semantic structure * fix: update TableCell component to use inline-flex for improved layout * fix: remove GPT comment from blockExplorerUrl declaration * fix: refactor SmartLinkGroup to use dynamic block explorer URL and improve breadcrumb links with ChainLink component * fix: rename dealTaskQuery to dealTasksQuery * fix: update label in SmartLinkGroup to use dataset address instead of name * fix: update DealTasksTable and buildDealDetails to handle error states and improve data fetching logic * feat: add dataset details and dataset deals functionality * feat: implement ErrorAlert component and replace inline error handling in various tables * feat: update DatasetDealsTable to filter out 'dealid' column and enhance DealTasksTable with extended columns * feat: add Workerpool details and deals functionality with GraphQL queries and components * feat: implement app details and app deals functionality with GraphQL queries and components * feat: add task details page with GraphQL query and components, including task breadcrumbs and error handling * refactor: clean up formatting in buildAppDetails and AppsRoute components * feat: refactor event components for better modularity and readability * feat: add task link type and update block explorer functionality in SmartLinkGroup component * feat: replace inline JSON display with JsonBlock component in buildDealDetails * feat: add transaction details and event queries * refactor: remove debug log from buildAppDetails function * fix: update DealEventProps structure and adjust SmartLinkGroup types in buildTransactionDetails * feat: Add address details page with queries for beneficiary deals, requested deals, requested tasks and overview * fix: regenerate routeTree * refactor: re generate gql file * fix: remove redundant code in TasksPreviewTable component * fix: make deal prop optional in DealEvent component * fix: include currentPage in queryKey for beneficiaryDeals requestedDeals and requestedTasks * fix: update TableCell height in DataTable component to avoid deferent empty size * feat: add appPrice, datasetPrice, and workerpoolPrice to AddressBeneficiaryDeals and AddressRequestedDeals queries * feat: add AddressContribution and NextAddressContribution queries and corresponding components * fix: remove console.log statements from AddressBeneficiaryDealsTable, AddressRequestedDealsTable, and AddressRequestedTasksTable components * feat: add AddressApps and NextAddressApps queries and corresponding AddressAppsTable component * feat: add Address Datasets and Workerpools tables with corresponding queries * fix: remove redundant deployed apps display in AddressRoute component * feat: enhance Tabs component with disabled states and tooltips based on address data * fix: update import from multiaddr to @multiformats/multiaddr and adjust package dependencies * fix: adjust ChainLink component to take for width in DataTable * feat: replace address display with SmartLinkGroup component in buildAddressOverview * fix: format count display for address details to handle large numbers * refactor: remove unused tab styles and add cursor pointer to buttons * feat: integrate StatusCell component for task status display in buildTaskDetails and columns * refactor: remove unused import of SUPPORTED_CHAINS in useUser.store * fix: update rlcToNrlc function to support bigint input and return type * feat: update SearcherBar to display user activity link based on user address * feat: implement ClaimButton component and integrate it into task and deals details * chore: add TODO entry to .gitignore * refactor: update GraphQL types and improve type safety across components * fix: separate build and type check scripts in package.json * fix: correct deadline and add loading indicator * style: adjust padding and layout in Navbar, SearcherBar, and Root components * style: adjust spacing and layout for headers in various route components * style: fix spacing in TableCell component className * feat: add DownloadResult component for downloading task results from IPFS * style: refactor layout of App and Dataset details headers for improved spacing * fix: replace substr by substring Co-authored-by: pjt <[email protected]> * fix: add type and check result state before using it Co-authored-by: pjt <[email protected]> * fix: replace substr by substring Co-authored-by: pjt <[email protected]> * fix: add type when using taskResultToObject Co-authored-by: pjt <[email protected]> * fix: remove commented-out code for deal, task, and transaction routes * fix: remove unused isConnected variable from useUserStore * fix: remove unused queryClient import and related code from DownloadResult * fix: handle all types of claim with ClaimButton (#26) - task - deal with initialized tasks - deal with non-initialized task * fix: fix query result caching issues (#25) * fix: add missing chainId in queryKey * fix: use previous data as placeholder only when queries are identical * fix: add TODO comment to check REQUESTS for disabled tabs in AddressRoute * fix: increase sleep duration to allow subgraph synchronization in ClaimButton * fix: refactor claimable status display in buildDealDetails for clarity * chore: ignore generated files (#20) Co-authored-by: Pierre Jeanjacquot <[email protected]> * feat: add placeholder data function for query keys in various tables --------- Co-authored-by: Pierre Jeanjacquot <[email protected]>
1 parent a4c98ce commit b17fe4c

File tree

120 files changed

+7770
-9685
lines changed

Some content is hidden

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

120 files changed

+7770
-9685
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
src/graphql/*
15+
!src/graphql/execute.ts
1416

1517
# misc
1618
.DS_Store
@@ -26,3 +28,4 @@ dist-ssr
2628
*.njsproj
2729
*.sln
2830
*.sw?
31+
TODO

README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
1-
# React + TypeScript + Vite
1+
# iExec explorer
2+
3+
## Install
4+
5+
```sh
6+
npm ci
7+
npm run codegen
8+
```
9+
10+
## Develop
11+
12+
```sh
13+
# npm ci
14+
# npm run codegen
15+
npm run dev
16+
```
17+
18+
browse <http://localhost:5173>
19+
20+
## Build
21+
22+
```sh
23+
# npm ci
24+
# npm run codegen
25+
npm run build
26+
```
27+
28+
You can serve the build with `npx serve -p 3000 ./dist` and browse <http://localhost:3000>
29+
30+
## Template: React + TypeScript + Vite
231

332
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
433

@@ -7,7 +36,7 @@ Currently, two official plugins are available:
736
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
837
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
938

10-
## Expanding the ESLint configuration
39+
### Expanding the ESLint configuration
1140

1241
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
1342

@@ -28,15 +57,15 @@ export default tseslint.config({
2857
tsconfigRootDir: import.meta.dirname,
2958
},
3059
},
31-
})
60+
});
3261
```
3362

3463
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
3564

3665
```js
3766
// eslint.config.js
38-
import reactX from 'eslint-plugin-react-x'
39-
import reactDom from 'eslint-plugin-react-dom'
67+
import reactDom from 'eslint-plugin-react-dom';
68+
import reactX from 'eslint-plugin-react-x';
4069

4170
export default tseslint.config({
4271
plugins: {
@@ -50,5 +79,5 @@ export default tseslint.config({
5079
...reactX.configs['recommended-typescript'].rules,
5180
...reactDom.configs.recommended.rules,
5281
},
53-
})
82+
});
5483
```

0 commit comments

Comments
 (0)