Skip to content
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

Experimental OE fixes #1859

Open
wants to merge 220 commits into
base: experimental-oe
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
372e327
Create Authenticator app; update Projects
Oct 8, 2019
ec6043c
Authenticator: Use postMessage origin to read URL
Oct 8, 2019
6812472
Try to OAuth via iframe
Oct 8, 2019
78ecff0
Authenticator: go back to low-security version
Oct 9, 2019
6c9995e
Move Authenticator app to external repository
Dec 19, 2019
7468e7a
Allocations/Budget Card: wrap title to two lines
Dec 23, 2019
80585c6
Markdown/ListItem: fix propTypes checks
Dec 23, 2019
1a68881
Markdown: fix link styling
Dec 23, 2019
a9e45ee
Merge pull request #1830 from AutarkLabs/budget-card-line-wrap
Dec 23, 2019
c74f8ed
update react-markdown
Dec 23, 2019
e39a7bc
Merge pull request #1831 from AutarkLabs/markdown-fixes
Dec 24, 2019
9948908
Merge pull request #1300 from AutarkLabs/oauth
Jan 1, 2020
1182a64
style: implement conventional-commit linting
topocount Jan 2, 2020
698fa6e
fix: single scrollbar on New Project panel
PeterMPhillips Jan 2, 2020
5e55319
Merge pull request #1832 from AutarkLabs/implement-conventional-commit
topocount Jan 2, 2020
db7c996
Merge branch 'dev' into projects-scrollbar
topocount Jan 2, 2020
8395187
Merge pull request #1837 from AutarkLabs/projects-scrollbar
PeterMPhillips Jan 3, 2020
4e72e2b
fix(tests): fix tests failing because running in parallel
ottodevs Jan 6, 2020
4f6009f
test(e2e): all apps passing all tests
topocount Nov 20, 2019
d8c693c
chore(devx): add autoincrement to local daoIDs
topocount Jan 6, 2020
fe69a35
fix: revert popup verification to improve testing
topocount Jan 6, 2020
437eeec
test(e2e): small fixes in custom functions
topocount Jan 6, 2020
ee89c01
test(e2e): split tests into separate app files
topocount Jan 6, 2020
bce24fb
test(e2e): set up single-command testing
topocount Jan 6, 2020
501efcc
fix: dot voting default decimals value changed from 0 to 18
PeterMPhillips Jan 6, 2020
174b069
fix(rewards): removed token name wrap
e18r Jan 8, 2020
47a1142
fix: a11y issues, useTheme related js warnings
rkzel Jan 9, 2020
242275a
fix: a11y issues in Projects
rkzel Jan 9, 2020
84c79cc
fix: no-filtering-result card text style
rkzel Jan 10, 2020
2cb69b0
Merge pull request #1848 from AutarkLabs/dot-decimals
Quazia Jan 13, 2020
9fc1359
Merge pull request #1851 from AutarkLabs/new-reward-token-name
e18r Jan 13, 2020
4f432a7
Merge pull request #1677 from AutarkLabs/e2e-test-base
topocount Jan 13, 2020
e3ea499
Merge pull request #1856 from AutarkLabs/1087-dv-a11y
Jan 13, 2020
4cf9bc0
Merge pull request #1860 from AutarkLabs/980-projects-a11y
Jan 13, 2020
01dbc2e
chore(linting): bump commitlint to v8.3
topocount Jan 13, 2020
0b6aaf0
Merge pull request #1878 from AutarkLabs/commitlint-v8.3
topocount Jan 13, 2020
e9a70e1
fix: a11y, input field labels, img alt text (#1870)
rkzel Jan 14, 2020
1ba4a65
fix(allocations): use double check icon and add status colors
e18r Jan 8, 2020
35233c9
fix(allocations): icon element & status constants
e18r Jan 15, 2020
8514603
feat(dot-voting): informative dot voting
PeterMPhillips Dec 18, 2019
6bee4b1
Merge pull request #1801 from AutarkLabs/dot-informative
PeterMPhillips Jan 17, 2020
47f2293
refactor(projects): mv Tabs & Header out of App.js (#1894)
Jan 17, 2020
c15da3d
feat: renamed Overview tab to General
rkzel Jan 17, 2020
c42722b
feat: renamed Empty to NoProjects, adjusted styling
rkzel Jan 17, 2020
93848d3
Merge pull request #1853 from AutarkLabs/allocations-double-check-icon
Jan 17, 2020
7b283bb
Merge pull request #1899 from AutarkLabs/rename-overview-to-general
Jan 17, 2020
06d025d
refactor(allocations): mv usePathHelpers to shared
Jan 20, 2020
048a5b1
refactor(projects): switch to usePathHelpers
Jan 20, 2020
069bd27
feat: added UI for native projects to NewProject panel
rkzel Jan 22, 2020
d9fc16a
test(bounties): remove unnecessary wallet dependency
topocount Jan 22, 2020
c028b20
Merge pull request #1900 from AutarkLabs/projects-usePathHelpers
Jan 22, 2020
2acd81e
fix: add metadata to new vote
PeterMPhillips Jan 22, 2020
a9a0e94
fix(dot-voting): smooth transition for side panel
PeterMPhillips Jan 22, 2020
5f885a0
feat(projects): remake issues tab as project detail
Jan 21, 2020
c981c34
refactor: remove unused 'query' logic from usePathHelpers
Jan 23, 2020
9ccfa86
refactor(projects): move hook out of Issue card
Jan 23, 2020
24cc0c4
Merge pull request #1910 from AutarkLabs/dot-radspec
Jan 23, 2020
e68e138
Merge pull request #1911 from AutarkLabs/dot-sidepanel
Jan 23, 2020
7449853
perf: disabled react-axe
rkzel Jan 23, 2020
6f4497f
Merge pull request #1908 from AutarkLabs/standard-bounties-dep-fix
topocount Jan 23, 2020
1d59a05
Merge pull request #1914 from AutarkLabs/disable-react-axe
Jan 23, 2020
157835c
Merge pull request #1902 from AutarkLabs/ProjectDetail
Jan 23, 2020
b132179
feat: project Card for decentralized projects (#1913)
rkzel Jan 23, 2020
eb57806
feat: dark mode
PeterMPhillips Jan 3, 2020
450d29f
Merge pull request #1903 from AutarkLabs/dark-mode
topocount Jan 23, 2020
045502b
refactor: github query component and post-review fixes
rkzel Jan 23, 2020
96ea396
feat(projects): bounties tab
PeterMPhillips Jan 24, 2020
e4b7bb8
fix: projects card bounties description and deadline
rkzel Jan 24, 2020
66015e6
Merge pull request #1919 from AutarkLabs/expired-bounties-fix
Jan 24, 2020
da565c9
fix: hidden InfoBox, adjusted ScrollList height, fixed intendation
rkzel Jan 24, 2020
ab494ce
Merge pull request #1901 from AutarkLabs/bounties-tab
topocount Jan 24, 2020
b9e8884
feat(projects): add proper "Back" to IssueDetail
Jan 24, 2020
5d697b5
Merge pull request #1917 from AutarkLabs/goBack
topocount Jan 24, 2020
ffecf57
fix(projects): ignore bounties made before Nov 26
Jan 24, 2020
71b147e
fix(projects): use main component with emptywrapper
PeterMPhillips Jan 24, 2020
1708f61
refactor(projects): use standard apollo gql syntax
Jan 24, 2020
1f93af2
Merge pull request #1921 from AutarkLabs/no-undefined-issueIds
topocount Jan 24, 2020
6531f67
Merge pull request #1922 from AutarkLabs/dark-mode-fix
topocount Jan 24, 2020
bd24049
refactor(projects): lean on Apollo for pagination
Jan 24, 2020
c226706
fix(projects): sorting issues re-queries GitHub
Jan 25, 2020
fa848bf
refactor(projects): use GitHub `search` query
Jan 25, 2020
c230dc2
Merge pull request #1847 from AutarkLabs/hotfix/tests
ottodevs Jan 26, 2020
d841d5a
refactor: feature-flip, ThematicBreak
rkzel Jan 27, 2020
d23494e
refactor(projects): rm unused filter keys
Jan 25, 2020
59ee996
refactor(projects): fix Query & Mutation components
Jan 25, 2020
04fd28f
refactor(projects): useBountyIssues in ProjectDetail
Jan 26, 2020
e6f637b
refactor(projects): filter&sort bountyIssues locally
Jan 27, 2020
aed770f
fix(recovery script): error on invalid allocations period length
topocount Jan 28, 2020
4cc483a
Merge pull request #1942 from AutarkLabs/recover-allocations-fix
topocount Jan 28, 2020
c3597e0
fix: Very small dot-voting participation rounded
Quazia Jan 28, 2020
8c0d174
Merge pull request #1957 from AutarkLabs/dot-voting/0-participation-fix
topocount Jan 28, 2020
6746e05
fix: change radspec for newVote
Quazia Jan 28, 2020
8eca4c0
Merge pull request #1960 from AutarkLabs/projects/radspec-newvote
topocount Jan 28, 2020
302533e
refactor(filterbar): removed counters from filters dropdowns
rkzel Jan 28, 2020
72c58c7
Merge pull request #1907 from AutarkLabs/1874-native-projects-panel
Quazia Jan 28, 2020
59df241
refactor: moved labels and milestones retrieval to DecoratedRepo
rkzel Jan 29, 2020
a9a291b
refactor: filtering moved to GH server side
rkzel Jan 29, 2020
27c1f7d
fix: useMemo was unreachable for IssueDetail route
rkzel Jan 29, 2020
078a49f
fix: show more repos button
rkzel Jan 29, 2020
d5319fd
fix(dot-voting): dark mode support for voting bars
PeterMPhillips Jan 29, 2020
52bf76c
fix(vote slider): add theme for slider background
topocount Jan 29, 2020
981fb4d
Merge pull request #1965 from AutarkLabs/dot-dark-fix
topocount Jan 29, 2020
74ce086
feat(projects): add decoupled project functionality
topocount Jan 22, 2020
b48653b
fix(projects): enable radspec for external function
topocount Jan 22, 2020
cbb6d6a
feat: text filter uses GH server-side filtering
rkzel Jan 29, 2020
fd66742
Merge branch 'dev' of https://github.com/AutarkLabs/planning-suite in…
Quazia Jan 30, 2020
126d3cc
fix: toggle off decoupled projects
Quazia Jan 30, 2020
7d822da
fix(dot-voting): dark mode support for voting bars
PeterMPhillips Jan 29, 2020
c608232
fix(vote slider): add theme for slider background
topocount Jan 29, 2020
5d0cc9a
feat: new decentralized projects can now be created
rkzel Jan 28, 2020
89f0acf
feat(projects): add projects updateability
topocount Jan 28, 2020
c8ae605
feat: integrate with add/update for decoupled repo
Quazia Jan 29, 2020
d37653d
fix: decoupled bool for setRepo in createProject
Quazia Jan 29, 2020
bee59aa
chore(projects): integrate `setIssue` panel call
topocount Jan 30, 2020
a175979
feat(projects): add decoupled project functionality
topocount Jan 22, 2020
c613586
fix(projects): enable radspec for external function
topocount Jan 22, 2020
ef3f466
fix: resole issue with key vs repoId in General.js
Quazia Jan 30, 2020
2dacfb8
feat: removed disfunctional milestones filtering
rkzel Jan 30, 2020
b7bf678
Merge branch 'issue-querying' of github.com:AutarkLabs/open-enterpris…
rkzel Jan 30, 2020
da4b17f
chore(projects): add contract state handling for decoupled issues
topocount Jan 30, 2020
edcf872
Merge pull request #1923 from AutarkLabs/issue-querying
Quazia Jan 30, 2020
047ac0c
Merge branch 'decoupled-projects' of https://github.com/AutarkLabs/pl…
Quazia Jan 30, 2020
8d29ff0
chore(projects): integrate Edit Project Panel
topocount Jan 30, 2020
3c37ae9
chore(projects): add closepanel in decoupled issue api call
topocount Jan 30, 2020
22cb7ea
chore(projects): decentralized project detail view
Quazia Jan 31, 2020
22e32f8
chore(projects): decoupled issues in detail view
Quazia Jan 31, 2020
2f8e75a
Merge branch 'decentralized-project-integration' of https://github.co…
Quazia Jan 31, 2020
f2395ac
feat(template): implement enhanced OE template
ottodevs Jan 5, 2020
e847cfc
fix(template): renamed deps with identical names
topocount Jan 10, 2020
e2e8c1e
chore(devx): make the dev template self-contained
topocount Jan 17, 2020
4d2eb1e
chore(template): revise deploy scripts for new template
topocount Jan 17, 2020
f91f1b4
chore(template): update oracle and manager to hatch namespace
topocount Jan 17, 2020
7bbd787
fix(template): add finance to whitelist oracle
topocount Jan 17, 2020
b9dc689
chore(template): update staging to hatch registry
topocount Jan 17, 2020
3fb25fc
chore(template): add hatch env and update bounties address
topocount Jan 20, 2020
fa0e0cf
fix(template): remove bug where 2nd token was not whitelisted
ottodevs Jan 29, 2020
3d22860
chore(oe-template): revert bounties address to working instance
topocount Jan 31, 2020
09befaa
Merge pull request #1597 from AutarkLabs/templates/reputation
topocount Jan 31, 2020
d0003fa
chore(oe-template): add hatch-mainnet to arapp
topocount Feb 3, 2020
0361a51
chore(ens): perform ens registry migration
ottodevs Feb 5, 2020
9beb306
Merge pull request #1969 from AutarkLabs/hatch-mainnet
topocount Feb 5, 2020
e32f4c6
chore: rename tps -> autarklabs for packages/references
ottodevs Feb 6, 2020
a269ef4
fix: make start:dev script work again
ottodevs Feb 7, 2020
d43a16a
Merge pull request #1975 from AutarkLabs/dev-hotfix
topocount Feb 7, 2020
2fc3a4a
Added filtering to Review Panels (#1898)
rkzel Feb 7, 2020
93a1b13
fix(allocations): distributions with zero-support candidates
topocount Feb 10, 2020
e08355d
Merge pull request #1980 from AutarkLabs/allocations-0-support-enacted
topocount Feb 10, 2020
c9a1798
fix: add period advancement to set distribution function
PeterMPhillips Feb 10, 2020
0dc7ba9
Merge pull request #1981 from AutarkLabs/allocations-contract-update
PeterMPhillips Feb 10, 2020
8c730f4
fix(allocations): filter out state missing token data
topocount Feb 11, 2020
13585c9
Merge pull request #1986 from AutarkLabs/add-token-filter
topocount Feb 11, 2020
04dcd80
fix(allocations): update budget state on period transition
topocount Feb 12, 2020
a9ef912
Merge pull request #1989 from AutarkLabs/update-budgets-for-new-period
Quazia Feb 12, 2020
f25b5b7
chore(dev-template): fix hoist conflicts
topocount Feb 13, 2020
4884850
Merge pull request #1994 from AutarkLabs/template-hoist-conflicts
ottodevs Feb 14, 2020
c558e30
chore(projects): decoupled bounties now showing up in the bounties tab
topocount Feb 7, 2020
b8a54ff
chore(projects): integrate decoupled issues with bounty kaban
topocount Feb 11, 2020
26af975
chore(projects): completed integrating decoupled projects
topocount Feb 14, 2020
fb47d10
chore(projects): address @ottodevs contract review
topocount Feb 17, 2020
ae254a1
Merge branch 'dev' into decentralized-project-integration
topocount Feb 17, 2020
6a0935e
fix: reset remaining budget for new period and fix hard coded duration
PeterMPhillips Feb 17, 2020
4d0584a
Merge pull request #1976 from AutarkLabs/allocations-bug
ottodevs Feb 10, 2020
9b058f3
turn projects app into storage
Schwartz10 Nov 25, 2019
0cd7563
reduce runs so projects app deploys
Schwartz10 Nov 25, 2019
a9a7ea8
use discussions in template
Schwartz10 Nov 25, 2019
80a9902
add discussion frontend script
Schwartz10 Nov 25, 2019
2df1472
render discussions in dot voting
Schwartz10 Nov 25, 2019
6c4ed1e
fix discussion event polling
Schwartz10 Nov 26, 2019
c41551a
render IdentityBadge in Main
Schwartz10 Dec 2, 2019
7f6f4be
include identity resolution for id badges
Schwartz10 Dec 2, 2019
0d5c3c3
fix discussion UI and peer deps
Schwartz10 Dec 4, 2019
e4f219a
Replace IPFS helpers with Quasar
listenaddress Nov 29, 2019
bfb2798
Strat calling api instead of the helpers file
listenaddress Dec 3, 2019
7a951c5
Swap calls to Autark node for Quasar via datastore
listenaddress Dec 11, 2019
fdc9289
Remove logs
listenaddress Dec 11, 2019
db0e68c
Revert address-book
listenaddress Dec 11, 2019
3c634f3
Update datastore calls
listenaddress Dec 13, 2019
c2977f2
update arap.jsons
Schwartz10 Dec 22, 2019
8e7fe7d
fix: upgrade api-react
PeterMPhillips Jan 9, 2020
af7d0db
fix: manifest and styling of discussions
PeterMPhillips Jan 9, 2020
fbf540b
feat: custom theme support
PeterMPhillips Jan 24, 2020
63ca70f
feat: support multiple identities in identity badge
PeterMPhillips Jan 31, 2020
d1ba0ff
fix: add missing identity badge files
PeterMPhillips Jan 31, 2020
6153907
fix: remove address book warning message
PeterMPhillips Feb 5, 2020
ce5a734
fix: center address-book empty card
PeterMPhillips Feb 7, 2020
3cdd2f9
fix: dark mode for local identities autocomplete
PeterMPhillips Feb 7, 2020
22f9eb9
fix: link view profile button to aragon profile
PeterMPhillips Feb 7, 2020
855d179
Merge pull request #1974 from AutarkLabs/tps-rename
ottodevs Mar 1, 2020
9b52ada
fix: using correct networkType prop
PeterMPhillips Mar 3, 2020
10a1d6b
fix: removed fulfilled bounties from bounties screen
PeterMPhillips Mar 6, 2020
cf5d08c
Merge pull request #1996 from AutarkLabs/bounties-fix
e18r Mar 12, 2020
7c3201b
chore(projects): address @ottodevs review
topocount Mar 18, 2020
c8e0370
Merge remote-tracking branch 'origin/dev' into decentralized-project-…
topocount Mar 18, 2020
658dd21
fix(projects): make submission selection follow canonical indexes
topocount Mar 24, 2020
f199ee8
Merge pull request #1997 from AutarkLabs/projects-submission-bug
topocount Mar 25, 2020
54bc963
Merge pull request #1941 from AutarkLabs/decentralized-project-integr…
PeterMPhillips Mar 26, 2020
9e8cfba
fix(projects): index issues on unique issue ID
topocount Apr 9, 2020
d67ff62
Merge pull request #1998 from AutarkLabs/multi-repo-issue-ids
topocount Apr 10, 2020
bd6141a
Merge branch 'experimental-oe-fixes' into decentralized-project-integ…
topocount Apr 10, 2020
584d3ce
Merge pull request #1999 from AutarkLabs/decentralized-project-integr…
topocount Apr 10, 2020
dcc6b0e
fix(projects): index issues on unique issue ID
topocount Apr 9, 2020
ba0e574
chore(projects): remove logs
topocount Apr 10, 2020
e44f0fc
fix(projects): make submission selection follow canonical indexes
topocount Mar 24, 2020
5489314
chore: update Identity Badge to point to preview
topocount Apr 11, 2020
3c0b7ee
fix: allocations panel help dialog uses correct period
PeterMPhillips Apr 11, 2020
e346679
Merge pull request #1982 from AutarkLabs/allocations-help-fix
topocount Feb 11, 2020
f378bd0
fix: small fixes for projects
PeterMPhillips Apr 21, 2020
0ed6506
chore(docs): Add Mainnet StandardBounties registry
stellarmagnet Apr 23, 2020
e6eb44e
chore(docs): Use Mainnet SB registry in example
stellarmagnet Apr 23, 2020
ddaa0f6
chore(docs): Made the install instructions more comprehensive
stellarmagnet Apr 24, 2020
b6e71ba
chore(docs): Updated app headings from h2 to h1
stellarmagnet Apr 24, 2020
ffee812
Merge pull request #2000 from AutarkLabs/projects-fixes
topocount Apr 27, 2020
02819f1
fix(projects): persist fixed bounty amount when other fields update
topocount May 19, 2020
c4789d9
fix(projects): issue ID fixes
topocount May 20, 2020
596bf35
fix(projects): make submission text inline with IdentityBadge
topocount May 20, 2020
3aec762
chore(projects): address @PeterMPhillips review
topocount May 22, 2020
05a010d
Merge pull request #2002 from AutarkLabs/projects-settlement-fixes
topocount May 22, 2020
41399ce
chore(dev-template): add explicit visibility
topocount May 22, 2020
caf72f9
Merge pull request #2004 from AutarkLabs/dev-template-update
PeterMPhillips May 22, 2020
c489775
Merge branch 'dev' into experimental-oe-fixes
topocount May 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Commit Linter
on: [pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v1
- uses: wagoid/commitlint-github-action@v1
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,41 @@ jobs:
script: npm run lint

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@tps/apps-address-book
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/apps-address-book
name: Address Book app tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@tps/apps-allocations
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/apps-allocations
name: Allocations app tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@tps/apps-projects
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/apps-projects
name: Projects app tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@tps/apps-dot-voting
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/apps-dot-voting
name: Dot Voting app tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@tps/apps-rewards
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/apps-rewards
name: Rewards app tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: test
script: travis_wait 60 npm run coverage -- --scope=@autarklabs/templates-open-enterprise
name: Template tests and coverage report
install: npm run bootstrap
after_success: npm run coveralls

- stage: deploy
before_install:
- mkdir $HOME/.aragon
Expand Down
4 changes: 2 additions & 2 deletions apps/address-book/app/api-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ const functions = process.env.NODE_ENV !== 'production' && ((appState, setAppSta
})
}))

const { AragonApi, useAragonApi } = buildStubbedApiReact({ initialState, functions })
const { AragonApi, useAragonApi, useInstalledApps, useNetwork } = buildStubbedApiReact({ initialState, functions })

export { AragonApi, useAragonApi }
export { AragonApi, useAragonApi, useInstalledApps, useNetwork }
5 changes: 3 additions & 2 deletions apps/address-book/app/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const ASSETS_URL = './aragon-ui'

const App = () => {
const [ panelVisible, setPanelVisible ] = useState(false)
const { api, appState = {} } = useAragonApi()
const { api, appState = {}, guiStyle } = useAragonApi()
const { appearance, theme } = guiStyle

const { entries = [], isSyncing = true } = appState

Expand Down Expand Up @@ -61,7 +62,7 @@ const App = () => {
const addressList = entries.map(entry => entry.addr)

return (
<Main assetsUrl={ASSETS_URL}>
<Main assetsUrl={ASSETS_URL} theme={theme || appearance}>
<IdentityProvider
onResolve={handleResolveLocalIdentity}
onShowLocalIdentityModal={handleShowLocalIdentityModal}
Expand Down
17 changes: 3 additions & 14 deletions apps/address-book/app/components/Card/Empty.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { Button, EmptyStateCard, GU, Info, Link, LoadingRing } from '@aragon/ui'
import { Button, EmptyStateCard, GU, Link, LoadingRing } from '@aragon/ui'
import emptyStatePng from '../../assets/no-contacts.png'

const illustration = <img src={emptyStatePng} alt="" height="160" />
Expand All @@ -17,16 +17,6 @@ const BetterLink = styled(Link)`

const Empty = ({ action, isSyncing }) => (
<EmptyWrapper>
<Info style={{ margin: 3 * GU }} mode="warning">
Note: The Address Book application is designed to act as a new Identity
Provider for Aragon Organizations, so you can assign a name to an
Ethereum address and have that name be displayed in all of your Aragon
apps in place of the address. This requires <BetterLink
href="https://github.com/aragon/aragon.js/pull/391">an enhancement to
aragonSDK</BetterLink>, which is scheduled for an upcoming release. We will
remove this note once it’s fully available, but until then you can begin
naming and categorizing addresses.
</Info>
<EmptyStateCard
text={
isSyncing ? (
Expand Down Expand Up @@ -61,11 +51,10 @@ Empty.propTypes = {
}

const EmptyWrapper = styled.div`
align-items: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: calc(100vh - ${14 * GU}px);
justify-content: space-between;
`

export default Empty
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ const IdentityContext = React.createContext({
})

function useIdentity(address) {
const [ name, setName ] = useState(null)
const [ label, setLabel ] = useState(null)
const [ source, setSource ] = useState(null)
//const [ image, setImage ] = useState(null)
const { resolve, updates$, showLocalIdentityModal } = useContext(
IdentityContext
)

const handleNameChange = useCallback(metadata => {
setName(metadata ? metadata.name : null)
const handleChange = useCallback(metadata => {
setLabel(metadata ? metadata.name : null)
setSource(metadata && metadata.source ? metadata.source : null)
}, [])

const handleShowLocalIdentityModal = useCallback(
Expand All @@ -30,18 +33,18 @@ function useIdentity(address) {
)

useEffect(() => {
resolve(address).then(handleNameChange)
resolve(address).then(handleChange)

const subscription = updates$.subscribe(updatedAddress => {
if (updatedAddress.toLowerCase() === address.toLowerCase()) {
// Resolve and update state when the identity have been updated
resolve(address).then(handleNameChange)
resolve(address).then(handleChange)
}
})
return () => subscription.unsubscribe()
}, [ address, handleNameChange, updates$ ])
}, [ address, handleChange, updates$ ])

return [ name, handleShowLocalIdentityModal ]
return [ label, source, handleShowLocalIdentityModal ]
}

const IdentityProvider = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
import React from 'react'
import PropTypes from 'prop-types'
import { useNetwork } from '@aragon/api-react'
import { IdentityBadge } from '@aragon/ui'
import { useInstalledApps, useNetwork } from '../../api-react'
import { GU, IconLabel, IdentityBadge, Link, useTheme } from '@aragon/ui'
import { useIdentity } from './IdentityManager'
import LocalLabelPopoverTitle from './LocalLabelPopoverTitle'
import LocalLabelPopoverActionLabel from './LocalLabelPopoverActionLabel'

const LocalIdentityBadge = ({ entity, forceAddress, ...props }) => {
const LocalIdentityBadge = ({ entity, ...props }) => {
const network = useNetwork()
const [ label, showLocalIdentityModal ] = useIdentity(entity)
const handleClick = () => showLocalIdentityModal(entity)
const installedApps = useInstalledApps()
const kernel = installedApps.find(app => app.name === 'Kernel').appAddress
const [ label, source, handleShowLocalIdentityModal ] = useIdentity(entity)
const handleCustomLabel = () => handleShowLocalIdentityModal(entity)
const handleProfile = () => {}
const getPopoverAction = () => {
const theme = useTheme()
//if(source === 'addressBook') return null
if(source === '3box') {
return {
label: (
<Link
href={kernel && network.type !== 'private'
? `https://preview.autark.xyz/#/${kernel}/profile/${entity}`
: `https://www.3box.io/${entity}`
}
css={`
display: flex;
align-items: center;
text-decoration: none;
color: ${theme.contentSecondary}
`}
>
<IconLabel
css={`
margin-right: ${1 * GU}px;
`}
/>
View profile
</Link>
),
onClick: handleProfile
}
}
return {
label: <LocalLabelPopoverActionLabel hasLabel={Boolean(label)} />,
onClick: handleCustomLabel
}
}

return (
<IdentityBadge
label={(!forceAddress && label) || ''}
label={label || ''}
entity={entity}
networkType={network && network.type}
popoverAction={{
label: <LocalLabelPopoverActionLabel hasLabel={Boolean(label)} />,
onClick: handleClick,
}}
popoverAction={getPopoverAction()}
popoverTitle={
label ? <LocalLabelPopoverTitle label={label} /> : undefined
<LocalLabelPopoverTitle label={label || ''} source={source}/>
}
{...props}
/>
Expand All @@ -29,7 +63,6 @@ const LocalIdentityBadge = ({ entity, forceAddress, ...props }) => {

LocalIdentityBadge.propTypes = {
...IdentityBadge.propTypes,
forceAddress: PropTypes.bool
}

export default LocalIdentityBadge
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import React from 'react'
import PropTypes from 'prop-types'
import { GU, Tag } from '@aragon/ui'

function LocalLabelPopoverTitle({ label }) {
const getTag = (source) => {
if (source === '3box') return '3Box'
if (source === 'addressBook') return 'Address Book'
return 'Custom Label'
}

function LocalLabelPopoverTitle({ label, source = null }) {
return (
<div
css={`
Expand All @@ -27,13 +33,14 @@ function LocalLabelPopoverTitle({ label }) {
margin-left: ${2 * GU}px;
`}
>
Custom label
{getTag(source)}
</Tag>
</div>
)
}
LocalLabelPopoverTitle.propTypes = {
label: PropTypes.string.isRequired,
source: PropTypes.string,
}

export default LocalLabelPopoverTitle
6 changes: 6 additions & 0 deletions apps/address-book/arapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
"network": "rinkeby"
},
"experimental": {
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
"appName": "address-book-experimental.open.aragonpm.eth",
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
"network": "rinkeby"
},
"rinkeby": {
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
"appName": "address-book.aragonpm.eth",
Expand Down
10 changes: 5 additions & 5 deletions apps/address-book/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@tps/apps-address-book",
"name": "@autarklabs/apps-address-book",
"version": "0.0.1",
"description": "Address book app from Planning Suite",
"scripts": {
Expand Down Expand Up @@ -30,9 +30,9 @@
"test": "cross-env TRUFFLE_TEST=true npm run ganache-cli:test"
},
"dependencies": {
"@aragon/api": "2.0.0-beta.8",
"@aragon/api-react": "2.0.0-beta.8",
"@aragon/ui": "^1.0.0-alpha.26",
"@aragon/api": "petermphillips/aragon-api",
"@aragon/api-react": "2.0.0-beta.9",
"@aragon/ui": "1.2.1",
"axios": "^0.18.0",
"ipfs-http-client": "29.1.0",
"prop-types": "^15.7.2",
Expand All @@ -48,7 +48,7 @@
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@tps/test-helpers": "^0.0.1",
"@autarklabs/test-helpers": "^0.0.1",
"babel-eslint": "^10.0.1",
"babel-plugin-styled-components": "^1.10.0",
"cross-env": "^5.2.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/allocations/app/api-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ const functions = process.env.NODE_ENV !== 'production' && ((appState, setAppSta
}),
}))

const { AragonApi, useAragonApi, usePath } = buildStubbedApiReact({ initialState, functions })
const { AragonApi, useAragonApi, useInstalledApps, useNetwork } = buildStubbedApiReact({ initialState, functions })

export { AragonApi, useAragonApi, usePath }
export { AragonApi, useAragonApi, useInstalledApps, useNetwork }
39 changes: 25 additions & 14 deletions apps/allocations/app/app-state-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ const compareBalancesByEthAndSymbol = (tokenA, tokenB) => {
}

const getTokenFromAddress = (tokenAddress, tokenList) => {
if (!tokenList || !tokenList.length) return tokenAddress
if (!tokenList || !tokenList.length) return null
return tokenList.find(token => addressesEqual(token.address, tokenAddress))
}

function appStateReducer(state) {
const { accounts: budgets, balances , allocations } = state || {}

const { accounts: budgets, balances, allocations, period } = state || {}
const { endDate } = period || {}
const currentDate = new Date()
// TODO: convert balances to an object to decrease computational complexity on token lookups in script.js
const balancesBn = balances
? balances
.map(balance => ({
Expand All @@ -39,24 +41,33 @@ function appStateReducer(state) {
: []

const budgetsBn = budgets
? budgets.map(budget => ({
...budget,
active: budget.hasBudget && Number(budget.amount) > 0,
// get some extra info about the token
token: getTokenFromAddress(budget.token, balances)
? budgets
// prevent any budgets missing token data from getting passed to the frontend
.filter(budget => getTokenFromAddress(budget.token, balances))
.map(budget => ({
...budget,
active: budget.hasBudget && Number(budget.amount) > 0,
// get some extra info about the token
token: getTokenFromAddress(budget.token, balances),
// if current period end date is less than now, current period is over
// but not updated on chain. so we reset the remaining budget
remaining: endDate < currentDate ? budget.amount : budget.remaining,
// amount: new BigNumber(budget.amount),
// numData: {
// amount: parseInt(budget.amount, 10),
// },
}))
}))
: []

const allocationsBn = allocations
? allocations.map(allocation => ({
...allocation,
// get some extra info about the token
tokenDecimal: getTokenFromAddress(allocation.token, balances).decimals
}))
? allocations
// prevent any allocation details missing token data from getting passed to the frontend
.filter(allocation => getTokenFromAddress(allocation.token, balances))
.map(allocation => ({
...allocation,
// get some extra info about the token
tokenDecimal: getTokenFromAddress(allocation.token, balances).decimals
}))
: []

const newState = {
Expand Down
Loading