0.4.4 • Published 1 year ago

@hilma/learning-space v0.4.4

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.\ You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.\ See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.\ It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About the Package

learning space package: Our app includes 3 sides, some of the sides have the same components so we created a package with those components.

The components are:

  • Login page (/pages/LoginPage.tsx)
  • 404 page (/not-found/NotFound.tsx)
  • Unauthorized page (/not-found/UserNotFound.tsx)
  • Icons (/icons/Icons.tsx)
  • Organizations (/organisations/Organisations.tsx)
  • Page for classroom code in student or select school in teacher (/pages/CodePage.tsx)
  • loader (/generic-components/Loader.tsx)
  • Page Loader (/generic-components/PageLoder.tsx)
  • embed task page (/embed-task-page/components/TaskPage.tsx)
  • Journey Diary Page (/journey-diary/components/journey-diary-components/JourneyDiary.tsx)
  • Journey Diary PDF (/journey-diary/components/pdf/JourneyPDF.tsx)

The information below are saved in DB for each learning space. Almost every component expects to get some of them as props:

nametype
primaryColorstring
secondaryColorstring
backgroundColorstring
IconsIconType[]
lsNamestring
learningSpaceIdnumber

In some cases the component expects to get a prop named classroom which is an object with the following props that are mentioned above, and:

nametypeside / component
classroomIdnumberstudent side
headerColorstringjd component
journeyDotColorstringjd component
studentPhotostringstudent side
pointsNamestringstudent side
nextPointsStepnumberstudent side

In addition most of the components gets additional props.

Main components:

Task Page:

Task page is a component for all task page types (capish, regular, preview). This component uses Task provider which includes:

nametypedescription
previewbooleanif is a preview state
taskDataTaskDatainformation of the current task (id, task title, embed url and so on...)
closePage() => voidfunction that gets called while the page is closing.
fetchCapishQuestions?(capishAccess: string, textId: string) => Promisesaving all capish questions and answers in DB
finishTask() => Promisefunction that gets called while finish btn is pressed
historyPush() => voidhistory push with state
capishDomainstringfind it in the env file
getAccessToken() => Promisereturns google access token for capish login
                      |

Related components:

(/embed-task-page/components)

  • Embed:
    • determine if it is a preview and if it is a capish task.
    • renders the iframe.
  • CapishIframe:
    • special component for capish task (capish tasks have different css and different functions)
  • PreviewHeader
    • page header in preview state
  • HeaderFooter :
    • page header in regular state

Journey Diary:

Journey diary is a part of the app that includes all the questions (and the answer) that were in capish tasks that the students already did. the student can edit it and the teacher can view it. (in the next epic teacher should also have the ability to edit it).

The journey diary contains two main components :

  • JourneyDiary.tsx - the journey diary JourneyDiary.tsx: the journey diary component.
  • JourneyPDF.tsx - a component that exports a pdf file based on the journey diary component. We will talk about those components separately.

The JD flow:\ JD component renders an array of entries - entry is a question (from capish page) with its answer.

The entry includes:

  • category name (the category of the capish task)
  • question (not editable, can be consists of many parts)
  • answers (editable)

The questions and the answers consists of 4 different content types :

  • text (TextAnswer.tsx)
  • audio (AudioAnswer.tsx)
  • youtube video - we are saving a link for youtube video and embed the link. (YoutubeLinkAnswer.tsx)
  • image (ImageAnswer.tsk)

Questions:\ The entry renders the Content component that renders the relevant components according to the question’s part type.

Answers:\ The entry renders the EntryContent component which renders Draggable, DragIndicator and delete btn (if edit mode is true) and the Content component. If there are more than 2 answers only the first two are rendered and also see more/ see less btn is rendered.

Edit Mode:\ When the entry is in state of edit mode the user can add answers (from all types) , delete answers, and change the order of the answers (using drag and drop). also the user can delete the whole question (entry). (not just in edit mode)

Journey Diary components:

Note: you can find all the customized types in /src/journey-diary/types

Content:\ determine which components to render according to the question / answer type.\ Props: | name | type | | ----------- | --------------------------- | | content | Answer[] | Question[] | | setAnswers? | (answers: Answer[]) => void | | editMode? | boolean | | item | Answer | Question | | index? | number |

Content Components :

(journey-diary-components/content) \ AudioAnswer:\ props: | name | type | |----------|--------| | link | string | | answerId | number |

Also use AudioContext: \ context that determines whether the right audio is played by checking if the audio id matches that id that is saved in the context. if the id does not match and the audio is playing, the audio will be stopped.

0.4.4

1 year ago

0.4.3

1 year ago

0.4.3-beta.1

1 year ago

0.4.3-beta.0

1 year ago

0.4.2

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.9-beta.0

3 years ago

0.3.9-beta.1

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.3.7-beta.0

3 years ago

0.3.7-beta.2

3 years ago

0.3.7-beta.1

3 years ago

0.3.6

3 years ago

0.3.7

3 years ago

0.3.5-beta.1

3 years ago

0.3.5-beta.2

3 years ago

0.3.5-beta.3

3 years ago

0.3.5-beta.4

3 years ago

0.3.5-beta.0

3 years ago

0.3.5-beta.5

3 years ago

0.3.4-beta.20

3 years ago

0.3.4-beta.21

3 years ago

0.3.4-beta.22

3 years ago

0.3.4-beta.23

3 years ago

0.3.4-beta.17

3 years ago

0.3.4-beta.18

3 years ago

0.3.4-beta.15

3 years ago

0.3.4-beta.16

3 years ago

0.3.4-beta.19

3 years ago

0.3.4-beta.14

3 years ago

0.3.5

3 years ago

0.3.4-beta.10

3 years ago

0.3.4-beta.3

3 years ago

0.3.4-beta.2

3 years ago

0.3.4-beta.13

3 years ago

0.3.4-beta.11

3 years ago

0.3.4-beta.12

3 years ago

0.3.4-beta.9

3 years ago

0.3.4-beta.8

3 years ago

0.3.4-beta.5

3 years ago

0.3.4-beta.4

3 years ago

0.3.4-beta.7

3 years ago

0.3.4-beta.6

3 years ago

0.3.4-beta.1

3 years ago

0.3.3-beta.1

3 years ago

0.3.2-beta.1

3 years ago

0.3.4-beta.0

3 years ago

0.3.3-beta.2

3 years ago

0.3.3-beta.0

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2-beta.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.20

3 years ago

0.3.0

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.3

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.0-beta.2

3 years ago

0.2.0-beta.1

3 years ago

0.2.0-beta.0

3 years ago

0.2.1

3 years ago

0.2.2

3 years ago

0.1.20-beta.3

3 years ago

0.1.20-beta.2

3 years ago

0.1.20-beta.1

3 years ago

0.1.20-beta.0

3 years ago

0.2.0

3 years ago

0.1.18-beta.3

3 years ago

0.1.18-beta.1

3 years ago

0.1.17-beta.1

3 years ago

0.1.18-beta.2

3 years ago

0.1.17-beta.0

3 years ago

0.1.18-beta.0

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.1.17

3 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago