Skip to content

Conversation

@blackening
Copy link
Contributor

@blackening blackening commented Aug 10, 2019

  • removing dangerous document.querySelector...
  • encapsulating canvas in ShapeDrawn
  • Passing canvas down to CanvasOutput
  • Made global canvas a constant. (copy out of it)
  • Rewriting all draw calls (curve, show, anaglyph, hollusion) to return a canvas.

- removing dangerous getElementBy...
- encapsulating canvas in ShapeDrawn
- Passing canvas down to CanvasOutput
- Made global canvas a constant. (copy out of it)
- Rewriting all draw calls (curve, show, anaglyph, hollusion) to return a canvas.
@blackening
Copy link
Contributor Author

blackening commented Aug 10, 2019

Ps. I've manually tested all the paths for rune rendering, but the automated tests fail on me.

Specifically:

m> npm test
m    ● Console
console.error node_modules\@redux-saga\core\dist\chunk-774a4f38.js:104
TypeError: backend_2.default is not a function
at mainSaga (C:\Projects\cadet-frontend-new\src\sagas\index.ts:10:55)
at mainSaga.next (<anonymous>)
at next (C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:1155:27)
at proc (C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:1106:3)
at C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:1365:16
at immediately (C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:60:12)
at runSaga (C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:1364:10)
at Function.sagaMiddleware.run (C:\Projects\cadet-frontend-new\node_modules\@redux-saga\core\dist\redux-saga-core.dev.cjs.js:1425:25)
at createStore (C:\Projects\cadet-frontend-new\src\createStore.ts:31:20)
at Object.<anonymous> (C:\Projects\cadet-frontend-new\src\createStore.ts:38:17)
at Runtime._execModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:448:13)
at Runtime.requireModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:265:14)
at Runtime.requireModuleOrMock (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:337:19)
at Object.<anonymous> (C:\Projects\cadet-frontend-new\src\utils\history.ts:8:23)
at Runtime._execModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:448:13)
at Runtime.requireModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:265:14)
at Runtime.requireModuleOrMock (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:337:19)
at Object.<anonymous> (C:\Projects\cadet-frontend-new\src\sagas\backend.ts:8:19)
at Runtime._execModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:448:13)
at Runtime.requireModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:265:14)
at Runtime.requireModuleOrMock (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:337:19)
at Object.<anonymous> (C:\Projects\cadet-frontend-new\src\sagas\__tests__\backend.ts:12:19)
at Runtime._execModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:448:13)
at Runtime.requireModule (C:\Projects\cadet-frontend-new\node_modules\jest-runtime\build\index.js:265:14)
at C:\Projects\cadet-frontend-new\node_modules\jest-jasmine2\build\index.js:114:13
at Generator.next (<anonymous>)
at step (C:\Projects\cadet-frontend-new\node_modules\jest-jasmine2\build\index.js:144:191)
at C:\Projects\cadet-frontend-new\node_modules\jest-jasmine2\build\index.js:144:437
at new Promise (<anonymous>)
at C:\Projects\cadet-frontend-new\node_modules\jest-jasmine2\build\index.js:144:99
at jasmine2 (C:\Projects\cadet-frontend-new\node_modules\jest-jasmine2\build\index.js:122:17)
at C:\Projects\cadet-frontend-new\node_modules\jest-runner\build\run_test.js:73:28
at Generator.next (<anonymous>)
at step (C:\Projects\cadet-frontend-new\node_modules\jest-runner\build\run_test.js:147:191)
at C:\Projects\cadet-frontend-new\node_modules\jest-runner\build\run_test.js:147:361
at process._tickCallback (internal/process/next_tick.js:68:7)
console.error node_modules\@redux-saga\core\dist\chunk-774a4f38.js:105
The above error occurred in task mainSaga

Test Suites: 38 passed, 38 total
Tests:       276 passed, 276 total
Snapshots:   43 passed, 43 total
Time:        26.954s
Ran all test suites.

This is not something i have touched.

@coveralls
Copy link

coveralls commented Aug 10, 2019

Pull Request Test Coverage Report for Build 2879

  • 0 of 5 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 36.824%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/workspace/Repl.tsx 0 1 0.0%
src/components/workspace/side-content/AutograderCard.tsx 0 1 0.0%
src/components/workspace/CanvasOutput.tsx 0 3 0.0%
Totals Coverage Status
Change from base Build 2874: 0.05%
Covered Lines: 2585
Relevant Lines: 6286

💛 - Coveralls

@martin-henz martin-henz self-requested a review August 11, 2019 09:43
Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

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

Nice. A bigger frame rate leads to a much improved viewer experience. Should we increase the default value? Playing around a bit, 15 might be a sweet-spot. I can't see the difference between 15 and 20, but 10 seems to be a tad jittery.

@blackening
Copy link
Contributor Author

blackening commented Aug 12, 2019

Nice. A bigger frame rate leads to a much improved viewer experience. Should we increase the default value? Playing around a bit, 15 might be a sweet-spot. I can't see the difference between 15 and 20, but 10 seems to be a tad jittery.

Does this refer to the frame count (total 15 frames per 500ms) or, the frame rate (15 frames per second)?

Increasing the frame count too much will cause the hollusion to take forever to load for the more complex designs.

Anyway i updated the frame count from 3 --> 5. This is jittery, but its decent.

@martin-henz martin-henz merged commit 2e17ff7 into master Aug 12, 2019
@jiayushe jiayushe deleted the fix-hollusion branch August 12, 2019 08:05
jetkan-yk added a commit that referenced this pull request Aug 13, 2019
* Change default tab of ungraded assessments back to 'Task X' (#826)

* Fix incorrect type declarations in IQuestion interface (#827)

* Include null type in type declaration for grader, gradedAt in IQuestion

* Update mocks such that Grading only renders for closed assessments

* Add test to assert Grading tab is rendered when grader is non-null

* Bump js-slang to 0.2.6 (#831)

* Resizing editor to a larger size no longer makes it disappear (#832)

* Update README.md (#810)

* Version cadet (#798)

* clean up libraries: removing streams and adding comment for lists stating the purpose to remain here

* fixes wrong version in js console message

* Default texts for data visualiser, inspector, env visualiser (#820)

* Added default texts to be shown before Data/Insp/Env are used

* Remove mentions of 'debugger;'

* Modified default texts for Playground

* Added links to textbook

* Links now open in new tab

* Conditional tab rendering in Playground (#808)

* Conditional tab rendering for Playground

* Data visualiser tab now only enabled for Source Chapter 2 and above

* Inspector/Env Visualiser tabs now only enabled for Source Chapter 3 and above

* Fix For Crashing in Source §1 & §2

* Integrate file upload system (#830)

* Add basic dropzone for material uploading

* Revamp dropzone styling

* Finish file saving logics

* Finish file retriving logics

* Allow downloading of files

* Allow deleting of materials

* Rename academy materials to materialsUpload

* Extract out materialTable

* Add public tab for materials

* Allow creating of materials folder

* Update snapshot

* Fix conflicts

* Rename name to title

* Close dialog after creating folder

* Allow deleting of folder

* Show index by folder id

* Get directory tree info from backend

* Improve UI for materialTable

* Add material to specific folder

* Add material folder to specific folder

* Stay in current folder after add/delete actions

* Improve table UI

* Restructure files and folders

* Remove duplicate file

* Clean up repo

* clean up libraries: removing streams and adding comment for lists sta… (#781)

* clean up libraries: removing streams and adding comment for lists stating the purpose to remain here

* addresses #781 (comment)

* Improve display for sourcecast table (#834)

* Update sourcecast table styling

* Fix auto resizing

* Display upload date in table

* Clean up repo

* Use material theme for material table (#835)

* Fix hollusion not rendering by: (#825)

* Fix hollusion not rendering by:
- removing dangerous getElementBy...
- encapsulating canvas in ShapeDrawn
- Passing canvas down to CanvasOutput
- Made global canvas a constant. (copy out of it)
- Rewriting all draw calls (curve, show, anaglyph, hollusion) to return a canvas.

* Linting fixes.

* Increased number of hollusion frames as requested.

* Data Viz: Resize viewport to fit drawing (#785)

* Resize viewport to fit drawing

* Fixed bug for circular lists
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.

4 participants