feat: edit a declared style from the panel - #109
Merged
Merged
Conversation
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.
Summary
Edit beside the Style dropdown, which row one of the reference puts right after it and Sublore had nowhere. It opens a dialog over the shell holding the style's font, size, four colours and four flags, and each field is one write and one undo step.
It needed the first edit in this repository that changes no cue at all.
Edit::SetStyleFieldsplices the span the parser recorded for that column, and its expectation says no cue changed, whichverifythen proves by reading every one of them back and comparing. That is not ceremony: a style line that swallowed a comma would shift every column of every event under it, and this is the only place that would be seen. The check saves the file and compares everyDialogue:line byte for byte.To make the flags writable the parser had to record where they sit, not only what they say, so
AssStylenow carries the four spans beside the four booleans: a reader wants the meaning and a writer wants the bytes. And the patch every edit answers with now carries the styles, because a style write changes no cue and nothing else in that shape would tell the interface that one moved.Two things are deliberately not in it, and both are filed rather than implied. The name is not a field: renaming a style means rewriting every event that names it, which is a different operation with its own undo step. And the dialog holds ten of a style's twenty-three columns, because the parser reads ten; the rest are not drawn as empty boxes, they are simply not there. That is BACKLOG N42.
Changes
AssStyleField,Edit::SetStyleFieldandplan_set_style_field, whose expectation asserts that not one cue moved.subtitle_set_style_field, and the styles carried on every patch.setStyleField, and the patch's styles reaching the summary.How to verify it by using the app
fixtures/subtitles/ass/clean/basic.ass. Beside the Style dropdown there is an Edit button.Style:line carries the new font, and everyDialogue:line is exactly the bytes it was.-1and the font is still there.Verified on Linux: full gate green step by step, and the battery green at 36 spec files of 36 with 295 checks. One mutation, a bold flag written into the font's own column, reddened the flag check first.