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

Sync with refactoring in elchininet repo #16

Conversation

yelizariev
Copy link

No description provided.

elchininet and others added 6 commits September 10, 2019 12:49
…ass directly from the entry-points

In this commit (af4d9a8) React and ReactDOM where added as dependencies of the project
But it seems that they are not used because no entry-point import them. The React version that is used is the version 0.12.2 that is coming from 2014 and it is loaded as a separate script directly from the HTML templates.
The purpose of this commit is to import React, ReactDOM, and createReactClass from the entry-points and get rid of the old react version.
In this way, the project can be escalated using the new features of React
jQuery is loaded in the project as an external file, but it is used only for Ajax requests and for merging objects
There are popular libraries that can be used for those purposes (reqwest / merge-anything)
So, replacing jQuery by those libraries not only reduces the bytes needed to be downloaded but also it removes an extra HTTP request to the server
This makes the process of updating a library easier because no Go code is needed to be changed, only the version of the packages in the package.json should be updated
The purpose of this commit is to separate the React components in different modules to increase the readability of the code and improve the development process
It is hard to search and select a repo using the current HTML native multi-select, when there are a lot of projects it creates a long list and it is very hard to identify the right one by sight
This commit replaces the native HTML select with a React multi-select with search functionality (react-select). It is possible to search for a repo and just click on it and it will be added to the list of repos
- All the components have been changed to functional components (createReactClass can be removed safely)
- All the components have been rewritten using ECMAScript 2015 (merge-anything package can be removed because object destructuring has been used)
- The state management has been reduced so, the main data is managed from the Root components and sent to the presentational components through properties
- The logic inside the FilesView component has been reduced creating other components to make the code more readable
Copy link
Collaborator

@itpp-bot itpp-bot left a comment

Choose a reason for hiding this comment

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

├─ package-lock.json
├─ package.json
├─ ui/
|  ├─ assets/
|  |  ├─ css/
|  |  |  └─ hound.css
|  |  ├─ excluded_files.tpl.html
|  |  ├─ index.tpl.html
|  |  └─ js/
|  |     ├─ JSXTransformer-0.12.2.js
|  |     ├─ components/
|  |     |  ├─ ExcludedFiles/
|  |     |  |  ├─ ExcludedRow.js
|  |     |  |  ├─ ExcludedTable.js
|  |     |  |  ├─ FilterableExcludedFiles.js
|  |     |  |  ├─ RepoButton.js
|  |     |  |  └─ RepoList.js
|  |     |  └─ HoundApp/
|  |     |     ├─ App.js
|  |     |     ├─ File.js
|  |     |     ├─ FilesView.js
|  |     |     ├─ Line.js
|  |     |     ├─ Match.js
|  |     |     ├─ ResultView.js
|  |     |     └─ SearchBar.js
|  |     ├─ excluded_files.js
|  |     ├─ helpers/
|  |     |  ├─ Model.js
|  |     |  ├─ Signal.js
|  |     |  └─ common.js
|  |     ├─ hound.js
|  |     ├─ jquery-2.1.3.min.js
|  |     └─ utils/
|  |        └─ index.js
|  ├─ bindata.go
|  ├─ content.go
|  └─ ui.go
└─ webpack.config.js

Installable modules remain unchanged.

Not installable modules remain unchanged.

No new features in doc/changelog.rst files of installable modules

sent by ✌️ Odoo Review Bot

@yelizariev yelizariev mentioned this pull request Nov 29, 2019
2 tasks
@itpp-bot
Copy link
Collaborator

To test updates run:

docker run -p 6080:6080 --rm docker.pkg.github.com/it-projects-llc/hound/pr:pr-16-head-43d604f-base-c618dfb

You may need be authenticated:

docker login docker.pkg.github.com -u GITHUB_USERNAME -p GITHUB_TOKEN 

Posted from Concourse CI (see concourse.yml)

@yelizariev yelizariev merged commit be6dfcb into itpp-labs:master Nov 29, 2019
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.

3 participants