-
Notifications
You must be signed in to change notification settings - Fork 48
Dev Tools UI #1582
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
Merged
Merged
Dev Tools UI #1582
Changes from 15 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
219bd60
chore: new package (work-in-progress)
jaybuidl ccdf188
Merge branch 'dev' into feat/devtools
kemuru 4a1ae9e
Merge branch 'dev' into feat/devtools
jaybuidl bf9972a
Merge branch 'dev' into feat/devtools
nikhilverma360 3e78cc5
chore(devtools): setup nextjs app
nikhilverma360 c3ad571
chore(devtools): setup layout, header, footer
nikhilverma360 7c6ac30
chore(devtools): added necessary svgs
nikhilverma360 1e40626
feat(devtools): ruler ui
nikhilverma360 a6db67f
fix(devtools): fixed typings
nikhilverma360 72f9895
fix(devtools): fix footer to render client side
nikhilverma360 4b962d3
fix(webtools): fixed linting issues, and themes
nikhilverma360 fc1fdcc
chore(devtools): removed unused variables
nikhilverma360 3e314cc
refactor(devtools): global declaration of theme types
nikhilverma360 d1b1841
refactor(devtools): dynamic theme types
nikhilverma360 ba544c2
Merge pull request #1641 from kleros/feat(devtools)/initial-setup-for…
alcercu a56ccf5
feat(devtools): setup graph-codegen cli
nikhilverma360 7d557b0
feat(devtools): setup wagmi cli & wagmi generate
nikhilverma360 38c0944
feat(devtools): ported dispute template editor
nikhilverma360 27f7439
chore(devtools): json-editor version change
nikhilverma360 c30af6d
chore(devtools): remove undeclared variable
nikhilverma360 1856dd5
refactor(devtools): dynamic import graphql-url from env
nikhilverma360 52e909a
fix(web-devtools): add kleros-sdk secondary resolution path on tsconfig
alcercu de4cf88
fix(devtools): temporarily ignore build errors
nikhilverma360 f3b8aed
chore: lockfile
jaybuidl 1e913f2
feat: link to the devtools UI in the Help menu
jaybuidl aff71fc
Merge pull request #1656 from kleros/feat(devtool)/port-dispute-template
jaybuidl 74bc188
feat(devtools): homepage UI
nikhilverma360 e73e10d
fix(devtools): fix typo
nikhilverma360 5dcab4b
Merge pull request #1661 from kleros/feat(devtools)/homepage-ui
jaybuidl 88a507e
feat(devtools): mobile navbar integration & nav links
nikhilverma360 cab7f77
fix(devtools): fix dispute-template presets
nikhilverma360 f818bb0
Merge pull request #1664 from kleros/feat(devtools)/mobile-navbar-and…
jaybuidl dc25764
Merge branch 'dev' into feat/devtools
jaybuidl 61c07b9
Merge branch 'dev' into feat/devtools
nikhilverma360 bd68a9b
refactor(web-devtools): revamp-ruler-ui
tractorss 57716ac
refactor(web-devtools): update-component-name
tractorss f5f265e
Merge pull request #1685 from kleros/refactor/revamp-devtools-ruler-ui
alcercu a3aa4da
chore: ruler deployment
jaybuidl 71e7d66
fix: ruler fix, tests updated, redeployed
jaybuidl bf8e8b8
feat(web-devtools): ruler-functionality
tractorss ae1779f
chore(web-devtools): update-yarn-lockfile
tractorss bb2dbe2
refactor(web-devtools): coderabbit-fixes
tractorss f360928
fix(web-devtools): wallet-connect-env-name
tractorss baa186e
refactor(web-devtools): remove-arbitrator-ruler-check
tractorss 4e0b208
feat(web-devtools): add-connect-wallet-button
tractorss 28e2411
chore(web-devtools): configure-typing
tractorss a5b995a
feat(web-devtools): inputable-dropdown-for-arbitrables-with-storage-s…
tractorss db886f0
feat(web-devtools): display-copiable-ruler-address
tractorss d0356d6
fix(web-devtools): remove-incorrect-default-checked-logic-in-radio-bu…
tractorss 6f8cdc7
fix(web-devtools): fix-ruling-modes-enum
tractorss 98eb691
refactor(web-devtools): hide-automatic-preset-options-while-it-is-not…
tractorss ffe48c5
refactor(web-devtools): single-connect-button-at-top-level
tractorss 9ce49a2
refactor(web-devtools): replace-conflicting-ruling-settings-update-wi…
tractorss 2c62886
refactor(web-devtools): update-labeled-input-style
tractorss 62dac29
feat(web-devtools): tooltip-for-different-sections
tractorss a3146ab
fix(web-devtools): fix-typo
tractorss 68d128b
Merge pull request #1694 from kleros/feat/devtools-ruler-functionality
alcercu 51a553c
chore: removal of the centralized arbitrator, replaced by the ruler
jaybuidl d99da6d
Merge branch 'dev' into feat/devtools
jaybuidl c8a174f
fix: security patch GHSA-gp8f-8m3g-qvj9
jaybuidl 364678a
fix: coderabbitai
jaybuidl 0732520
fix: coderabbit and other type fixes
jaybuidl e9d5a8b
fix: coderabbit and other type fixes
jaybuidl 144be0e
feat: update versions across v2 apps
kemuru 5c69b6b
fix: type in devtools default url
jaybuidl 3fbb460
fix: many type fixes, eslint bump and config migration
jaybuidl 876f6ff
fix: useSwitchChain isLoading -> isPending
jaybuidl 1d4e45f
fix: setting ignoreBuildErrors back to true
jaybuidl 7faeef3
fix: getGraphqlUrl error handling without dynamic env var keys
jaybuidl 00c933d
fix(web-devtools): type-issues
tractorss a8a597d
fix(web-devtools): fix-use-dispute-template-from-id-hook
tractorss d2a8904
chore: web-devtools clean task
jaybuidl a534252
Merge branch 'dev' into feat/devtools
jaybuidl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
"kleros-sdk", | ||
"subgraph", | ||
"web", | ||
"web-devtools", | ||
"eslint-config", | ||
"prettier-config", | ||
"tsconfig" | ||
|
This file contains hidden or 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,15 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
|
||
[*.{html,js,.json,mjs,rjson,ts}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.sol] | ||
indent_style = space | ||
indent_size = 4 |
This file contains hidden or 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,166 @@ | ||
{ | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true | ||
}, | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/react", | ||
"plugin:security/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"react-hooks", | ||
"security", | ||
"import" | ||
], | ||
"ignorePatterns": [ | ||
"src/assets" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "^16.12.0" | ||
}, | ||
"import/resolver": { | ||
"typescript": { | ||
"alwaysTryTypes": true, | ||
"project": "./tsconfig.json" | ||
}, | ||
"node": { | ||
"extensions": [ | ||
".js", | ||
".jsx", | ||
".ts", | ||
".tsx" | ||
] | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"max-len": [ | ||
"warn", | ||
{ | ||
"code": 120 | ||
} | ||
], | ||
"react/prop-types": 0, | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"varsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)", | ||
"argsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)" | ||
} | ||
], | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"warn", | ||
"error", | ||
"info", | ||
"debug" | ||
] | ||
} | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"security/detect-object-injection": "off", | ||
"security/detect-non-literal-fs-filename": "off", | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
], | ||
"import/no-unresolved": "off", | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"pathGroups": [ | ||
{ | ||
"pattern": "{react,styled-components}", | ||
"group": "external", | ||
"position": "before" | ||
}, | ||
{ | ||
"pattern": "@kleros/**", | ||
"group": "external", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{svgs/**,assets/**}", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{hooks/**,utils/**,consts/**,types/**,context/**,connectors/**,}", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{queries/**,}", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{src/**,}", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{styles/**,}", | ||
"group": "internal", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "{layout/**,pages/**,components/**,}", | ||
"group": "internal", | ||
"position": "after" | ||
} | ||
], | ||
"pathGroupsExcludedImportTypes": [ | ||
"builtin" | ||
], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains hidden or 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,46 @@ | ||
# dependencies | ||
/.yarn/* | ||
!/.yarn/versions | ||
!/.yarn/plugins | ||
!/.yarn/releases | ||
!/.yarn/sdks | ||
/.pnp.* | ||
node_modules | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
development | ||
build | ||
dist | ||
|
||
# misc | ||
*.pem | ||
.eslintcache | ||
.DS_Store | ||
.env | ||
.env.test | ||
.env.testnet | ||
.env.devnet | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# generated code | ||
src/hooks/contracts/generated.ts | ||
src/graphql | ||
generatedGitInfo.json | ||
generatedNetlifyInfo.json | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# testing | ||
/coverage | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains hidden or 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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Kleros | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains hidden or 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,3 @@ | ||
# Dev Tools Frontend | ||
|
||
In construction |
This file contains hidden or 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,6 @@ | ||
import { DefaultTheme } from "styled-components"; | ||
import { theme } from "styles/Theme"; | ||
declare module "styled-components" { | ||
type Theme = typeof theme; | ||
export interface DefaultTheme extends Theme {} | ||
} |
This file contains hidden or 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,14 @@ | ||
## Yarn 3 cache does not work out of the box as of Jan 2022. Context: | ||
## https://github.com/netlify/build/issues/1535#issuecomment-1021947989 | ||
[build.environment] | ||
NETLIFY_USE_YARN = "true" | ||
NETLIFY_YARN_WORKSPACES = "true" | ||
YARN_ENABLE_GLOBAL_CACHE = "true" | ||
# YARN_CACHE_FOLDER = "$HOME/.yarn_cache" | ||
# YARN_VERSION = "3.2.0" | ||
|
||
[functions] | ||
directory = "web-devtools/netlify/functions/" | ||
|
||
[dev] | ||
framework = "nextjs" |
This file contains hidden or 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,33 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
compiler: { | ||
styledComponents: true, | ||
}, | ||
webpack(config) { | ||
// Grab the existing rule that handles SVG imports | ||
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.(".svg")); | ||
|
||
config.module.rules.push( | ||
// Reapply the existing rule, but only for svg imports ending in ?url | ||
{ | ||
...fileLoaderRule, | ||
test: /\.svg$/i, | ||
resourceQuery: /url/, // *.svg?url | ||
}, | ||
// Convert all other *.svg imports to React components | ||
{ | ||
test: /\.svg$/i, | ||
issuer: fileLoaderRule.issuer, | ||
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url | ||
use: ["@svgr/webpack"], | ||
} | ||
); | ||
|
||
// Modify the file loader rule to ignore *.svg, since we have it handled now. | ||
fileLoaderRule.exclude = /\.svg$/i; | ||
|
||
return config; | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
This file contains hidden or 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,38 @@ | ||
{ | ||
"name": "@kleros/kleros-v2-web-devtools", | ||
"version": "0.1.0", | ||
"source": "src/index.html", | ||
"browserslist": "> 0.5%, not dead", | ||
"repository": "", | ||
"author": "", | ||
"license": "MIT", | ||
"packageManager": "[email protected]+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186", | ||
"volta": { | ||
"node": "20.11.0", | ||
"yarn": "4.3.1" | ||
}, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"prettier": "@kleros/kleros-v2-prettier-config", | ||
"devDependencies": { | ||
"@svgr/webpack": "^8.1.0", | ||
"@types/node": "^20", | ||
"@types/react": "18.2.0", | ||
"@types/react-dom": "^18.2.18", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@kleros/kleros-sdk": "workspace:^", | ||
"@kleros/ui-components-library": "^2.10.0", | ||
"next": "14.2.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"styled-components": "^5.3.11", | ||
"viem": "^1.21.4", | ||
"wagmi": "^1.4.13" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.