rchain-community / rgov

RChain liquid democracy demo: capability sharing, mailbox, directory, chat, ...
https://rchain-community.github.io/rgov/
10 stars 14 forks source link

Help wanted to allow ballot-ui make use of participate.js #250

Closed David405 closed 3 years ago

dckc commented 3 years ago

I'm out of town this weekend.

On Fri, Jul 23, 2021 at 2:28 PM David Asamonye @.***> wrote:

@David405 commented on this pull request.

In src/ballot-ui/ballot.js https://github.com/rchain-community/rgov/pull/250#discussion_r675821189:

@@ -0,0 +1,11 @@ + +import { getEthProvider } from 'rchain-api';

How about over the weekend? Can you kindly make out time so we could go over this?

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/rchain-community/rgov/pull/250#discussion_r675821189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABE3SUMBMJV4ZZUDCSN72TTZG7GJANCNFSM5AOZY4CA .

-- Dan Connolly http://www.madmode.com/

David405 commented 3 years ago

The main problem I am facing is that I don't understand how participate.js interact with participate.html, I mean, when you do mount('#xxxx', xxxx) inside participate.js, how does participate.js know it has to search participate.html for #xxxxx?

If you can get me up to speed by explaining this, I think I can figure out a solution from there.

David405 commented 3 years ago

@dckc I was able to figure out a fix, Idk if it's the best way to approach this but it works correctly and isn't causing any obvious problems.

What I did was, since I don't know how to make another HTML file use participate.js, I divided participate.html into two main divs (one div controls the developer interface, the other controls the voting interface) and created a navbar, the navbar buttons control which area of the DOM is shown or hidden, this way, I can use participate.html to render the voting interface.