Skip to content

Fix #2129 Upgrade MapStore to include the fix for Download#2130

Merged
giohappy merged 2 commits intoGeoNode:masterfrom
allyoucanmap:issue_2129
Jul 15, 2025
Merged

Fix #2129 Upgrade MapStore to include the fix for Download#2130
giohappy merged 2 commits intoGeoNode:masterfrom
allyoucanmap:issue_2129

Conversation

@allyoucanmap
Copy link
Copy Markdown

Update MapStore2 submodule to latest commit of 2025.01.xx branch

@allyoucanmap allyoucanmap added this to the 5.0.0 milestone Jul 15, 2025
@allyoucanmap allyoucanmap self-assigned this Jul 15, 2025
@allyoucanmap allyoucanmap linked an issue Jul 15, 2025 that may be closed by this pull request
@allyoucanmap allyoucanmap requested a review from giohappy July 15, 2025 10:42
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @allyoucanmap, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on upgrading the MapStore2 submodule to a newer version to resolve a reported download issue. As part of this upgrade, a custom Icon component has been introduced locally to standardize icon handling, and existing components have been refactored to utilize this new component, along with updates to various icon definitions across the application.

Highlights

  • MapStore2 Submodule Upgrade: The MapStore2 submodule has been updated to the latest commit of the 2025.01.xx branch, specifically to address and include a fix for a download-related issue (Fix #2129).
  • Custom Icon Component Introduction: A new, local Icon component has been introduced in geonode_mapstore_client/client/js/components/Icon. This component centralizes icon rendering, supporting both Font Awesome and Glyphicon, and includes logic to asynchronously load Font Awesome.
  • Icon Component Migration and Standardization: Numerous existing components across the application have been refactored to import and utilize the newly introduced local Icon component. Concurrently, icon definitions in ResourceUtils.js and localConfig.json have been updated to align with the new component's default behavior, removing explicit type: 'glyphicon' properties where applicable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the MapStore2 submodule and refactors the Icon component. I've provided suggestions to improve error handling, prop type definitions, and remove unnecessary glyphicon types.

Comment on lines +23 to +28
loadFontAwesome()
.then(() => {
isMounted(() => {
setLoading(false);
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The promise returned by loadFontAwesome() doesn't handle potential rejections. If the promise fails (e.g., due to a network error), the error will be unhandled, and the loading state will remain true. Consider adding a .catch() block to handle potential errors during the asynchronous operation.

        loadFontAwesome()
            .then(() => {
                isMounted(() => {
                    setLoading(false);
                });
            })
            .catch(() => {
                isMounted(() => {
                    setLoading(false);
                });
            });

if (loading) {
return null;
}
return <i className={`fa fa-${name}${className ? ` ${className}` : ''}`} style={style}/>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Consider adding propTypes to the internal FaIcon component for better type safety and maintainability.

FaIcon.propTypes = {
    name: PropTypes.string,
    className: PropTypes.string,
    style: PropTypes.object
};

@giohappy giohappy self-requested a review July 15, 2025 11:01
@giohappy giohappy merged commit 048a043 into GeoNode:master Jul 15, 2025
1 check passed
dsuren1 added a commit to dsuren1/geonode-mapstore-client that referenced this pull request Jul 18, 2025
* commit '4f51a4366a5c092e9eabdf84c84a02bfb6c6b66c':
  [create-pull-request] automated change (GeoNode#2141)
  Translate resource type in the detail panel (GeoNode#2108)
  [create-pull-request] automated change (GeoNode#2140)
  GeoNode#2109: Add Edit Permissions to resource menu (GeoNode#2111)
  GeoNode#2110: Fix - Pending prompt inside viewer (GeoNode#2114)
  GeoNode#2113: Fix - Incorrect url formation on copy resource url in resource grid page (GeoNode#2115)
  [create-pull-request] automated change (GeoNode#2139)
  GeoNode#2119 - Update client to show exported data from layer download (GeoNode#2120)
  GeoNode#2122: Fix - MS search bar is shifted when plugin panel is visible (GeoNode#2124)
  GeoNode#2135: Fix - View menu is hidden when a mapviewer is connected to a map (GeoNode#2137)
  GeoNode#2136: Update loader and upload processing buttons (GeoNode#2138)
  [create-pull-request] automated change (GeoNode#2134)
  Fix GeoNode#2132 Tab switch is broken (GeoNode#2133)
  [create-pull-request] automated change (GeoNode#2131)
  Fix GeoNode#2129 Upgrade MapStore to include the fix for Download (GeoNode#2130)
  [create-pull-request] automated change (GeoNode#2127)
  Enhance useDetectClickOut with extra nodes to cross reference (GeoNode#2123)
  [create-pull-request] automated change (GeoNode#2118)
  Include the new LayerDownload in GeoNode client (GeoNode#2112)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade MapStore to include the fix for Download

2 participants