Skip to content
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

Folder restructure #890

Merged
merged 3 commits into from
Nov 12, 2020
Merged

Folder restructure #890

merged 3 commits into from
Nov 12, 2020

Conversation

Oxiang
Copy link
Contributor

@Oxiang Oxiang commented Nov 11, 2020

Problem

To improve the current folder structure, we can switch to a domain driven module structure for frontend folders

Closes #871

Solution

Separate the folders into 6 main domains: app, directory, home, login, search, user

  • actions, reducers and respective components are placed under their domain
  • each domain have their own components folder
  • shareable components/utils/assets are placed under app
  • change ga from action to util
  • change affected import paths to match the new structure
  • rename GoDirectoryInput component to DirectoryInput
  • modify webpack srcDirectory and favicon path to match the new structure

No Code Changes besides changing import paths and re-naming of some files
Compiles nicely

AFTER:
new client folder structure
src folder

new user folder
user

new search folder
search

new login folder
login

new home folder
home

new directory folder
directory

new app folder
app folder

- add 6 new domain to client: user, search, login, home, directory and app
- push actions, reducer and page components to respective domain folder
- push the rest of folders into app
- transfer ga from action to util
- modify import paths according to the new layout
- modify webpack favicon with updated assets path
- modify client test with new updated path
- add page folder into components
- move client index into app
- modify webpack config src directory to new app path
- rename godirectoryinput as directoryinput
- move gosearchinput into components as it is shared
- add go logo graphic folder into assets
@liangyuanruo
Copy link
Contributor

Looking at the screenshots, could we also introduce a component folder in each module?

- add components folder into directory, user, search, login and home
@liangyuanruo liangyuanruo removed their request for review November 12, 2020 05:56
@liangyuanruo
Copy link
Contributor

ok to merge if @yong-jie is agreeable

Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

Changes lgtm. 👍 good job!

@Oxiang Oxiang merged commit 0981746 into develop Nov 12, 2020
@Oxiang Oxiang deleted the folder-restructure branch November 12, 2020 06:28
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.

Improve folder structure of frontend files
3 participants