-
Notifications
You must be signed in to change notification settings - Fork 405
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
#4675 Remove unused code #10442
#4675 Remove unused code #10442
Conversation
Thank you @allyoucanmap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the following:
-
WFS3 support.
web/client/api/WFS3.js
web/client/api/__tests__/WFS3-test.js
and soweb/client/components/map/openlayers/__tests__/Layer-test.jsx
web/client/components/map/openlayers/plugins/WFS3Layer.js
web/client/components/map/openlayers/plugins/index.js
Why? -
I think that we can remove also these dependencies from
package.json
:-
"ag-grid-community": "20.2.0"
: used only inweb/client/components/style/ColorMapGrid.jsx
-
"ag-grid-react": "20.2.0"
: same as above -
"colorbrewer": "1.0.0"
: used only inweb/client/components/style/EqualIntervalComponents/ExtendColorBrewer.js
-
About dependencies, other things to take in consideration are:
- Uniform turf versions
- I noticed also
react-confirm-button
, not in this PR but not used for a long time - From my undestanding also
wkt-parser
(documented also inmoduleFederation
andcustom-dependencies.md
can be removed.wellknown
can be replaced with our toGeoJSon and toWKT functions in MapStore. Maybe this last can be postponed to a second time.
About files appended:
Can be removed
"MapStore2/web/client/actions/importer.js",
"MapStore2/web/client/reducers/importer.js",
"MapStore2/web/client/plugins/manager/Importer.jsx",
"MapStore2/web/client/components/manager/importer/BreadCrumb.jsx",
"MapStore2/web/client/components/manager/importer/Import.jsx",
"MapStore2/web/client/components/manager/importer/Importer.jsx",
"MapStore2/web/client/components/manager/importer/ImportsGrid.jsx",
"MapStore2/web/client/components/manager/importer/Workspace.jsx",
"MapStore2/web/client/components/manager/importer/Layer.jsx",
"MapStore2/web/client/components/manager/importer/Task.jsx",
"MapStore2/web/client/components/manager/importer/TaskProgress.jsx",
"MapStore2/web/client/components/manager/importer/Transform.jsx",
"MapStore2/web/client/components/manager/importer/TransformsGrid.jsx",
"MapStore2/web/client/components/manager/importer/style/importer.css",
"MapStore2/web/client/components/manager/importer/transforms/GdalAddoTransform.jsx",
"MapStore2/web/client/components/manager/importer/transforms/GdalTranslateTransform.jsx",
"MapStore2/web/client/components/manager/importer/transforms/GdalWarpTransform.jsx",
"MapStore2/web/client/components/manager/importer/transforms/index.js",
Belong to the importer that is not maintained and used anymore.
- actions, reducers and components could be removed.
"MapStore2/web/client/utils/AgentUtils.js",
Can be removed, used only be elements removed.
"MapStore2/web/client/actions/share.js",
"MapStore2/web/client/actions/tasks.js",
"MapStore2/web/client/reducers/tasks.js",
I don't Know probably can be removed.
"MapStore2/web/client/api/MapConfigDAO.js",
Very old file, not used can be removed
"MapStore2/web/client/containers/HolyGrail.jsx",
Alternative layout container for MapViewer/Pages, not used anymore for a long time.
BorderLayout is more than enough, can be removed.
"MapStore2/web/client/observables/ogcDimension.js",
Doesn't seems to be used. Probably it has been removed from a refactor.
Can be removed
"MapStore2/web/client/components/mapcontrols/search/geocoding/NominatimResult.jsx",
"MapStore2/web/client/components/mapcontrols/search/geocoding/NominatimResultList.jsx",
Probably old implementation, can be removed
"MapStore2/web/client/components/maps/MapItem.jsx",
"MapStore2/web/client/components/maps/MapList.jsx",
These are probably old, replaced by generic GridCards, can be removed.
Maybe can be removed
"MapStore2/web/client/api/geoserver/Importer.js",
"MapStore2/web/client/api/geoserver/Workspaces.js",
- Used by importer, maybe APIs could still make sense. Anyway they are not used.
Maybe Keep
"MapStore2/web/client/utils/ogc/WFST/index.js",
"MapStore2/web/client/utils/ogc/WPS/base.js",
"MapStore2/web/client/utils/ogc/WPS/index.js",
"MapStore2/web/client/utils/ogc/WPS/RequestBuilder.js",
"MapStore2/web/client/utils/ogc/WFST/v1_1_0/delete.js",
"MapStore2/web/client/utils/ogc/WFST/v1_1_0/index.js",
"MapStore2/web/client/utils/ogc/WFST/v1_1_0/insert.js",
"MapStore2/web/client/utils/ogc/WFST/v1_1_0/transaction.js",
"MapStore2/web/client/utils/ogc/WFST/v1_1_0/update.js",
All these utils are maybe should be keep. Not sure why they are orphan.
"MapStore2/web/client/plugins/print/Graticule.jsx",
"MapStore2/web/client/plugins/print/Scale.jsx",
We have to make sure they are not plugins of print.
Not processed
I didn't have time to process all these files.
We need to spend more time on them.
"MapStore2/web/client/reducers/selection.js",
"MapStore2/web/client/selectors/cswtocatalog.js",
"MapStore2/web/client/api/usersession/serverbackup.js",
"MapStore2/web/client/components/app/StandardAppComponent.jsx",
"MapStore2/web/client/components/file/FileUploader.jsx",
"MapStore2/web/client/components/help/HelpToggleBtn.jsx",
"MapStore2/web/client/components/I18N/LangSelector.jsx",
"MapStore2/web/client/components/misc/DockablePanel.jsx",
"MapStore2/web/client/components/misc/LinkToPage.jsx",
"MapStore2/web/client/components/misc/ResizableGrid.jsx",
"MapStore2/web/client/components/print/PrintSubmit.jsx",
"MapStore2/web/client/components/security/PermissionEditor.jsx",
"MapStore2/web/client/components/toolbar/MapToolbar.jsx",
"MapStore2/web/client/plugins/dashboard/Editor.jsx",
"MapStore2/web/client/plugins/dashboard/SaveDialog.jsx",
"MapStore2/web/client/plugins/searchservicesconfig/ToggleButton.jsx",
"MapStore2/web/client/product/pages/Importer.jsx",
"MapStore2/web/client/components/data/identify/DefaultHeader.jsx",
"MapStore2/web/client/components/data/query/AutocompleteField.jsx",
"MapStore2/web/client/components/data/query/SimpleFilterField.jsx",
"MapStore2/web/client/components/manager/users/GroupManager.jsx",
"MapStore2/web/client/components/maps/enhancers/mapCatalog.js",
"MapStore2/web/client/components/maps/forms/Metadata.jsx",
"MapStore2/web/client/components/mediaEditor/enhancers/withFilter.js",
"MapStore2/web/client/components/misc/datetimepicker/Time.js",
"MapStore2/web/client/components/misc/enhancers/debounce.js",
"MapStore2/web/client/components/misc/enhancers/withPropsStream.js",
"MapStore2/web/client/components/misc/sidebar/index.js",
"MapStore2/web/client/components/misc/sidebar/Sidebar.jsx",
"MapStore2/web/client/components/misc/sidebar/SidebarHeader.jsx",
"MapStore2/web/client/components/TOC/fragments/RefreshLayers.jsx",
"MapStore2/web/client/components/widgets/builder/WidgetBuilder.jsx",
"MapStore2/web/client/components/widgets/enhancers/dataHolder.js",
"MapStore2/web/client/product/assets/css/home.css",
"MapStore2/web/client/product/components/home/Brand.jsx",
"MapStore2/web/client/product/components/home/Description.jsx",
"MapStore2/web/client/product/components/home/Footer.jsx",
"MapStore2/web/client/product/components/home/Fork.jsx",
"MapStore2/web/client/product/components/home/Language.jsx",
"MapStore2/web/client/product/components/home/Logo.jsx",
"MapStore2/web/client/product/components/viewer/Home.jsx",
"MapStore2/web/client/product/plugins/footer/footer.css",
"MapStore2/web/client/product/plugins/homedescription/homedescription.css",
"MapStore2/web/client/components/data/featuregrid/dialog/index.js",
"MapStore2/web/client/components/data/featuregrid/renderers/cell.css",
"MapStore2/web/client/components/data/identify/css/identify.css",
"MapStore2/web/client/components/map/openlayers/plugins/MarkerLayer.js",
"MapStore2/web/client/components/maps/modals/css/modals.css",
"MapStore2/web/client/components/misc/spinners/InlineSpinner/InlineSpinner.jsx",
"MapStore2/web/client/components/TOC/fragments/settings/FeatureInfoFormat.jsx",
"MapStore2/web/client/plugins/StreetView/components/CyclomediaView/index.jsx",
"MapStore2/web/client/plugins/StreetView/components/MapillaryView/__test__/MapillaryView-test.jsx"
WFS3 was an experimental specification that it was replaced later on by the OGC Api features, in addition is a partial implementation without support for 3D.
Removed
Removed @tdipisa I think this other tasks highlighted in the review should be solved in separated issues
Can be removed sectionThe content described in the Maybe can be removed and Not processed sectionI review the missing files to check, below the list of removed files with a small descrition on the reason
Remaining unused filesWe still have the following unused files after removing all the above and running again the
|
I agree with the following with separated issues. As for the following:
I would like to wait for the @offtherailz review. Probably the most part of pending things can be totally removed. §Let's discuss together after the review @offtherailz @allyoucanmap. |
can you resolve conflicts @allyoucanmap ? |
@offtherailz conflicts resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should wait monday to merge 😄
@allyoucanmap did you finally open issue for this?
@offtherailz @allyoucanmap are there specific indications for functional tests from your side? |
No, I didn't.
No, I don't think there are specific test to perform |
* Update Changelog for version 2024.02.00 (geosolutions-it#10602) Co-authored-by: github-actions <github-actions@github.com> * Bump commons-io:commons-io from 2.7 to 2.14.0 (geosolutions-it#10593) * Removed react-confirm-button unused dependency (geosolutions-it#10495) * Update release_steps.md (geosolutions-it#10568) * Remove istambul loader (geosolutions-it#10491) * Attempt to remove instambul loader * removed also package dependency * Apply suggestions from code review clean * Remove jsonpath (geosolutions-it#10494) jsonpath is not needed. It is a dependency of geosolutions-it/patcher actually. Having this dependency here is only confusing for dependency analyisis * Fix geosolutions-it#10595 add missing 'FORMAT' parameter to WMTS GetFeatureInfo requests (geosolutions-it#10596) * add missing 'FORMAT' parameter to WMTS GetFeatureInfo requests this is required by the WMTS spec to be the same format as would be used for a GetTile request, and this allows GFI requests to succeed on https://data.geopf.fr/wmts. * fix mapinfo wmts utils test * Fix geosolutions-it#10505 Allow to specify use of proxy or cors at layer level (geosolutions-it#10526) * fix: remove ui element for force proxy and Allow not secure layers * fix: ajax logic changed, autoDetectCORS is set to true by default * new central CORS util file created and used in ajax * checking CORS before adding in common layer file * null check on getProxyUrl * updated individual layer considring to use proxy if needed * avoid proxy cache to update if response is not okey * enable user to add http url, show warning instead of error, warning text updated * test cases updated * fix: resolve conflicts with url check * fixed the failed test * review cesium layers * include add method in model layer * improve http check for openlayers wms layer * fix tests --------- Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com> * Update openId.md (geosolutions-it#10610) * Bump spring-security version to 5.7.12 (fixes geosolutions-it#10611) (geosolutions-it#10612) somehow something in the build already drags this version, and we end up with two conflicting versions of spring-security in the war which results in at least failure to authenticate with basic auth. * Visibility limits - The resolution option is not retained as Limits type geosolutions-it#10391 (geosolutions-it#10598) * Add lib check release step (geosolutions-it#10614) * geosolutions-it#4675 Remove unused code (geosolutions-it#10442) * geosolutions-it#4675 Remove unused code * remove additional code from review * fix tests folder * remove additional unused files * geosolutions-it#10545: Option to disable identify popup in case of no results (geosolutions-it#10557) * geosolutions-it#10545: Option to disable identify popup in case of no results Description: - handle adding an option called 'hidePopupIfNoResults' to hide the identify popup - add unit tests - add jsdoc * geosolutions-it#10545: Option to disable identify popup in case of no results Description: - revert changes in popupSupport files for ol and leaflet + related tests files - handle hide popup for map viewer with css for openlayers and leaflet approach - add unit tests - edit map-popup.less file to handle hide the popup * geosolutions-it#10545: revert unnecessary changes * Fix geosolutions-it#10615 removed eval from marker utils (geosolutions-it#10616) * geosolutions-it#10545: remove marker in case no results + hover identify mode active and hideEmptyPopupOption with true (geosolutions-it#10619) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com> Co-authored-by: Landry Breuil <landryb@users.noreply.github.com> Co-authored-by: RowHeat <40065760+rowheat02@users.noreply.github.com> Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com> Co-authored-by: mahmoud adel <58145645+mahmoudadel54@users.noreply.github.com> Co-authored-by: Matteo V. <matteo.velludini@geosolutionsgroup.com>
Description
This PR removes plugins and related dependencies unused and deprecated. The current plugins has been removed:
FeatureGrid
replaced byFeatureEditor
MeasurePanel
replaced byMeasure
MeasureResults
replaced byMeasure
RasterStyler
replaced byStyleEditor
ShapeFile
replaced byMapImport
Styler
replaced byStyleEditor
VectorStyler
replaced byStyleEditor
Additional code changes:
Annotations
deprecated code has been removed because replaced by the new refactoringPlease check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#4675
What is the new behavior?
Removed unused code and deprecated components
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information
The
webpack-deadcode-plugin
lib has been used to check which files are not used by mapstore, there are still the following components that should be checked: