ui: surface per-file encoding and line-ending in the values sticky strip and preserve them on save - #58
Merged
Conversation
…rip and preserve them on save
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.
service.DetectFileEncodingthat BOM sniffs UTF-8, UTF-8 BOM, UTF-16 LE, UTF-16 BE and scans for the first newline to report LF or CRLFservice.EncodeForFilethat prepends the original BOM and rewrites LF to CRLF when writing back, so a UTF-8 BOM CRLF file round trips unchangeddomain.ValuesFileandservice.FlatValueswithEncodingandLineEndingfields populated at read time and copied throughnewFlatValuesReadCustomValuesandReadAndMergeCustomValuesnow detect the encoding pair from the raw bytes; multi file merge takes them from the first file, parallel to indentSaveValuesFileand the controllersaveToFileaccept encoding and line ending parameters;columnFileEncodingpulls them from the column so saves preserve the source shapeanyColumnHasCustomValuesto exportedAnyColumnHasCustomValuesso the page layer can gate on a real loadlayoutStickyDiagnosticsreturns empty dimensions until at least one column has parsed values, then renders override count, extras count, and one encoding chip per loaded columnlayoutStickyDiagDividerthat draws a hairline vertical separator between adjacent diagnostic chips, andappendDiagChipthat skips empty entries so leading and trailing dividers never appearservice/file_metadata_test.gocovering the detection helper