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

Port ui.js to React? #212

Closed
jfly opened this issue May 17, 2016 · 2 comments
Closed

Port ui.js to React? #212

jfly opened this issue May 17, 2016 · 2 comments

Comments

@jfly
Copy link
Contributor

jfly commented May 17, 2016

Matteo Colombo just ran into a bug where rounds disappear as he's adding rounds.

I was able to debug this for a little while with him, and it appears to be related to our hashchange listener. When I comment out the hashchange listener, the problem goes away for him. What appears to be happening is that the hashchange event is firing at unexpected times, which causes us to go into this branch: https://github.com/cubing/tnoodle/blob/c6c0f6650e10d4ae76467532deb19a2504de9b67/scrambler-interface/WebContent/scrambler-interface/js/ui.js#L1096-L1100, which causes us to reset the DOM elements.

The code as currently written is very hard to reason about, and that's because we don't have an explicit model. Porting to react would be a good way of forcing us to have an explicit data model that just needs to stay in sync with the url.

Using React would force us to add another build step (compiling jsx to js), but I'd personally be okay with using the in browser jsx -> js compiler just to get things going. Performance isn't critical here.

@MatteoColombo
Copy link

MatteoColombo commented May 17, 2016

If someone is interested, here is the video i made to show the problem:
https://www.youtube.com/watch?v=xpD9CMQKShM

@jfly
Copy link
Contributor Author

jfly commented Jan 5, 2018

We have a new, React based UI in #236, so I'm going to close this issue.

@jfly jfly closed this as completed Jan 5, 2018
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

No branches or pull requests

2 participants