rchain-community / rgov

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

Actions text box does not update #44

Closed Bill-Kunj closed 3 years ago

Bill-Kunj commented 3 years ago

participate.js has been changed to fetch actions from .rho files instead of getting them from the actions.js file fetching the .rho files works, but the text box in the web UI no longer updates with the selected action unless the "explore" button is pressed.

Bill-Kunj commented 3 years ago

Non-working code is in branch reorganize-actions

dckc commented 3 years ago

20 commits across 46 files... that's a lot to wade thru. If you could reduce the delta from master, that would help.

dckc commented 3 years ago

I'm not sure where to start. When I yarn; yarn start I get:

ERROR in ./src/actions.js
Module not found: Error: Can't resolve '../rhoid.js' in '/home/connolly/projects/liquid-democracy/src'

If the directions for running the thing have changed, be sure to update README.md. Likewise CONTRIBUTING.md for buildling.

Bill-Kunj commented 3 years ago

I'm not using yarn, and it doesn't work at all on my setup. I've removed the reference to rhoid.js from actions.js, so it should work now

dckc commented 3 years ago

What are the exact steps to reproduce the problem?

I initially saw something similar, and I saw this in the console:


2mount-redraw.js:15 TypeError: Cannot read property 'type' of undefined
    at fty (bundle.js:44887)
    at bundle.js:44928
    at Array.map (<anonymous>)
    at fieldControls (bundle.js:44913)
    at Object.view (bundle.js:44950)
    at Function.callHook (bundle.js:23289)
    at updateComponent (bundle.js:23741)
    at updateNode (bundle.js:23678)
    at updateNodes (bundle.js:23561)
    at bundle.js:24223
sync @ mount-redraw.js:15
DevTools failed to load SourceMap: Could not load content for chrome-extension://dmkamcknogkgcdfhhbddcghachkejeap/browser-polyfill.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

fty and fieldControls are in https://github.com/rchain-community/liquid-democracy/blob/reorganize-actions/src/participate.js

But when I set a breakpoint and reloaded the page, the symptoms went away.

And now I can't get them back.

Bill-Kunj commented 3 years ago

I'm not entirely certain, but I think mount-redraw.js and bundle.js are from the webpack deployment Changing participate.js should make a corresponding change in those files.

To reproduce the action text-box issue: 1) load the web page. 2) select "newinbox" 3) observe the textbox that should contain the code does not update 4) click "Explore" 5) observe the textbox now contains the correct code

jimscarver commented 3 years ago

@dckc I just use npm install npm start

the rholang now in separate files does not load until you hit explore or deploy and the field values are not filled in the match statement. What will cause them to update?