Maintain consistent priority when using subject tags - #2272
Open
sjd210 wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2272 +/- ##
========================================
Coverage 43.20% 43.20%
========================================
Files 601 601
Lines 25757 25757
Branches 8595 7657 -938
========================================
Hits 11128 11128
- Misses 14572 14580 +8
+ Partials 57 49 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Pages are augmented with a
subjectIdwhen their tags are processed, however previously in cases of multiple subject tags (and for which there was no subject in the url), the ID would be whichever is the first in thedoc's tag list. The order of this tag list should not matter (and indeed does not appear to be preserved when indexed) - instead we should use the subject priority that is already used forpageContext: [physics -> maths -> chemistry -> biology]This was leading to mismatched page and title icon themes, although this could have also been avoided with a consistent order of
pageContext?.subject ?? doc.subjectId(rather than the other way around), or by not re-stating the subject unnecessarily in theTitleAndBreadcrumb. To help avoid anything similar coming up again, these have both also been addressed.