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

[DRAFT] Remove AngularJS from Geonode Search. #4246

Closed
wants to merge 56 commits into from

Conversation

trepagnier
Copy link
Contributor

@trepagnier trepagnier commented Feb 20, 2019

This PR is connected to #4129. It is an early draft that will complete the items listed below. The list will grow in number and detail as work on this PR progresses:

  • Integrate Webpack into the Geonode static directory.
  • Configure Webpack to transpile ES6 to ES5 for browser support.
  • Remove all references to AngularJS inside the Geonode search codebase and replace with a mixture of React, jQuery, and vanilla ES6.
  • Introduce a central search controller that consists of minimal declarative code. All imperative code will be abstracted away to helper functions inside of a functions directory.
  • Split search code into smaller, more maintainable modules.
  • Componentize key search features.
  • Fix the extent bug in the Leaflet sidebar map that causes bounds to grow infinitely as one scrolls.
  • Introduce a Search factory function. An instance of Search will be used to store all data related to searching the Geonode catalogue. This instance should be regarded as the single source of truth for all search related data. Any stateful components or modules should receive their state from the Search instance.
  • Implement a pubsub paradigm for the search codebase. Communication between components should be handled via publications and subscriptions in order to ensure loose coupling between components.
  • Provide an Angular shim that syncs data between Angular's $scope and a given Search instance, which will be used until Angular is entirely removed from the project.

Coop56 and others added 30 commits December 18, 2018 16:51
Copy link
Member

@francbartoli francbartoli left a comment

Choose a reason for hiding this comment

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

The new search implementation should provide a good companion with a BDD test within bdd folder. For the implementation see the example of login

@trepagnier
Copy link
Contributor Author

@francbartoli Regarding the use of jQuery: there are a couple of components rely on it, such as TextSearchForm and SelectionTree. Perhaps we can address its removal in a future phase of refactoring?

@afabiani afabiani added the draft The issue / PR is not ready to merge and in draft state label Feb 27, 2019
@francbartoli
Copy link
Member

@francbartoli Regarding the use of jQuery: there are a couple of components rely on it, such as TextSearchForm and SelectionTree. Perhaps we can address its removal in a future phase of refactoring?

Main concern was about still using if for ajax call even though getting rid of jquery would be better. Thanks for addressing bdd tests

@afabiani afabiani modified the milestone: 2.10 Jun 24, 2019
@afabiani
Copy link
Member

@trepagnier closing this since it is stale for a long time and has conflicts.
Please re-send if you want by following the correct path:

  • Create an issue describing what you want to achieve
  • Make sure the PR respects all the requirements

Thanks,
@afabiani

@afabiani afabiani closed this Jul 18, 2019
@trepagnier trepagnier deleted the react-migration branch July 27, 2019 03:33
@Coop56 Coop56 restored the react-migration branch September 10, 2019 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft The issue / PR is not ready to merge and in draft state
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants