Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tip label can be defined in display_defaults #1692

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

jameshadfield
Copy link
Member

@jameshadfield jameshadfield commented Aug 30, 2023

The ability to encode the tip-label in the URL (?tl=...) was implemented at the same time as the ability to change tip-label keys was done - see 0e55b30

The ability to encode this in the JSON's display_defaults wasn't done, presumably due to time constraints.

This commit was originally part of the larger #1668, however that's had no comments on it and so I don't know if/when it'll be merged.

Augur PR nextstrain/augur#1298 will update the schema to allow this field

@nextstrain-bot nextstrain-bot temporarily deployed to auspice-display-default-0s5ses August 30, 2023 22:41 Inactive
@corneliusroemer
Copy link
Member

Let's merge this soon as the schema already advertises tip labels as settable because https://github.com/nextstrain/augur/pull/1299/files was merged. I didn't check if there was already a PR and redid the work in #1703

Copy link
Member

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

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

Tested an it works - though I don't know all the details of why the middleware changes are necessary, in my PR I seemed to be able to get away without.

This one has much better validation and documentation.

Tree to test on: nextclade_mpox_b1.json.txt

@jameshadfield
Copy link
Member Author

jameshadfield commented Sep 27, 2023

This should have been merged & released before nextstrain/augur@6ce1bf7 but that's not the way it played out. Thanks for the reminder @corneliusroemer!

though I don't know all the details of why the middleware changes are necessary, in my PR I seemed to be able to get away without.

The middleware (in this context) keeps the URL query tl=... up-to-date - if the selected tip label matches the JSON-set default then we don't want any URL query, as the URL query is intended to change state from the defaults.

The ability to encode the tip-label in the URL (?tl=...) was implemented
at the same time as the ability to change tip-label keys was done - see
0e55b30

The ability to encode this in the JSON's display_defaults wasn't done,
presumably due to time constraints.
@jameshadfield
Copy link
Member Author

[Rebased onto master]

@jameshadfield jameshadfield merged commit 87a063d into master Sep 27, 2023
20 checks passed
@jameshadfield jameshadfield deleted the display-default-tip-label branch September 27, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants