-
Notifications
You must be signed in to change notification settings - Fork 167
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
Redesign IDE #21
Merged
Redesign IDE #21
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No functionality.
Changes: - Changed `Playground` component to a statefull one (extends `React.Component) - add property `playgroundCode` to IApplicationState (bad practice, change to a slice of the state instead) - add interface `IPlaygroundProps` to denote the properties passed to Playground
Once again, this is a WIP. Text typed into the playground editor will stay in the playground (or rather, appear again) after leaving and coming back. Changes: - added of action, actionCreator (updatePlaygroundCode) - added a reducer under application's `reducer` function Possible problems: - Location of reducer - Location of playgroundCode stored (as in previous commit)
Made a compromise by including an IPlaygroundState as part of IApplicationProps
This is a copy over of the current state of `./frontend/src/toolchain` at source-academy/source-academy2 67d9184. It includes only source chapter 1, a new specification (see [PR 6 at the source-academy/source-academy2](source-academy/source-academy2#6) repository).
The react types were added as a result of the `yarn add` command.
Note that handleEditorChange has been modified to handleEditorValueChange, to be clearer when comapring to handleEditorWidthChange.
Blocked as it would be wise to include the "Interrupt" button (#27) when merging (as there are conflicts already anyways). This would allow this PR to (hopefully) be the last "frontend" PR for this sprint. |
Closed
Note that this make the IDE/index component stateful, handling the editor width.
Will fix the merge conflicts with master after #27 is merged into master. |
This means that the change in width (in pixels) would need to be converted to a percentage change (in the component) and the string must be converted, added to the percentage change, then parsed again. A possble optimization is keeping the number as a float (which would involve one parse when passing it as a prop). However, I find it semantically cleaner to keep the `editorWidth` as a string that expresses a percentage, as compared to an `editorWidthPercentage` that holds a number.
Main conflict : usage of `pre` instead of `code`
This is set to be the same as the default minWidth, 10px.
evansb
approved these changes
May 26, 2018
Added the 'stop' button, and related states/reducers
Missed it out in the previous merge commit, as I deleted the IDE/Control component #oops
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These commits are children of branch
interrupt-button
. The PR for that branch (#27) probably needs to be reviewed before this.Features
Issues fixed