Render the word tier above the phone tier in TextGrid timelines - #168
Merged
Conversation
Flips _TIER_ORDER so "words" sorts before "phones" wherever a TextGrid timeline is drawn — the Viewer, Compare Alignments, and Correct Alignments all share this widget. Words-over-phones reads top-down from coarse to fine, which is the order these tiers are conventionally shown in and the order reviewers expect when scanning an alignment. The Viewer's inline active-segment label was building its parts straight from _loaded_tiers in raw file order, so it could disagree with the timeline right above it. It now sorts through the same _TIER_ORDER.
This was referenced Aug 19, 2026
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.
Split out of #163 so each change can be reviewed on its own.
What
Flips
TextGridTimeline._TIER_ORDERsowordssorts beforephones. Every place a TextGrid timeline is drawn shares this widget — the Viewer, Compare Alignments, and Correct Alignments — so all three pick up the new order.Words-over-phones reads top-down from coarse to fine, which is the order these tiers are conventionally displayed in and the order reviewers expect when scanning an alignment.
Second hunk
The Viewer's inline active-segment label (
_update_active_segment_label) was assembling its parts straight fromself._loaded_tiersin raw file order, so the label could list phones before words while the timeline directly above it showed the opposite. It now sorts through the same_TIER_ORDERmap, so label and timeline always agree.Related