Skip to content

feat: support deep linking by blip or quadrant - #337

Open
setchy wants to merge 14 commits into
thoughtworks:masterfrom
setchy:feature/support-blip-deep-linking
Open

feat: support deep linking by blip or quadrant#337
setchy wants to merge 14 commits into
thoughtworks:masterfrom
setchy:feature/support-blip-deep-linking

Conversation

@setchy

@setchy setchy commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

This PR adds optional support for deep-linking via query string arguments

Note: blip id takes precedence when both are present

@setchy setchy changed the title feat: support blip deep linking feat: support deep linking by blip or quadrant Jul 19, 2023
@setchy
setchy requested a review from marisahoenig as a code owner July 28, 2023 18:18
@setchy
setchy requested review from a team and will-amaral as code owners April 11, 2024 18:53
@setchy

setchy commented May 9, 2024

Copy link
Copy Markdown
Contributor Author

@will-amaral - appreciate your thoughts on this PR

Copilot AI review requested due to automatic review settings April 21, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds deep-linking support to the radar UI via query-string parameters so users can navigate directly to a specific blip (?blipId=<id>) or quadrant (?quadrant=<first|second|third|fourth>), addressing the need for quadrant-specific links (Issue #5).

Changes:

  • Added URL utility helpers to read blipId and quadrant from the query string.
  • Added a radar render-time deep-link handler that selects a quadrant and optionally focuses a blip.
  • Refactored quadrant table click logic into a reusable performBlipClick helper and documented deep-linking in the README.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/util/urlUtils.js Adds query-string parsing helpers for blipId and quadrant.
src/graphing/radar.js Applies deep-link behavior after rendering quadrants/blips.
src/graphing/components/quadrantTables.js Extracts blip-click behavior into performBlipClick for reuse (incl. deep links).
spec/util/urlUtils-spec.js Adds unit tests for the new URL helpers.
README.md Documents supported deep-link query parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/graphing/radar.js Outdated
Comment thread spec/util/urlUtils-spec.js Outdated
Comment thread README.md Outdated
Comment thread src/graphing/components/quadrantTables.js Outdated
Comment thread src/util/urlUtils.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec/util/urlUtils-spec.js
Comment thread src/graphing/radar.js
Comment thread src/graphing/radar.js Outdated
Comment thread src/util/urlUtils.js Outdated
Comment thread spec/util/urlUtils-spec.js Outdated
Comment thread src/graphing/radar.js
Comment on lines +867 to +900
function renderDeepLinkViewIfPresent(quadrants) {
let quadrant

// Deep link by blip id
const blipIdToShow = getBlipIdFromUrl()
if (blipIdToShow) {
for (const q of quadrants) {
for (const b of q.quadrant.blips()) {
if (b.id() === blipIdToShow) {
quadrant = q
}
}
}
}

// Deep link by quadrant order
const quadrantToShow = getQuadrantFromURL()
if (quadrantToShow && !blipIdToShow) {
for (const q of quadrants) {
if (q.order === quadrantToShow) {
quadrant = q
}
}
}

if (quadrant) {
selectRadarQuadrant(quadrant.order, quadrant.startAngle, quadrant.quadrant.name())

if (blipIdToShow) {
const blipLink = document.getElementById(`blip-link-${blipIdToShow}`)
performBlipClick(blipLink)
}
}
}

Copilot AI Apr 21, 2026

Copy link

Choose a reason for hiding this comment

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

Deep-link behavior is introduced in renderDeepLinkViewIfPresent, but there are no end-to-end tests asserting that ?quadrant=... selects the correct quadrant and that ?blipId=... expands/highlights the blip. Since the repo already has Cypress coverage for quadrant/blip interactions, add e2e coverage for the URL-driven path to prevent regressions.

Copilot uses AI. Check for mistakes.
@setchy

setchy commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed this branch (Aug 2026):

  • Merged latest master in (branch was only 2 commits behind).
  • Fixed the CSS attribute selector typo in performBlipClick flagged by Copilot — [data-blip-id="..." / [data-group-id="..." were missing their closing ].
  • Cleaned up the misleading test names/variables in urlUtils-spec.js for the blip-id tests (they were named/described as if testing the quadrant helper).

setchy and others added 3 commits August 27, 2026 12:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- rename getQuadrantFromURL to getQuadrantFromUrl for naming consistency
- use explicit radix in parseInt
- avoid unnecessary quadrant scan when no quadrant is present in the URL
- use explicit null checks instead of truthy checks for blipIdToShow
- guard performBlipClick against a missing blip link element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link to each quadrant

2 participants