openedx / openedx/frontend-app-authoring

[Editors] Redux/Folder organization

Open
#1,239 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
17
Forks
218
Avg merge
9d 20h
Merged PRs (30d)
20

Description

Folder structure proposal.
We Currently have this folder structure:

Editors
|-- Containers
|   |-- EditorContainer
|   |   `-- React Components
|   |-- ProblemEditor
|   |   `-- React Components
|   |-- TextEditor
|   |   `-- React Components
|   `-- VideoEditor
|       `-- React Components
|-- EditorPage
|   `-- React Components
`-- Data
    |-- Redux
    |   |-- App
    |   |   |-- Selectors, 
    |   |   |-- Reducers, 
    |   |   `-- etc
    |   |-- Problem
    |   |   |-- Selectors, 
    |   |   |-- Reducers, 
    |   |   `-- etc
    |   |-- Video
    |   |   |-- Selectors, 
    |   |   |-- Reducers, 
    |   |   `-- etc
    |   |-- Requests
    |   |   |-- Selectors, 
    |   |   |-- Reducers, 
    |   |   `-- etc
    |   `-- ThunkActions
    |       |-- App
    |       |-- Problem
    |       `-- Video
    `-- Services
        |-- Api
        `-- Urls

This has two problems:

  1. Where data is dealt with is a hodgepodge of overlapping code
  2. It does not clearly separate the framework and editor layers of the project.

Therefore, we should have this folder structure:

SRC
|-- Editors
|   |-- ProblemEditor
|   |   |-- Data
|   |   |   |-- Constants
|   |   |   `-- Redux
|   |   |       |-- Selectors
|   |   |       |-- Reducers
|   |   |       |-- Thunkactions
|   |   |       `-- index
|   |   |-- components
|   |   `-- index.jsx
|   |-- TextEditor
|   |   |-- Data
|   |   |   |-- Constants
|   |   |   `-- Redux
|   |   |       |-- Selectors
|   |   |       |-- Reducers
|   |   |       |-- Thunkactions
|   |   |       `-- index
|   |   |-- components
|   |   `-- index.jsx
|   `-- VideoEditor
|       |-- Data
|       |   |-- Constants
|       |   `-- Redux
|       |       |-- Selectors
|       |       |-- Reducers
|       |       `-- Thunkactions
|       |-- components
|       `-- index.jsx
`-- Framework
    |-- EditorContainer
    |-- EditorPage
    `-- Data
        |-- Constants
        |-- Redux
        |   |-- Selectors
        |   |-- Reducers
        |   |-- Thunkactions
        |   `-- index
        `-- Serivces
            |-- api
            `-- urls

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing Editors/Containers, Editors/Data/Redux, and Editors/Data/Services areas against the proposed SRC/Editors and Framework layout. Determine the migration boundaries and required import changes, then verify that the resulting organization preserves the existing editor and framework responsibilities.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.