Skip to content

[fix] LD ref now updates after 'Make LD Reference' link clicked in a Credible Set layout - #300

Open
JarvisJ wants to merge 2 commits into
developfrom
jarvisj/fix-no-diamond-ld-ref
Open

JarvisJ wants to merge 2 commits into
developfrom
jarvisj/fix-no-diamond-ld-ref

Conversation

@JarvisJ

@JarvisJ JarvisJ commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

This PR fixes an issue where the LD Ref diamond marker was not updated after the LD Ref was changed in a credible set layout. Additionally, the selected variant was being filled "yellow" in a credible set layout, which is inconsistent with other layout types. Here is a screen recording that demonstrates the LD Ref bug:

Screen.Recording.2026-10-28.at.1.21.39.PM.mov

Screen capture of the undesireable yellow selection:
Screenshot 2026-10-28 at 1 38 05 PM

Screen recording after the fix (in pheweb-trans-omic):

Screen.Recording.2026-10-28.at.1.44.48.PM.mov

@JarvisJ JarvisJ changed the title Fixed LD ref not updating after 'Make LD Reference' link clicked in a Credible Set layout [bug] LD ref now updates after 'Make LD Reference' link clicked in a Credible Set layout Oct 28, 2026
@JarvisJ JarvisJ changed the title [bug] LD ref now updates after 'Make LD Reference' link clicked in a Credible Set layout [fix] LD ref now updates after 'Make LD Reference' link clicked in a Credible Set layout Oct 28, 2026
scale_function: 'if',
parameters: {
field_value: true,
then: '#FFf000',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This was setting the selected marker fill to yellow, which was inconsistent with other layouts/plots.

_getCacheKey (state) {
const threshold = state.credible_set_threshold || this._config.threshold;
return [threshold, state.chr, state.start, state.end].join('_');
return [state.ldrefvar, threshold, state.chr, state.start, state.end].join('_');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

When the ldrefvar was updated, we'd receive a cache hit on the credible set data, which would return the set of data with the stale lz_is_ld_ref value. Including state.ldrefvar in the cache key ensures that the credible set data is "re-joined" with the new ldrefvar, instead of just retrieving the cached data.

Comment thread package-lock.json
},
"jszlib": {
"version": "git+ssh://git@github.com/dasmoth/jszlib.git#4e562c7b88749f3e1e402737ddef5f96bf0906c6",
"integrity": "sha512-L+slw277qqgqWvyz6srOUOqHnbuyLBGPkgzM7IgxCTb/MVTNiy11iQ15mS+dO2f8UIjKBb4z8AgO3vshLrjXVg==",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The github action was throwing an integrity check error. An npm install updated the problematic integrity checksum value (fortunately).

@JarvisJ
JarvisJ marked this pull request as ready for review October 28, 2026 18:35
@JarvisJ
JarvisJ requested a review from jonathonl October 28, 2026 18:35
@jonathonl
jonathonl requested review from welchr and removed request for jonathonl October 28, 2026 21:09
@abought

abought commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Note: it's been a very long time, but the yellow-on-click behavior was (probably) a holdover from an earlier design where the credible set was a separate panel, and clicking any point would cause matching points to be highlighted in any other panel.

It's up to the current repo owners to review things, but hopefully this helps with the design / intent part of review. :)

Docs: https://statgen.github.io/locuszoom/docs/guides/interactivity.html#matching-similar-elements-across-panels

This branch has not been deployed

No deployments
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.

2 participants