fix(map): validate suggest-place links and preserve input - #189
Merged
yakew7 merged 1 commit intoAug 24, 2026
Conversation
Contributor
|
@AyobamiH is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #150.
What this changes
Hardens the map's "Suggest a place" flow in two places:
There is an important popup-security nuance here. Passing
noopenerinwindow.open(..., windowFeatures)can itself make the returned window handlenull, which makes a successful open indistinguishable from a blocked popup.The implementation instead opens a blank tab synchronously from the user click, checks the returned handle, immediately sets
opened.opener = null, and only then navigates it to the pre-filled GitHub issue. The fallback link still usesrel="noopener noreferrer".Regression evidence
RED
Test-only commit:
127cf5b4f33c52db321f458d9000b5d63902c0e2The new
suggest-place-dialogregression suite failed against the original implementation as expected.Results:
window.openpathFork CI run:
32713989798GREEN
Final commit:
c68da740071afaf8f873b01ef9b6a560f1fe3c1aThe final branch is one commit ahead of current upstream
mainand changes only:src/components/map/suggest-place-dialog.tsxsrc/components/map/suggest-place-dialog.test.tsxFinal verification passed:
npm run test:unitnpm run buildnpm run validatenpm run lintnpx tsc --noEmitFork CI run:
32714425499Lint/typecheck run:
32714425310Type of change
Proof (required for new public places)
Not applicable. This PR does not change place data.
Checklist