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

Snapshot Merge #1253

Merged
merged 57 commits into from
Aug 13, 2021
Merged

Snapshot Merge #1253

merged 57 commits into from
Aug 13, 2021

Conversation

dillchen
Copy link
Contributor

This is Snapshot Integration into Commonwealth. There are some additional changes / enhancements to be made in follow up PRs for performance and refactors.

Description

Please see spec

Motivation and Context

Please see spec

How has this been tested?

Have proper tags been added (for bug, enhancement, breaking change)?

  • yes

Does this PR affect any server routes?

  • yes, and they are tested: [enter the % coverage here]
  • yes, and they are not tested: [enter the % coverage here]
  • yes, but I did not run tests
  • no

fstar1129 and others added 12 commits April 27, 2021 08:37
* add yearn and fei as chains
* modify chain model
* add migration
* add icons
I'm going to merge this in so your most recent PR can be merged in post-review. But the controllers will be removed when the ETH-Token Forum PR gets merged into master upstream. We can sync over this later.
* fetch all proposals using snapshot

* add date time fixes

Co-authored-by: dillchen <dillon@commonwealth.im>
* add view snapshot proposal

* add viewVote component
* update snapshot proposal page

* create snpashot proposal workflow

* update UI

* utilize snapshot js

* add snapshot create proposal

* add sushi token for testing purpose

* correct wrong code

* complete creating snapshot proposal

* update manage community form
* update snapshot proposal page

* create snpashot proposal workflow

* update UI

* utilize snapshot js

* add snapshot create proposal

* add sushi token for testing purpose

* correct wrong code

* complete creating snapshot proposal

* Handle proposals missing Passed and Executed events

* Add debug trace when Substrate proposals fail to load

* Show missing PROP/MOTs

* Reduce data passed in bulkEntities

* Include chain entities on getThread

* Remove extra sanitize pass

* Ensure treasury proposals are always created

* Add missing data tag for tres proposals

* Adjust mobile header

* Enforce DISTINCT when query for collaborators and chain entities with ARRAY_AGG

* Minor copy

* Integrate github actions. (#1219)

* Migrate CI to github actions.

* Add NO_CLIENT env for test suite.

* Map postgres port to localhost.

* Offchain Community Creation (site-admin only) (#1204)

* create an offchain community(site admin only)

* Remove commented code

* Route to the newly created community

Co-authored-by: zakhap <zhs2104@columbia.edu>

* update manage community form

* Fixed README.md to properly display instructions (#1215)

* fixed README.md to properly display instructions

* fixed connect address instructions using substrate cmd line

* Remove token balance requirement for creating threads (#1220)

* remove token balance requirement

* allow commenting as well

* Fix createReaction and remove dead code.

Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
Co-authored-by: Jake Naviasky <jake@commonwealth.im>

* Skip token holder test cases.

* add confirm vote modal

* Fix hydradx spec and disable bounties page.

* add snapshot util functions for voting

* Fix completion hack in referendum.

* Invite Flow Fixes, Stage 1 (#1212)

* Add invite count pip

* Reinit app on private community invite acceptance

* Remove logs, remove svg work

* Conditionally close modal if no remaining invites

* Refactor Community Options Popover (#1214)

* Small Invite Flow Bug Fixes (#1213)

* small bugs for invite flow

* Get Invite Link Section updated

* button label update

* add strategies from snapshot.js to fix ts errors

* remove warnings

* Add underline to Quill Editor links

* Fix Comma/Semicolon Bug (#1224)

* Serve Substrate specs from DB. (#1223)

* Store substrate specs in db.

* Add spec_settings page.

* Remove plasm switch in substrate controller.

* Attempt CSS.

* style update

* Permit community admin to edit spec and QA.

Co-authored-by: James Truong <jamestruong.consult@gmail.com>

* complete voting

* utilize snapshotjs npm package

* fix linting test

* test linting

* fix lint error and update code

* Tips UI (#1221)

* Remove puppeteer.

* Add tip controllers.

* Add tentative view.

* Comment out tx success callbacks.

* tips ui integration first pass

* tips ui done

* changed tip value from sum to median

* changed tip value display style to match design

* Bump CW version and fix migrations.

* fix responsive design issue, show contribute only for council members and tip reason in listing page

* minor styling change

* Fix tip view page error.

Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Co-authored-by: zakhap <zhs2104@columbia.edu>

* Added Google Tag Manager Script (#1233)

* Offchain Polls v2 (#1240)

* motions wip

* sidebar wip

* sidebar modules

* hierarchical sidebar

* move poll, style revs

* Add offchain voting options json blob to backend

* offchain vote options

* Add form, update JSON field names, revs on poll creation flow

* Bug fixes and styling

* More bugs and style fixes

* Hide motions for now

* Minor fixes: Update copy for offchain communities, update styling

* Minor fixes: topic selector dropdown arrow

* Fix allowNull requirement for threads

* Update user address styling

* Adjust discussion row tag styling

* Fix responsive new thread form, mobile header glitch

* Fix notifications menu overflow text

* Use formatter on notification rows

* Reset app.chain when chain initialization was aborted, to prevent infinite spinner race condition

* Manage community modal styling

* Tips "Reason" fix (#1242)

* tips reason fix: commonwealth links open in the same tab

* changes based on Zak's review

* update getVotes from snapshot.js

* Optimization: Load bulkOffchain in parallel with proposal comments and chain entities (#1243)

* Bump typescript dependency version.

* fix ajv issue

* Remove global and cleanup lint and add redraw.

* Lint fixes.

* Add another demo community

* Add new snapshot space id to fei

* Add voting buffer style

* Fix voter addresses to be User objects and the snapshot author to be User object with link

* Fix header spacing issues

* Unlink the Created and Updated at metadata, date calculation still wrong

* Add spinner while proposals load from snapshot api

* Make the proposal form look nicer, oddly thin?, removed the weird date-pickers.

* Remove evidence of DatePicker from form

* Add spinner for when callout is loading on new proposal form

* Add margin to the bottom of voting actions so they don't touch the bottom

* Add comment on VotingAction buttons where they're hardcoded to always be clickable.

* Comment out SnapshotProposalStagesBar because it has no logic to do anything and the proposal rows do not have attributes for filtering yet.

* Add fei.eth back to migration

* Fix ending/ended ago bug

* Add 'in' to timestamp interpretation

* resetServer.ts demos community, broken

* Add generic snapshot adapter and use it for all snapshot communities

* Add demo community to migration and ChainNetwork, probably wrong contract address on chainnode"

* Add demo to down migration and add TEST token contract to node

* Make hub.snapshot default, add demo community.

* Default apollo to hub.snapshot as well

* Add demo to address model

* The changes to run the demo, not generalized

* Make snapshot pages mobile friendly

* add snapshot filtering

* Clean up proposal listing UI

* UI tweaks for snapshot proposal pages

* Catch voting errors

* Switch off oninit lifecycle; move submit proposal button to new proposal button

Co-authored-by: Raymond Zhong <raykyri@gmail.com>
Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Co-authored-by: rakeshup <parthiban.rakesh95@gmail.com>
Co-authored-by: zakhap <zhs2104@columbia.edu>
Co-authored-by: Timothee Legros <62490329+timolegros@users.noreply.github.com>
Co-authored-by: maxwellfoley3 <maxwellsfoley@gmail.com>
Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
Co-authored-by: gdjohnson <graham@commonwealth.im>
Co-authored-by: true-eye <jamestruong.consult@gmail.com>
Co-authored-by: Raymond Zhong <raykyri@users.noreply.github.com>
* add option to autofill snapshot proposal from existing thread

* remove code accidentally added in merge

Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
@dillchen dillchen requested review from maxwellfoley3, zakhap and jnaviask and removed request for maxwellfoley3 July 14, 2021 08:33
@dillchen dillchen changed the title Snapshot Initial Merge Snapshot Merge Jul 14, 2021
fstar1129 and others added 12 commits July 14, 2021 05:09
* add yearn and fei as chains
* modify chain model
* add migration
* add icons
I'm going to merge this in so your most recent PR can be merged in post-review. But the controllers will be removed when the ETH-Token Forum PR gets merged into master upstream. We can sync over this later.
* fetch all proposals using snapshot

* add date time fixes

Co-authored-by: dillchen <dillon@commonwealth.im>
* add view snapshot proposal

* add viewVote component
* update snapshot proposal page

* create snpashot proposal workflow

* update UI

* utilize snapshot js

* add snapshot create proposal

* add sushi token for testing purpose

* correct wrong code

* complete creating snapshot proposal

* update manage community form
* update snapshot proposal page

* create snpashot proposal workflow

* update UI

* utilize snapshot js

* add snapshot create proposal

* add sushi token for testing purpose

* correct wrong code

* complete creating snapshot proposal

* Handle proposals missing Passed and Executed events

* Add debug trace when Substrate proposals fail to load

* Show missing PROP/MOTs

* Reduce data passed in bulkEntities

* Include chain entities on getThread

* Remove extra sanitize pass

* Ensure treasury proposals are always created

* Add missing data tag for tres proposals

* Adjust mobile header

* Enforce DISTINCT when query for collaborators and chain entities with ARRAY_AGG

* Minor copy

* Integrate github actions. (#1219)

* Migrate CI to github actions.

* Add NO_CLIENT env for test suite.

* Map postgres port to localhost.

* Offchain Community Creation (site-admin only) (#1204)

* create an offchain community(site admin only)

* Remove commented code

* Route to the newly created community

Co-authored-by: zakhap <zhs2104@columbia.edu>

* update manage community form

* Fixed README.md to properly display instructions (#1215)

* fixed README.md to properly display instructions

* fixed connect address instructions using substrate cmd line

* Remove token balance requirement for creating threads (#1220)

* remove token balance requirement

* allow commenting as well

* Fix createReaction and remove dead code.

Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
Co-authored-by: Jake Naviasky <jake@commonwealth.im>

* Skip token holder test cases.

* add confirm vote modal

* Fix hydradx spec and disable bounties page.

* add snapshot util functions for voting

* Fix completion hack in referendum.

* Invite Flow Fixes, Stage 1 (#1212)

* Add invite count pip

* Reinit app on private community invite acceptance

* Remove logs, remove svg work

* Conditionally close modal if no remaining invites

* Refactor Community Options Popover (#1214)

* Small Invite Flow Bug Fixes (#1213)

* small bugs for invite flow

* Get Invite Link Section updated

* button label update

* add strategies from snapshot.js to fix ts errors

* remove warnings

* Add underline to Quill Editor links

* Fix Comma/Semicolon Bug (#1224)

* Serve Substrate specs from DB. (#1223)

* Store substrate specs in db.

* Add spec_settings page.

* Remove plasm switch in substrate controller.

* Attempt CSS.

* style update

* Permit community admin to edit spec and QA.

Co-authored-by: James Truong <jamestruong.consult@gmail.com>

* complete voting

* utilize snapshotjs npm package

* fix linting test

* test linting

* fix lint error and update code

* Tips UI (#1221)

* Remove puppeteer.

* Add tip controllers.

* Add tentative view.

* Comment out tx success callbacks.

* tips ui integration first pass

* tips ui done

* changed tip value from sum to median

* changed tip value display style to match design

* Bump CW version and fix migrations.

* fix responsive design issue, show contribute only for council members and tip reason in listing page

* minor styling change

* Fix tip view page error.

Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Co-authored-by: zakhap <zhs2104@columbia.edu>

* Added Google Tag Manager Script (#1233)

* Offchain Polls v2 (#1240)

* motions wip

* sidebar wip

* sidebar modules

* hierarchical sidebar

* move poll, style revs

* Add offchain voting options json blob to backend

* offchain vote options

* Add form, update JSON field names, revs on poll creation flow

* Bug fixes and styling

* More bugs and style fixes

* Hide motions for now

* Minor fixes: Update copy for offchain communities, update styling

* Minor fixes: topic selector dropdown arrow

* Fix allowNull requirement for threads

* Update user address styling

* Adjust discussion row tag styling

* Fix responsive new thread form, mobile header glitch

* Fix notifications menu overflow text

* Use formatter on notification rows

* Reset app.chain when chain initialization was aborted, to prevent infinite spinner race condition

* Manage community modal styling

* Tips "Reason" fix (#1242)

* tips reason fix: commonwealth links open in the same tab

* changes based on Zak's review

* update getVotes from snapshot.js

* Optimization: Load bulkOffchain in parallel with proposal comments and chain entities (#1243)

* Bump typescript dependency version.

* fix ajv issue

* Remove global and cleanup lint and add redraw.

* Lint fixes.

* Add another demo community

* Add new snapshot space id to fei

* Add voting buffer style

* Fix voter addresses to be User objects and the snapshot author to be User object with link

* Fix header spacing issues

* Unlink the Created and Updated at metadata, date calculation still wrong

* Add spinner while proposals load from snapshot api

* Make the proposal form look nicer, oddly thin?, removed the weird date-pickers.

* Remove evidence of DatePicker from form

* Add spinner for when callout is loading on new proposal form

* Add margin to the bottom of voting actions so they don't touch the bottom

* Add comment on VotingAction buttons where they're hardcoded to always be clickable.

* Comment out SnapshotProposalStagesBar because it has no logic to do anything and the proposal rows do not have attributes for filtering yet.

* Add fei.eth back to migration

* Fix ending/ended ago bug

* Add 'in' to timestamp interpretation

* resetServer.ts demos community, broken

* Add generic snapshot adapter and use it for all snapshot communities

* Add demo community to migration and ChainNetwork, probably wrong contract address on chainnode"

* Add demo to down migration and add TEST token contract to node

* Make hub.snapshot default, add demo community.

* Default apollo to hub.snapshot as well

* Add demo to address model

* The changes to run the demo, not generalized

* Make snapshot pages mobile friendly

* add snapshot filtering

* Clean up proposal listing UI

* UI tweaks for snapshot proposal pages

* Catch voting errors

* Switch off oninit lifecycle; move submit proposal button to new proposal button

Co-authored-by: Raymond Zhong <raykyri@gmail.com>
Co-authored-by: Jake Naviasky <jake@commonwealth.im>
Co-authored-by: rakeshup <parthiban.rakesh95@gmail.com>
Co-authored-by: zakhap <zhs2104@columbia.edu>
Co-authored-by: Timothee Legros <62490329+timolegros@users.noreply.github.com>
Co-authored-by: maxwellfoley3 <maxwellsfoley@gmail.com>
Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
Co-authored-by: gdjohnson <graham@commonwealth.im>
Co-authored-by: true-eye <jamestruong.consult@gmail.com>
Co-authored-by: Raymond Zhong <raykyri@users.noreply.github.com>
* add option to autofill snapshot proposal from existing thread

* remove code accidentally added in merge

Co-authored-by: Maxwell Foley <maxwell.foley@certik.org>
@zakhap
Copy link
Collaborator

zakhap commented Jul 15, 2021

@maxwellfoley3 Thank you for this QA.

I just fixed your 1st issue identified.

The others: TBD

@dillchen
Copy link
Contributor Author

dillchen commented Aug 12, 2021

Ready after these things are fixed, mostly around displaying proposal pages and data: https://hicommonwealth.slack.com/archives/C026YCDF0QZ/p1628722495217700

@jnaviask jnaviask merged commit cf600cc into master Aug 13, 2021
@jnaviask jnaviask deleted the snapshot branch August 13, 2021 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants