Skip to content

Commit

Permalink
Refactor API: ForwardingPath descriptions + App intent actions (#256)
Browse files Browse the repository at this point in the history
This PR includes most of the changes discussed in #132 

We don't have an `Intent` object as it was an intermediary step that ends up adding more complexity to the code. Instead of giving an intent we calculate the path and then create a `ForwardingPath` object that provide extra functionality on top of the data:
- Sign transactions with a signer
- Describe the path using Radspec
- Apply pre-transactions to the path

On top of this PR there were a few changes to the app connectors for Agreements and Dandelion Voting
  • Loading branch information
0xGabi authored Dec 30, 2020
1 parent 0c7d106 commit 4475d15
Show file tree
Hide file tree
Showing 121 changed files with 7,652 additions and 2,787 deletions.
4 changes: 2 additions & 2 deletions examples/bundler-parcel/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "bundler-parcel",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.6",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "parcel src/index.html",
"build": "parcel build src/index.html"
},
"dependencies": {
"@aragon/connect-react": "^0.7.0",
"@aragon/connect-react": "^0.8.0-alpha.6",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"string.ify": "^1.0.64"
Expand Down
4 changes: 2 additions & 2 deletions examples/bundler-webpack-ts-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bundler-webpack-ts-loader",
"main": "dist/index.js",
"version": "0.7.0",
"version": "0.8.0-alpha.6",
"private": true,
"sideEffects": false,
"scripts": {
Expand All @@ -10,7 +10,7 @@
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect": "^0.8.0-alpha.6",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/connect-react-intro/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "connect-react-intro",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.6",
"scripts": {
"start": "snowpack dev",
"build": "snowpack build"
Expand Down
2 changes: 2 additions & 0 deletions examples/forwarding-path/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
.cache/
136 changes: 136 additions & 0 deletions examples/forwarding-path/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Forwarding path demo</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap"
rel="stylesheet"
/>
<style>
:root {
--1: #ffffff;
--2: #d8edde;
--3: #333333;
--4: #999a9e;
--5: #e8fdee;
}
body,
html,
#app {
min-height: calc(100vh - 64px);
}
body,
p,
h1,
h2 {
margin: 0;
}
body,
h1,
h2,
button {
font: 300 22px/32px Inter, sans-serif;
color: var(--3);
}
body {
overflow-y: scroll;
padding: 32px;
background: var(--2);
}
h1,
h2 {
display: flex;
align-items: center;
width: 100%;
gap: 16px;
margin: 64px 0 16px;
font-size: 30px;
font-weight: 400;
}
h2 {
margin: 32px 0 16px;
font-size: 22px;
}
button {
height: 36px;
padding: 0 8px;
background: transparent;
border-width: 2px;
border-style: solid;
border-radius: 0;
border-color: var(--1) var(--3) var(--3) var(--1);
outline: 0;
cursor: pointer;
font-size: 18px;
line-height: 22px;
position: relative;
}
button:not([disabled]):active,
button.checked {
transform: translate(1px, 1px);
border-color: var(--3) var(--1) var(--1) var(--3);
}
button:not([disabled]):active:after,
button.checked:after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.05);
}
button[disabled] {
color: var(--4);
}
ul {
margin: 0;
padding: 0;
}
li {
list-style-type: '− ';
list-style-position: inside;
}
table {
width: 100%;
border-collapse: collapse;
}
th {
font-weight: inherit;
text-align: left;
}
th,
td {
padding: 16px;
}
td {
overflow-wrap: break-word;
word-break: break-word;
hyphens: auto;
}
th:first-child,
td:first-child {
padding-left: 0;
}
.group {
display: flex;
flex-direction: column;
gap: 8px;
margin: 24px;
}
.actions {
display: flex;
flex-direction: row;
align-items: center;
gap: 16px;
min-height: 40px;
}
</style>
</head>
<body>
<div id="app"></div>
<script src="index.js"></script>
</body>
</html>
Loading

0 comments on commit 4475d15

Please sign in to comment.