Giter VIP home page Giter VIP logo

source-academy / frontend Goto Github PK

View Code? Open in Web Editor NEW
101.0 101.0 164.0 33.11 MB

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)

Home Page: https://sourceacademy.org

License: Apache License 2.0

HTML 0.07% TypeScript 94.71% Shell 0.12% JavaScript 1.73% SCSS 3.36%
hacktoberfest ide javascript playground source source-academy typescript

frontend's People

Contributors

alcen avatar angelsl avatar anthony-halim avatar aulud avatar blackening avatar bobbyzhouzijian avatar chownces avatar crownkira avatar dependabot-preview[bot] avatar dependabot[bot] avatar geshuming avatar gok99 avatar ianyong avatar jetkan-yk avatar jiachen247 avatar jiayushe avatar jonas-chow avatar leeyi45 avatar lumos309 avatar martin-henz avatar ning-y avatar openorclose avatar remo5000 avatar renovate[bot] avatar richdom2185 avatar rrtheonlyone avatar samuelfangjw avatar seanlowjk avatar shenyih0ng avatar zhaojj2209 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontend's Issues

Login using credentials from IVLE

It would be good to have our services authenticated by IVLE.

One way to go about doing this is to have the frontend call a URL from IVLE to get a session token. This token can then be stored in the state and used to verify whether a user is logged in.

Add Math library functions

Some functions cannot be supported by the system. They are math_log, math_exp, math_random, math_floor, math_sin and math_cos, which are under subtitle Names in the Source §1 specifications.

Make REPL one container only

The only stateless part is the cards, and we end up having 3 REPL containers. In addition, I would like to use a stateful component's methods to fix #41.

Typing in Source §1

Currently, violations of Source §1 typing are not leading to error messages. Examples:

> "a" < 1;
false
> true && 1; // this one is particularly tricky
1 
> - false;
0
> - true;
-1
> !0;
true
> -"asdf";
NaN
> 1 * "asdf";
NaN

Design of menu

I was studying the organization of sourceadacemy's menus and realised that despite the 3-tier navigation, my friends and I did not use most of the pages (e.g inbox). This is what it looks like now:
image

I believe that using just one navigation bar, we can extract the important parts of each section, like so (I have yet to add things like paths and contests). Semantic differentiation can easily be done using delimiters (like the one beside the Device button).
image

Should `interface-over-type-literal` be disabled?

This is the documentation for this rule (and why it is recommended: https://palantir.github.io/tslint/rules/interface-over-type-literal/

To give more context, here is another rule that we also follow: https://palantir.github.io/tslint/rules/interface-name/

I believe that we should keep interface-name as it is useful to distinguish between classes/types and interfaces and we should disable interface-over-type-literal.

This is because semantically, we often want to define a type that is not meant to be extended. An example is CodeOutput in commit 50f04bf, where I have disabled this rule. If I were to not disable it, we would have to end up making it an Interface instead. This would then be required to be named with a prefixed 'I', ICodeOutput. This is confusing, and if extension is really required, we can always make it an Interface willingly.

Use `typesafe-actions`

I saw this neat library on the react-redux-typescript-guide.
Current definition: of an ActionCreator :
export const updateEditorValue: ActionCreator<IUpdateEditorValue> = (newEditorValue: string) => ({ type: UPDATE_EDITOR_VALUE, payload: newEditorValue })
It could possibly be:
export const updateEditorValue: ActionCreator<IUpdateEditorValue> = createStandardAction(UPDATE_EDITOR_VALUE)<string>().

I am still unsure if the usage of https://github.com/piotrwitek/typesafe-actions#3-most-flexible-with-all-helpers is required, but createStandardAction seems to work fine for basic actions. However, more complicated actions (e.g returning a more complex type as a payload) is much more easily done without this library.

Source §2

...to be implemented.

Changes compared to Source §1:

  • the empty list: []
  • list library

(that's all)

source_2.pdf

Use react-script-ts

We should abandon the current custom Webpack configuration and simply use react-script-ts.

NaN, Infinity

these two variables should be defined and assigned to the right values

Use a later version of saga

Refactoring of sagas/index.ts would be required, as some definitions shift (takeEvery from redux-saga/effects to redux-saga) and some type definitions change upon shifting to a later version.

Use @blueprintjs/icon

"Blueprint 2.0 introduced SVG icon support and moved icon resources to a separate @blueprintjs/icons package. The Icon component now renders SVG paths and the icon classes are no longer used by any Blueprint React component. Icon font support has been preserved but should be considered a legacy feature that will be removed in a future major version." -- source

We should also take this change to review if any of the icons need to be changed. In particular, the chapter select arrow (?) currently does not render.

2018-05-28-135533_1920x1080_scrot

Organize utility functions

Functions such as genericButton are used multiple times, and I think the notifications file should not be kept in the root directory. We could make a src/utils folder to house these.

Layout slider for IDE

Seems much cleaner and versatile than a button, but we'll have to see how challenging the implementation is

Fix minor inconveniences with yarn start

  • yarn start should not open a new browser every time
  • yarn start should not complain about files in ./coverage (generated by jest's coverage command)
/home/ning/github/cadet-frontend/coverage/lcov-report/prettify.js
(1,3681): Forbidden bitwise operation

Rename IDE to Workspace

This prevents semantic issues such as having a props interface IIDEProps in #21/layout-slider. In the future we should avoid naming classes/components with acronyms.

We'll address this once IDE is not as actively developed, as there are many PRs that rely on the IDE component.

Obfuscate token

W.R.T 83f46be.

We're not sure how the token should be handled in our application. How crucial is the token, in terms of security? Is there some obfuscation that needs to be done?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.