-
Notifications
You must be signed in to change notification settings - Fork 11
Simplified UI in React #105
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
Conversation
Beginnings of a model in which we keep the app running with its own state machine, rendering to a couple canvases at full frame rate, using its own model classes... but with React used to draw the HTML-based UI on top of it, for headers, footers, and the body of the app. This first attempt just tells React to re-render 10 times per second. In this first commit, the first scene is rendered with both its original UI and a React-render duplicate UI on top. The React UI doesn't yet shrink text below certain widths, though.
Now, the legacy UI is drawn semi-opaque so that the new React UI drawn over the top is more clear.
We are showing the legacy non-React UI below, for comparison.
Conflicts: public/index.html
This adds the ability to set a callback handler with the state manager which will be called when state is set.
Use ?words=small or ?words=large to specify which set of words to show.
maddiedierker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
| imgName = 'underwater'; | ||
| } | ||
|
|
||
| // Temporarily show background for every mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to see how UI elements looked on a background other than plain white, since I presume we will have some kind of background for each scene.
bethanyaconnor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay thanks for doing this!
This PR converts all the HTML-based UI from jQuery to React. It also simplifies some of the UI as we start to think about driving the progression via a https://studio.code.org script, rather than doing everything in this app.
Some notable changes:
?words=smallor?words=largeto specify which words list to use. We will expand the use of parameterisation to specify fish vs. non-fish mode, and maybe other things like how many items we expect the user to train on, as the progression design requires.