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

Refactor app/gui/queryresults/queryresultsservice.js #317

Merged
merged 60 commits into from
Aug 25, 2023

Conversation

Raruto
Copy link
Collaborator

@Raruto Raruto commented Feb 2, 2023

Depends on: #452

List of changes:

  • add tons @FIXME comments (eg. please "add function description" here)
  • code cleanup (eg. tons of weird ternary conditions, short-circuiting logic and missing brackets!)
  • full function rewrite QueryResultsService::updateLayerResultFeatures(layer)
  • notable function rewrite QueryResultsService::downloadFeatures(type, layer, features=[], action, index)
  • notable function rewrite QueryResultsService::_addRemoveSelectionFeature(layer, feature, index, force)
  • notable function rewrite QueryResultsService::setActionsForLayers(layers, options = { add: false })
  • removed function QueryResultsService::_digestFeaturesForLayers(featuresForLayers) (replaced by QueryResultsService::setQueryResponse)
  • deprecate function QueryResultsService.prototype.downloadApplicationWrapper(downloadFnc, options) in favor of GUI::downloadWrapper(downloadFnc, options)

Closes: #58
Closes: #59

Preparatory for: #84
Related to: #193


NB this pull depends on #308 for the addition of the "util-deprecate" dependency (so it is recommended to merge the other one first to keep things tidy)

- add FIXME comments (eg. please "add function description")
- code cleanup (eg. tons of weird ternary conditions, short-circuiting logic and missing brackets!)
- full function rewrite `QueryResultsService::updateLayerResultFeatures(layer)`
- notable function rewrite `QueryResultsService::_digestFeaturesForLayers (featuresForLayers)`
@Raruto Raruto added the refactoring Anything which could result in a API change label Feb 2, 2023
@Raruto Raruto added this to the v3.9 milestone Feb 2, 2023
@Raruto Raruto marked this pull request as ready for review February 2, 2023 14:52
@Raruto Raruto changed the title Refactor src/app/gui/queryresults/queryresultsservice.js Refactor app/gui/queryresults/queryresultsservice.js Feb 2, 2023
volterra79 and others added 27 commits August 22, 2023 15:23
- remove function
 `_digestFeaturesForLayers()`
- rename function
 `_handleFeatureForLayer()` into `_responseToLayer()`
- extract function `_hasLayerObjGeometry()`
- extract function `_hasLayerObjImageField()`
- refactor function `_parseLayerObjFormStructure()`
- remove nested if-else in: `getVectorLayerFeaturesFromQueryRequest()`
- incorporate function `_addVectorLayersDataToQueryResponse()` into `*/
  setQueryResponse()` setter
- simplify destructuring assignment within `_printSingleAtlas()` function
- remove function `_addComponent()`
…apcontrol is active (undefined). Need to be set null to align default value and evaluation.
…yer is not add to query results state layers array
…onflict to download action to get all attributes of polygon query (query by polygon)
@Raruto Raruto merged commit 3d44a21 into dev Aug 25, 2023
@Raruto Raruto deleted the refactor-query-results-service branch August 25, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Anything which could result in a API change
Projects
None yet
2 participants