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: app paths #1029

Merged
merged 5 commits into from
Nov 8, 2019
Merged

Voting: app paths #1029

merged 5 commits into from
Nov 8, 2019

Conversation

bpierre
Copy link
Contributor

@bpierre bpierre commented Oct 25, 2019

@coveralls
Copy link

coveralls commented Oct 25, 2019

Coverage Status

Coverage decreased (-0.05%) to 97.816% when pulling 3a0afed on paths-voting into 38a651a on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.875% when pulling 3944845 on paths-voting into 38a651a on master.

@facuspagnuolo facuspagnuolo mentioned this pull request Oct 25, 2019
1 task
Copy link
Contributor

@sohkai sohkai left a comment

Choose a reason for hiding this comment

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

🙌Amazing, this works really well!

Right now we still have to wait until the vote's been synced from events for the app to load the details page, but we can make it instant later with aragon/client#1163.

// The `ready` check prevents a vote to be selected
// until the app state is fully ready.
if (!ready || selectedVoteId === '-1') {
const voteId = path ? voteIdFromPath(path) : NO_VOTE_ID
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on rolling up the path check directly into voteIdFromPath()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That’s better yes!

@bpierre bpierre merged commit 51260c1 into master Nov 8, 2019
@bpierre bpierre deleted the paths-voting branch November 8, 2019 17:03
@rperez89
Copy link
Contributor

@sohkai @bpierre Hey guys awesome work! do you have somewhere explained how this work? or maybe how can i see it working on rinkeby?

@sohkai
Copy link
Contributor

sohkai commented Nov 14, 2019

It is working on both mainnet and rinkeby, for example at https://rinkeby.aragon.org/#/ngo/0xc3e8deb4a85718388628b9b5758d1fb242a4d0c1/vote/1/

The API documentation is available:

Basically, use path to know what route your app should be on at a given time (similar to controlling your routing by parsing URL parameters). Use requestPath() to change the route. The client only rejects path requests if they've come from an unloaded app (to avoid security issues via one app controlling the routes of another app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants