fix: select correct node context when searching#736
Merged
Conversation
gunnarvelle
reviewed
May 5, 2026
Member
gunnarvelle
left a comment
There was a problem hiding this comment.
Dette trur eg ikkje har nokon praktisk betydning siden vi ikkje har fagfilter på fag-søket. Taksonomi plukker den "korteste" konteksten som hovedkontekst, så du er garantert å få en fagurl. Og om du velger et fag på alle-søket vi du uansett kun få ett fag i søkeresultatet siden dette faget vil være det som treffer når du sender inn fag-id som filter.
gunnarvelle
reviewed
May 5, 2026
Comment on lines
+134
to
+135
| url: searchCtx?.url ?? result.url ?? "", | ||
| context: searchCtx ? { ...searchCtx } : undefined, |
Member
There was a problem hiding this comment.
Kunne like gjerne hatt følgende og fått samme oppførsel
Suggested change
| url: searchCtx?.url ?? result.url ?? "", | |
| context: searchCtx ? { ...searchCtx } : undefined, | |
| url: result.context?.url ?? result.url ?? "", | |
| context: result.context, |
gunnarvelle
approved these changes
May 5, 2026
Member
gunnarvelle
left a comment
There was a problem hiding this comment.
Kan behandle kontekster likt for lesbarehets skyld.
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.
Vi utleder riktig kontekst på en litt annen måte for node-resultater. Tror det gir mer mening å velge kontekst på samme måte som vi gjør for stier og artikler.