Skip to content

Mission editing master #519

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

Merged
merged 133 commits into from
Apr 15, 2019
Merged

Mission editing master #519

merged 133 commits into from
Apr 15, 2019

Conversation

martin-henz
Copy link
Member

No description provided.

openorclose and others added 30 commits January 8, 2019 15:01
missionOverviews can now be added
copy of assessment, may be merged later
Missions are now loaded in local storage
Mission editing slang
added editing overview by zihawkeye
new file edititngOverviewCard
@martin-henz
Copy link
Member Author

Can you guys put some example mission files in the repo "assessments" in folder "samples". Maybe you want to make clear by the choice of their filenames that they are meant as test files for the mission editor.

@gerhean
Copy link
Contributor

gerhean commented Apr 14, 2019

This tool is an editor: It allows the user to open an existing mission (that is stored in a file), create a new mission, and save the current mission (to a file). The notion of "import" and "export" is not appropriate here. We should take a look at established editors such as Word, and adopt their terminology.

The options in "Mission Control" should be:
New Mission (creates a new mission without saving it anywhere)
Open... (prompts the user to navigate to a file in a finder, and open it)
Save (saves the current mission to the most recently "Open..." or "Save as..." location, or prompts the user to give a location, if the current mission is a "New Mission")
Save as... (prompts the user to give a location)

This scheme will allow us to eliminate the highly unusual choice of setting a Filename under "Other options". A filename is not an "option" but a central concept for such an editor.

Screenshot 2019-04-13 at 12 50 01 PM

It is not possible to force users to save at any particular location due to Javascript security concerns. Only the client, in their browser, set that they want to be prompted where to save their files.

Established editors such as Word are native apps, hence they are able to perform these functions, as opposed to our mission editor being a web app and hence having more restrictions.

The purpose of including a "filename" field is to make sure, as far as possible, that the file that is opened in the editor, is the file that is saved. This is as the mission name is rarely the filename, and I felt it would be convenient if the author did not need to change the filename back to the original filename whenever the file is shared.

@martin-henz
Copy link
Member Author

The options in "Mission Control" should be:
New Mission (creates a new mission without saving it anywhere)
Open... (prompts the user to navigate to a file in a finder, and open it)
Save (saves the current mission to the most recently "Open..." or "Save as..." location, or prompts the user to give a location, if the current mission is a "New Mission")
Save as... (prompts the user to give a location)

I see. How about this, then:

The options in "Mission Control" should be:
New Mission (creates a new mission without saving it anywhere)
Open... (prompts the user to navigate to a file in a finder, and open it)
Save (saves the current mission using the most recently "Open..." or "Save as..." file name, or prompts the user to give a file name in an input field, if the current mission is a "New Mission")
Save as... (prompts the user to give a file name in an input field)
Play (opens the current mission, as a real mission, without editing)

@gerhean
Copy link
Contributor

gerhean commented Apr 15, 2019

There is a spurious closed bracket in the template editor.

Fixed

src/components/workspace/ControlBar.tsx

  private replControl() {
    // toggleEditMode can be null or undefined here, thus !=
    const toggleEditModeButton =
      this.props.toggleEditMode !== null ? (

In Playground, the toggleEditMode appears to be undefined, not null. Thus, != might be more appropriate. Otherwise this happens:

Fixed

The question template does not seem to be saved properly.

How to reproduce the bug:
(1) create a new mission
(2) edit the template of Question 1
(3) save
(4) re-load the mission
Now the template is back to the original "//This is a mock solution template".

I can't seem to reproduce this bug. Maybe it happens if you click on the save button too fast.

In addition to the usual features "New Mission", "Save", "Save As..." and "Open..." we should have a "Play" option in the "Mission Control" interface. This feature would load the mission without any of the editing features. It would allow us to test the client-side features of the mission before uploading it to any server.

I think all client-side features are already testable even with the editing features.

@gerhean gerhean closed this Apr 15, 2019
@gerhean gerhean reopened this Apr 15, 2019
@martin-henz
Copy link
Member Author

martin-henz commented Apr 15, 2019

We are almost there with this.

As discussed, let's remove the buttons "Save" and "Reset".

Changes in the template (and everywhere else) should have immediate effect.

Shuming's "Reset" button should therefore work as expected: It should copy the template from the right hand side to the left hand side.

Therefore, you can remove the button "Copy to Editor".

gerhean added 2 commits April 15, 2019 19:20
Compatibility with collab editing fixed.
Local storage methods are now mostly abstracted to xml parse helper.
@martin-henz martin-henz requested review from jiachen247, openorclose, gerhean and ZiHawkEye and removed request for jiachen247 and openorclose April 15, 2019 15:09
Copy link
Contributor

@gerhean gerhean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests still missing.

@gerhean gerhean self-requested a review April 15, 2019 15:17
Copy link
Contributor

@gerhean gerhean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test still missing.
Undo button to be added later.

@gerhean gerhean merged commit 0d0eb40 into master Apr 15, 2019
urieltan added a commit that referenced this pull request Apr 19, 2019
* Updated dependencies. Added CORS/windows scripts. (#488)

* Updated dependencies from primordial edition to dinosaur edition.
-Also added convenience scripts for CORS preflight and windows.

* Removed yarn.lock, README.md: Removed references to yarn.

* clean up all references to yarn

* add tslint to scripts

* remove npm cache from travis

* update all deps

* CRITICAL FIX (rollback bumping deps) (#522)

* critical fix (rollback bumping deps)

* Update travis to build cadet-frontend

* Add template reset feature (#526)

* Added Template Reset Feature

* Revert "Added Template Reset Feature"

This reverts commit 3c1457e.

* Revert "Revert "Added Template Reset Feature""

This reverts commit d59f4c9.

* Resolved merge conflicts

* Fix package.json (#528)

* Updated package.json

* Reverted edit to start-js script

* Changed from & to &&

* Collaborative Editing Feature (#530)

* Add collaborative-editing feature using sharedb-ace

* Allow multiple sessions by implementing session id

* Add auto-completion, and change info annotation to error

* Add notifications for autorun and websocket connection

* Allow detection on invalid session id

* Update snapshot and pass test

* Add working connection checks and remove autocompletion

* Add leave button and color indicator, remove status button

* Change server url from ip address to domain name

* Get client to ping server instead of the other way round

* Sync editorValue after inviting

* Remove console-log, reset ts-config

* Reset css back to original

* Stored api URL in constant, changed invite icon

* Fixed bug with invite not working

* Mission editing master (#519)

* update js-slang imports, and use null for empty list

* pass tests

* pass tests

* format all external libraries with prettier

* Update README.md

* missionOverviews

missionOverviews can now be added

* minorOverviewChanges

* minorOverviewChanges1

* AddedAssignmentSupport

* minorOverviewChanges2

* placed xmlpharser in alt file

* update js-slang to version 0.2.0

* update acorn, fix order of imports

* update readme

* created editing folder

copy of assessment, may be merged later

* added interface

* library parsing

* Local storage

Missions are now loaded in local storage

* packages fixed

* export library

* Added Template Reset Feature

* Added UI to edit assessmentsOverview

* Moved edititngOverviewCard logic

new file edititngOverviewCard

* export added

* minor debugging

* fixed xmlParser

* added autofocus

* sync stuff

* Added EditAssessment component

* Bug fixes

* More bug fixes

* move importfilecomponents

* localretrive functions added

* Added EditingAssessmentForm to edit missions

* Bug fixes and added MakeMission button

* Use alpha version of js-slang, with verbose messages and native enabled

* Update js-slang to alpha-3

* Bug fixes

* Added toggle editing mode

* Edited style

* Bug fixes

* overhaulStuff

* click to edit added

mcq not working

* mcq question tabs added

* added incubator

* code refactoring

editing content tab

* cleanup unused code

* minor clean

* code refactoring

assessment templates

* Added manageQuestion tab

* enzyme update

* add example xml

* library selection added

* code clean

moved new stuff to incubator folder
setup new tests

* removed editing from assessment

* Update NavigationBar.tsx.snap

* Prettify

* Update index.tsx

* yarn format

* bug fixes

* yarn format

* Mission editing slang (#479)

* bug fixes

* yarn format

* moved editing side content tabs

* Update EditingWorkspace.tsx

* seperated question template tab

* update question template tab

* tab clean up

* added ManageQuestionTab

* complete split up of editingContentsTab

* yarn format

* Update QuestionTemplateTab.tsx

* signal unsavedChanges

* GlobalDeployment Added

* yarn format

* Update GlobalDeploymentTab.tsx

nicer symbol editing

* nicer buttons

* Mission editing slang (#483)

* Update GlobalDeploymentTab.tsx

nicer symbol editing

* nicer buttons

* made local deployment

and added globals editing

* yarn format

* Merge branch 'pr/486' into mission-editing

* minor bug fix

* Mission editing update (#486)

* Update GlobalDeploymentTab.tsx

nicer symbol editing

* nicer buttons

* made local deployment

and added globals editing

* yarn format

* minor bug fix

* Auto update overview maxGrade/Xp

* xp bug fix

* Update NavigationBar.tsx.snap

* Update EditingWorkspace.tsx

* Reset button added

* fixed bugs

globals fixed
previous button fixed
new template fixed
added manual library refresh
fixed graderdeployment

* yarn format

* Mission editing slang (#489)

* Added Template Reset Feature

* Update GlobalDeploymentTab.tsx

nicer symbol editing

* nicer buttons

* made local deployment

and added globals editing

* yarn format

* minor bug fix

* Auto update overview maxGrade/Xp

* xp bug fix

* Update NavigationBar.tsx.snap

* Update EditingWorkspace.tsx

* Reset button added

* fixed bugs

globals fixed
previous button fixed
new template fixed
added manual library refresh
fixed graderdeployment

* yarn format

* placeholder for overview card

* Mission editing slang (#496)

* Added Template Reset Feature

* Update GlobalDeploymentTab.tsx

nicer symbol editing

* nicer buttons

* made local deployment

and added globals editing

* yarn format

* minor bug fix

* Auto update overview maxGrade/Xp

* xp bug fix

* Update NavigationBar.tsx.snap

* Update EditingWorkspace.tsx

* Reset button added

* fixed bugs

globals fixed
previous button fixed
new template fixed
added manual library refresh
fixed graderdeployment

* yarn format

* placeholder for overview card

* better placeholders

* Merge pull request #12 from source-academy/mission-editing (#498)

* fix import for firefox (#499)

* Mission editing slang (#500)

* fix import for firefox

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* an update (#501)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* Mission editing slang (#502)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* fixed maxGrade and maxXP calculation

* added local/global switch

* adjust mcq options

* split question template tab

added suggested answer editing

* swap answer and solutionTemplate

internal change

* add reading

* add grading deployment

* Mission editing slang (#503)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* fixed maxGrade and maxXP calculation

* added local/global switch

* adjust mcq options

* split question template tab

added suggested answer editing

* swap answer and solutionTemplate

internal change

* add reading

* add grading deployment

* clone question shift question added

* fixed symbol formating

* Mission editing slang (#505)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* fixed maxGrade and maxXP calculation

* added local/global switch

* adjust mcq options

* split question template tab

added suggested answer editing

* swap answer and solutionTemplate

internal change

* add reading

* add grading deployment

* clone question shift question added

* fixed symbol formating

* changed manage questions ui

* yarn format

* added more overview options

* add editing persist

* Update ManageQuestionTab.tsx

* Mission editing slang (#512)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* fixed maxGrade and maxXP calculation

* added local/global switch

* adjust mcq options

* split question template tab

added suggested answer editing

* swap answer and solutionTemplate

internal change

* add reading

* add grading deployment

* clone question shift question added

* fixed symbol formating

* changed manage questions ui

* yarn format

* added more overview options

* add editing persist

* Update ManageQuestionTab.tsx

* small updates

editor value now saved

* temp remove editor functionalites

* yarn format

* Mission editing slang (#517)

* Removed previous button on first question, added divider

* Yarn format

* Changeded help description

* fix import for firefox

* max width for globals

* symbols aligned

* increase abstraction

removed numberRange from textArea
Reduced save frequency of solutionTemplate

* manage questions give warning

* UI change for deployment tab

* fixed maxGrade and maxXP calculation

* added local/global switch

* adjust mcq options

* split question template tab

added suggested answer editing

* swap answer and solutionTemplate

internal change

* add reading

* add grading deployment

* clone question shift question added

* fixed symbol formating

* changed manage questions ui

* yarn format

* added more overview options

* add editing persist

* Update ManageQuestionTab.tsx

* small updates

editor value now saved

* temp remove editor functionalites

* yarn format

* remove edit persist

* Update context.ts

* super refactoring

* screenshot update

* more refactor

* Merge master into mission-editing

* Update README.md

* remove Carriage Return

* Update test.sh

* fix merge compatibility

Compatibility with collab editing fixed.
Local storage methods are now mostly abstracted to xml parse helper.

* Use onChange instead of ref for forms (#535)

* INSPECT (#506)

* update js-slang imports, and use null for empty list

* pass tests

* pass tests

* format all external libraries with prettier

* Update README.md

* update js-slang to version 0.2.0

* update acorn, fix order of imports

* update readme

* unbump enzyme

* just adding compatability with js slang debugger

* overlooked something minor

* pulled in upgrades from wkk

* added primitive inspector features

* enabled the execution of commands in the REPL

* polished inspector output table

now filters builtins, and formats into individual frames

* changed icons according to feedback

* added alert animation for sidecontent icons

* fixed some small issue with alerted icons not turning off

* added multiple features:

1. Breakpoints can now be set from the gutter. 2. When the debugger hits a breakpoint, the last statement to be executed will be highlighted. This will require the modified js-slang from the debugger branch to work.

* minor fix to pass test

* changed highlighting to match new slang

also fixed minor compile blocker that was somehow overlooked

* Basic ENV visualizer integration

* Removed working "console.log"

* added minor cosmetic tweaks

* changed which line was highlighted to suit new model

* filtered some noise from the inspector

also updated to work with newest slang

* updated readme

* moving env visualizer to its own branch

also changed draw_list to draw_data

* Fixed repl error with executing while paused, enabled pausing arbitrarily in any program.

also removed useless files from git mergetool

* prevent inspector dying from undefined context

* fix highlighting issue

* use official js-slang

* fixed spurious output in inspector for things like lists

* fix prettier

* Env visualiser (#541)

* Env visualiser

* fixed formatting
@geshuming geshuming deleted the mission-editing-master branch July 5, 2019 08:14
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

Successfully merging this pull request may close these issues.

7 participants