Skip to content

#12913 Share button is not visible in sidebar in default map - #12914

Merged
allyoucanmap merged 5 commits into
geosolutions-it:masterfrom
Binabh:fix/share-plugin-default-map
Sep 29, 2026
Merged

allyoucanmap merged 5 commits into
geosolutions-it:masterfrom
Binabh:fix/share-plugin-default-map

Conversation

@Binabh

@Binabh Binabh commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Description

Show share plugin in default map at / route

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix

Issue

What is the current behavior?
#12913

What is the new behavior?
Share button is now visible
Screenshot 2026-09-28 at 11 34 46

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

@Binabh Binabh added this to the 2026.02.02 milestone Sep 28, 2026
@Binabh
Binabh requested a review from allyoucanmap September 28, 2026 05:53
@Binabh Binabh added the bug label Sep 28, 2026
@cla-bot cla-bot Bot added the CLA Ready label Sep 28, 2026
@Binabh Binabh linked an issue Sep 28, 2026 that may be closed by this pull request
1 task done
Comment thread web/client/plugins/Share.jsx Outdated
geostoryResourceSelector,
currentContextSelector
], (mapId, dashboard, geostory, context) => {
const isDefaultMap = location.pathname === "/";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we cannot rely on the location pathname to decide if a plugin is visible or not, in addition location refer to the window location and in MapStore we are using the hash router so this will not work with subpath.

Here I created a proposal PR Binabh#1 to merge into this branch, where instead we detect if a map is new, and when is new the share plugin will be hidden. Please double check and verify the code proposed

@Binabh

Binabh commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

@allyoucanmap Thank you for your feedback. Yes having a dedicated isNew value will surely be more reliable.

While testing I found one thing that share plugin shows up in /viewer/new route when map is imported. I think user should never be able to share map unless saved.

  • Create a new map
  • Import json
  • Share button appears
Screen.Recording.2026-09-29.at.15.48.55.mov

@Binabh
Binabh requested a review from allyoucanmap September 29, 2026 11:26
@allyoucanmap
allyoucanmap merged commit 5613d59 into geosolutions-it:master Sep 29, 2026
15 checks passed
@allyoucanmap

Copy link
Copy Markdown
Contributor

@ElenaGallo please test this fix on dev, thanks

@offtherailz

Copy link
Copy Markdown
Member

Git push to origin failed for 2025.02.xx with exitcode 1

@offtherailz

Copy link
Copy Markdown
Member

Request failed due to following response errors:

  • Pull request Pull request is a draft

@offtherailz

Copy link
Copy Markdown
Member

Successfully created backport PR for 2026.02.xx:

offtherailz added a commit that referenced this pull request Sep 30, 2026
…#12921)

---------


(cherry picked from commit 5613d59)

Co-authored-by: Binabh <[email protected]>
Co-authored-by: allyoucanmap <[email protected]>
MV88 pushed a commit that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share button is not visible in sidebar in default map

4 participants