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

Voting: use aragonAPI for React + React hooks #717

Merged
merged 38 commits into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b3e8913
Use label prop on ButtonIcon elements
bpierre Mar 15, 2019
9f2f822
Voting: use hooks + @aragon/api-react
bpierre Mar 18, 2019
cf11c57
Remove useless .pipe( first() ) calls
bpierre Mar 19, 2019
d82227f
Merge branch 'master' into voting-react-api
bpierre Mar 20, 2019
7ce65a3
Fix infinite calls when opening a vote
bpierre Mar 20, 2019
3d72b24
Use the new @aragon/api-react API
bpierre Mar 21, 2019
42b2ea0
Optimize rendering
bpierre Mar 21, 2019
58d35b7
@aragon/api-react API change
bpierre Mar 21, 2019
3bfb5ab
Merge branch 'master' into voting-react-api
bpierre Mar 21, 2019
5f9855f
Merge master into voting-react-api
bpierre Apr 3, 2019
c03bffe
shorthand properties first
bpierre Apr 3, 2019
49b0a20
useNow(): update if updateEvery changes
bpierre Apr 3, 2019
49cdbbd
VotePanelContent: make use of useCurrentVoteData()
bpierre Apr 3, 2019
99b9672
Make VotePanelContent a function component
bpierre Apr 4, 2019
d86b477
styled-component css transform doesn’t like attached components
bpierre Apr 4, 2019
e361906
Use displayMenuButton
bpierre Apr 4, 2019
1481296
Use IconMenu from @aragon/ui
bpierre Apr 5, 2019
111952f
ESLint fixes
bpierre Apr 5, 2019
5c9b40c
Refactor App.js to move the logic into custom hooks
bpierre Apr 8, 2019
58d76e8
Make IdentityManager.js a JS module
bpierre Apr 8, 2019
7324e55
LocalIdentityBadge: consume useNetwork() directly
bpierre Apr 8, 2019
5679af8
Add the React Hooks linter plugin
bpierre Apr 8, 2019
bff5a55
Add a comment about why we keep the selected vote until the panel get…
bpierre Apr 8, 2019
61df0bf
Render identity badges
bpierre Apr 9, 2019
a5bae27
Merge branch 'master' into voting-react-api
bpierre Apr 9, 2019
07baf36
Stop exporting SettingsContext
bpierre Apr 9, 2019
b6e08b1
useVotingApp() => useAppLogic()
bpierre Apr 9, 2019
d32c6ad
open() / close() => requestOpen() / requestClose()
bpierre Apr 10, 2019
bd0f415
Group aragonAPI hooks using useAragonApi()
bpierre Apr 10, 2019
940647c
User balance: use -1 for unknown balances
bpierre Apr 10, 2019
54f6f2a
Identity: remove references to a modal
bpierre Apr 10, 2019
2af4569
getUserBalance(): check if vote exists
bpierre Apr 10, 2019
7f181a9
Refactoring: voting text rendering
bpierre Apr 10, 2019
641137e
Skip useless VotingCard renderings
bpierre Apr 10, 2019
3645dc5
Remove console.log() calls
bpierre Apr 10, 2019
c09b088
ESLint fixes
bpierre Apr 10, 2019
98b22b4
fix: use new API for usePanelState()
sohkai Apr 10, 2019
c408c21
VotingCard: remove unnecessary default prop
sohkai Apr 10, 2019
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: 4 additions & 7 deletions apps/voting/app/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"browser": true,
"es6": true
},
"extends": [
"standard",
"standard-react",
"prettier",
"prettier/react"
],
"extends": ["standard", "standard-react", "prettier", "prettier/react"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
Expand All @@ -17,7 +12,7 @@
},
"sourceType": "module"
},
"plugins": ["prettier", "react"],
"plugins": ["prettier", "react", "react-hooks"],
"rules": {
"valid-jsdoc": "error",
"react/prop-types": 0,
Expand All @@ -31,6 +26,8 @@
"jsxBracketSameLine": false
}
],
"react-hooks/rules-of-hooks": "error",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

"react-hooks/exhaustive-deps": "warn",
"linebreak-style": ["error", "unix"]
}
}
4 changes: 3 additions & 1 deletion apps/voting/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"license": "AGPL-3.0-or-later",
"dependencies": {
"@aragon/api": "^1.0.0",
"@aragon/api-react": "^1.0.0-beta.2",
"@aragon/ui": "^0.33.0",
"bn.js": "^4.11.8",
"date-fns": "2.0.0-alpha.22",
"onecolor": "^3.1.0",
"prop-types": "^15.6.0",
"prop-types": "^15.7.2",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-linkify": "^0.2.2",
Expand All @@ -35,6 +36,7 @@
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-react-hooks": "^1.6.0",
"eslint-plugin-standard": "^4.0.0",
"parcel-bundler": "1.9.7",
"prettier": "^1.8.2"
Expand Down
Loading