diff --git a/Proton/Proton.xcodeproj/project.pbxproj b/Proton/Proton.xcodeproj/project.pbxproj index f534cd90..911cb997 100644 --- a/Proton/Proton.xcodeproj/project.pbxproj +++ b/Proton/Proton.xcodeproj/project.pbxproj @@ -17,6 +17,9 @@ 1B183D8E23CEE9BA00AE83E5 /* AttributesEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B183D8D23CEE9BA00AE83E5 /* AttributesEncoding.swift */; }; 1B183D9223CEEED900AE83E5 /* EditorContentEncoderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B183D9023CEEEC400AE83E5 /* EditorContentEncoderTests.swift */; }; 1B1C3727244BE0D60028E1ED /* EditorViewContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B1C3726244BE0D60028E1ED /* EditorViewContextTests.swift */; }; + 1B21AD052B74604C00EBC0BF /* EditorLineNumberProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B21AD042B74604C00EBC0BF /* EditorLineNumberProvider.swift */; }; + 1B21AD072B74614C00EBC0BF /* LineNumberFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B21AD062B74614C00EBC0BF /* LineNumberFormatting.swift */; }; + 1B21AD0A2B7462AD00EBC0BF /* MockLineNumberProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B21AD082B74628600EBC0BF /* MockLineNumberProvider.swift */; }; 1B238D6E2456A40200BF49D5 /* NullRichTextEditorContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B238D6D2456A40200BF49D5 /* NullRichTextEditorContext.swift */; }; 1B2BC0D823CF17E300407DEE /* EditorContentTransformerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B2BC0D723CF17E300407DEE /* EditorContentTransformerTests.swift */; }; 1B2BC0DD23CF18C700407DEE /* EditorContentDecoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B2BC0DB23CF18C100407DEE /* EditorContentDecoding.swift */; }; @@ -189,6 +192,9 @@ 1B183D8D23CEE9BA00AE83E5 /* AttributesEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributesEncoding.swift; sourceTree = ""; }; 1B183D9023CEEEC400AE83E5 /* EditorContentEncoderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorContentEncoderTests.swift; sourceTree = ""; }; 1B1C3726244BE0D60028E1ED /* EditorViewContextTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorViewContextTests.swift; sourceTree = ""; }; + 1B21AD042B74604C00EBC0BF /* EditorLineNumberProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorLineNumberProvider.swift; sourceTree = ""; }; + 1B21AD062B74614C00EBC0BF /* LineNumberFormatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineNumberFormatting.swift; sourceTree = ""; }; + 1B21AD082B74628600EBC0BF /* MockLineNumberProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockLineNumberProvider.swift; sourceTree = ""; }; 1B238D6D2456A40200BF49D5 /* NullRichTextEditorContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NullRichTextEditorContext.swift; sourceTree = ""; }; 1B2BC0D723CF17E300407DEE /* EditorContentTransformerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorContentTransformerTests.swift; sourceTree = ""; }; 1B2BC0DB23CF18C100407DEE /* EditorContentDecoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorContentDecoding.swift; sourceTree = ""; }; @@ -448,6 +454,7 @@ 1B45CDCF23C007AF001EB196 /* RichTextView.swift */, 1B9B744C2A8B09EF00FF4E92 /* GestureRegognizerDelegateOverride.swift */, 1BD21553246951090000BCE2 /* LayoutManager.swift */, + 1B21AD062B74614C00EBC0BF /* LineNumberFormatting.swift */, 1B45CDD123C00856001EB196 /* TextContainer.swift */, 1B7A985823C484BC00C34B14 /* RichTextViewDelegate.swift */, 1B975AFE23CD454700EC410C /* RichTextViewContext.swift */, @@ -459,6 +466,7 @@ 1B30A35F2489CE3E00FA1D48 /* ListFormattingProvider.swift */, 1BFDC80E254A9BFC00BD83BD /* ListParser.swift */, 1B7C18892AAEC078005457D9 /* AsyncTaskScheduler.swift */, + 1B21AD042B74604C00EBC0BF /* EditorLineNumberProvider.swift */, ); path = Core; sourceTree = ""; @@ -855,6 +863,7 @@ 1B8BE91E23C71E8A00353B17 /* MockEditorViewDelegate.swift */, 1BD993C323CACCE100563ACB /* MockAttachment.swift */, 1B6FB1892ABA75E7008CE69E /* MockAsyncAttachmentRenderingDelegate.swift */, + 1B21AD082B74628600EBC0BF /* MockLineNumberProvider.swift */, ); path = Mocks; sourceTree = ""; @@ -1016,6 +1025,7 @@ buildActionMask = 2147483647; files = ( 1B238D6E2456A40200BF49D5 /* NullRichTextEditorContext.swift in Sources */, + 1B21AD072B74614C00EBC0BF /* LineNumberFormatting.swift in Sources */, 1B45CDBE23BF125D001EB196 /* NSAttributedString+ContentTypes.swift in Sources */, 1B7A985723C4828A00C34B14 /* RichTextEditorContext.swift in Sources */, 1BC0AA64284DF918004B8862 /* GridConfiguration.swift in Sources */, @@ -1030,6 +1040,7 @@ 1B4B60CA247FC51E002B63CF /* ListCommand.swift in Sources */, 1B7C76AB2608A489006618AC /* BoldCommand.swift in Sources */, 1B7C188C2AB17621005457D9 /* SynchronizedArray.swift in Sources */, + 1B21AD052B74604C00EBC0BF /* EditorLineNumberProvider.swift in Sources */, 1BBAC3CF23CD5A1B0088A1C8 /* UITextRangeExtensions.swift in Sources */, 1BFDC80F254A9BFC00BD83BD /* ListParser.swift in Sources */, 1B7C76AC2608A489006618AC /* ItalicsCommand.swift in Sources */, @@ -1155,6 +1166,7 @@ 1B30A3622489DC7B00FA1D48 /* MockListFormattingProvider.swift in Sources */, 1BD185C4284C33B0001F4FBC /* GridViewSnapshotTests.swift in Sources */, 1B6DE9D923C5940B007F9859 /* EditorCommandSnapshotTests.swift in Sources */, + 1B21AD0A2B7462AD00EBC0BF /* MockLineNumberProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Proton/Sources/Swift/Base/AutogrowingTextView.swift b/Proton/Sources/Swift/Base/AutogrowingTextView.swift index 9ec33264..de23c6b6 100644 --- a/Proton/Sources/Swift/Base/AutogrowingTextView.swift +++ b/Proton/Sources/Swift/Base/AutogrowingTextView.swift @@ -43,6 +43,8 @@ class AutogrowingTextView: UITextView { heightAnchorConstraint ]) } + //TODO: enable only when line numbering is turned on + contentMode = .redraw } required init?(coder: NSCoder) { diff --git a/Proton/Sources/Swift/Core/EditorLineNumberProvider.swift b/Proton/Sources/Swift/Core/EditorLineNumberProvider.swift new file mode 100644 index 00000000..e1086fde --- /dev/null +++ b/Proton/Sources/Swift/Core/EditorLineNumberProvider.swift @@ -0,0 +1,29 @@ +// +// EditorLineNumberProvider.swift +// Proton +// +// Created by Rajdeep Kwatra on 8/2/2024. +// Copyright © 2023 Rajdeep Kwatra. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation +import UIKit + +/// Describes an object capable of providing numbers to be displayed when `isLineNumbersEnabled` is set to `true` in `EditorView` +public protocol LineNumberProvider: AnyObject { + var lineNumberWrappingMarker: String? { get } + + func lineNumberString(for index: Int) -> String? +} diff --git a/Proton/Sources/Swift/Core/LayoutManager.swift b/Proton/Sources/Swift/Core/LayoutManager.swift index 9612067b..6f9373c8 100644 --- a/Proton/Sources/Swift/Core/LayoutManager.swift +++ b/Proton/Sources/Swift/Core/LayoutManager.swift @@ -30,8 +30,13 @@ protocol LayoutManagerDelegate: AnyObject { var textContainerInset: UIEdgeInsets { get } var listLineFormatting: LineFormatting { get } + + var isLineNumbersEnabled: Bool { get } + var lineNumberFormatting: LineNumberFormatting { get } + var lineNumberWrappingMarker: String? { get } func listMarkerForItem(at index: Int, level: Int, previousLevel: Int, attributeValue: Any?) -> ListLineMarker + func lineNumberString(for index: Int) -> String? } class LayoutManager: NSLayoutManager { @@ -270,11 +275,33 @@ class LayoutManager: NSLayoutManager { return stringRect } + private func rectForLineNumbers(markerSize: CGSize, rect: CGRect, width: CGFloat) -> CGRect { + let topInset = layoutManagerDelegate?.textContainerInset.top ?? 0 + let spacerRect = CGRect(origin: CGPoint(x: 0, y: topInset), size: CGSize(width: width, height: rect.height)) + + let scaleFactor = markerSize.height / spacerRect.height + var markerSizeToUse = markerSize + // Resize maintaining aspect ratio if bullet height is more than available line height + if scaleFactor > 1 { + markerSizeToUse = CGSize(width: markerSize.width/scaleFactor, height: markerSize.height/scaleFactor) + } + + let trailingPadding: CGFloat = 2 + let yPos = topInset + rect.minY + let stringRect = CGRect(origin: CGPoint(x: spacerRect.maxX - markerSizeToUse.width - trailingPadding, y: yPos), size: markerSizeToUse) + + // debugRect(rect: spacerRect, color: .blue) + // debugRect(rect: stringRect, color: .red) + + return stringRect + } + override func drawBackground(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint) { super.drawBackground(forGlyphRange: glyphsToShow, at: origin) guard let textStorage = textStorage, let currentCGContext = UIGraphicsGetCurrentContext() else { return } + currentCGContext.saveGState() let characterRange = self.characterRange(forGlyphRange: glyphsToShow, actualGlyphRange: nil) textStorage.enumerateAttribute(.backgroundStyle, in: characterRange) { attr, bgStyleRange, _ in @@ -321,6 +348,54 @@ class LayoutManager: NSLayoutManager { drawBackground(backgroundStyle: backgroundStyle, rects: rects, currentCGContext: currentCGContext) } } + drawLineNumbers(textStorage: textStorage, currentCGContext: currentCGContext) + currentCGContext.restoreGState() + } + + private func drawLineNumbers(textStorage: NSTextStorage, currentCGContext: CGContext) { + var lineNumber = 1 + guard layoutManagerDelegate?.isLineNumbersEnabled == true, + let lineNumberFormatting = layoutManagerDelegate?.lineNumberFormatting else { return } + + let lineNumberWrappingMarker = layoutManagerDelegate?.lineNumberWrappingMarker + enumerateLineFragments(forGlyphRange: textStorage.fullRange) { [weak self] rect, usedRect, _, range, _ in + guard let self else { return } + let paraRange = self.textStorage?.mutableString.paragraphRange(for: range).firstCharacterRange + let lineNumberToDisplay = layoutManagerDelegate?.lineNumberString(for: lineNumber) ?? "\(lineNumber)" + + if range.location == paraRange?.location { + self.drawLineNumber(lineNumber: lineNumberToDisplay, rect: rect.integral, lineNumberFormatting: lineNumberFormatting, currentCGContext: currentCGContext) + lineNumber += 1 + } else if let lineNumberWrappingMarker { + self.drawLineNumber(lineNumber: lineNumberWrappingMarker, rect: rect.integral, lineNumberFormatting: lineNumberFormatting, currentCGContext: currentCGContext) + } + } + + // Draw line number for additional new line with \n, if exists + drawLineNumber(lineNumber: "\(lineNumber)", rect: extraLineFragmentRect.integral, lineNumberFormatting: lineNumberFormatting, currentCGContext: currentCGContext) + } + + func drawLineNumber(lineNumber: String, rect: CGRect, lineNumberFormatting: LineNumberFormatting, currentCGContext: CGContext) { + let gutterWidth = lineNumberFormatting.gutter.width + let attributes = lineNumberAttributes(lineNumberFormatting: lineNumberFormatting) + let text = NSAttributedString(string: "\(lineNumber)", attributes: attributes) + let markerSize = text.boundingRect(with: .zero, options: [], context: nil).integral.size + var markerRect = self.rectForLineNumbers(markerSize: markerSize, rect: rect, width: gutterWidth) + let listMarkerImage = self.generateBitmap(string: text, rect: markerRect) + listMarkerImage.draw(at: markerRect.origin) + } + + private func lineNumberAttributes(lineNumberFormatting: LineNumberFormatting) -> [NSAttributedString.Key: Any] { + let font = lineNumberFormatting.font + let textColor = lineNumberFormatting.textColor + let paraStyle = NSMutableParagraphStyle() + paraStyle.alignment = .right + + return [ + NSAttributedString.Key.font: font, + NSAttributedString.Key.foregroundColor: textColor, + NSAttributedString.Key.paragraphStyle: paraStyle + ] } private func drawBackground(backgroundStyle: BackgroundStyle, rects: [CGRect], currentCGContext: CGContext) { diff --git a/Proton/Sources/Swift/Core/LineNumberFormatting.swift b/Proton/Sources/Swift/Core/LineNumberFormatting.swift new file mode 100644 index 00000000..2695b61a --- /dev/null +++ b/Proton/Sources/Swift/Core/LineNumberFormatting.swift @@ -0,0 +1,53 @@ +// +// LineNumberFormatting.swift +// Proton +// +// Created by Rajdeep Kwatra on 8/2/2023. +// Copyright © 2023 Rajdeep Kwatra. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation +import UIKit + +public struct Gutter { + public let lineWidth: CGFloat + public let lineColor: UIColor? + public let width: CGFloat + public let backgroundColor: UIColor + + init(width: CGFloat, backgroundColor: UIColor, lineColor: UIColor? = nil, lineWidth: CGFloat = 1) { + self.width = width + self.lineColor = lineColor + self.lineWidth = (lineColor != nil) ? lineWidth : 0 + self.backgroundColor = backgroundColor + } +} + +public struct LineNumberFormatting { + + public static let `default` = LineNumberFormatting( + textColor: .darkGray, font: .monospacedDigitSystemFont(ofSize: 17, weight: .light), + gutter: Gutter(width: 30, backgroundColor: .lightGray)) + + public let textColor: UIColor + public let font: UIFont + public let gutter: Gutter + + init(textColor: UIColor, font: UIFont, gutter: Gutter) { + self.textColor = textColor + self.font = font + self.gutter = gutter + } +} diff --git a/Proton/Sources/Swift/Core/RichTextView.swift b/Proton/Sources/Swift/Core/RichTextView.swift index 135c11ea..e1def0a2 100644 --- a/Proton/Sources/Swift/Core/RichTextView.swift +++ b/Proton/Sources/Swift/Core/RichTextView.swift @@ -31,6 +31,7 @@ class RichTextView: AutogrowingTextView { weak var richTextViewDelegate: RichTextViewDelegate? weak var richTextViewListDelegate: RichTextViewListDelegate? weak var richTextScrollViewDelegate: UIScrollViewDelegate? + weak var lineNumberProvider: LineNumberProvider? private var delegateOverrides = [GestureRecognizerDelegateOverride]() @@ -85,6 +86,87 @@ class RichTextView: AutogrowingTextView { } } + var lineNumberFormatting = LineNumberFormatting.default { + didSet { + let gutterOffset = lineNumberFormatting.gutter.width + lineNumberFormatting.gutter.lineWidth + let adjustedLeftInset = isLineNumbersEnabled ? (gutterOffset + textContainerInset.left - oldValue.gutter.width): nil + + textContainerInset = UIEdgeInsets( + top: textContainerInset.top, + left: adjustedLeftInset ?? textContainerInset.left, + bottom: textContainerInset.bottom, + right: textContainerInset.right + ) + setNeedsDisplay() + } + } + + var isLineNumbersEnabled = false { + didSet { + let gutterOffset = lineNumberFormatting.gutter.width + lineNumberFormatting.gutter.lineWidth + + let adjustedLeftInset: CGFloat + switch (oldValue, isLineNumbersEnabled) { + case (false, true): + adjustedLeftInset = gutterOffset + textContainerInset.left + case (true, false): + adjustedLeftInset = textContainerInset.left - gutterOffset + default: + adjustedLeftInset = textContainerInset.left + } + + textContainerInset = UIEdgeInsets( + top: textContainerInset.top, + left: adjustedLeftInset, + bottom: textContainerInset.bottom, + right: textContainerInset.right + ) + setNeedsDisplay() + } + } + + override func draw(_ rect: CGRect) { + guard isLineNumbersEnabled, + let currentCGContext = UIGraphicsGetCurrentContext() else { + super.draw(rect) + return + } + + let height = max(contentSize.height, bounds.height) + let rect = CGRect(x: 0, y: 0, width: lineNumberFormatting.gutter.width, height: height) + let rectanglePath = UIBezierPath(rect: rect) + + currentCGContext.saveGState() + currentCGContext.addPath(rectanglePath.cgPath) + + if let lineColor = lineNumberFormatting.gutter.lineColor { + currentCGContext.setStrokeColor(lineColor.cgColor) + currentCGContext.setLineWidth(lineNumberFormatting.gutter.lineWidth) + currentCGContext.drawPath(using: .stroke) + } + + currentCGContext.setFillColor(lineNumberFormatting.gutter.backgroundColor.cgColor) + currentCGContext.fill(rect) + + // Draw line number if textView is empty + if let layoutManager = layoutManager as? LayoutManager, + attributedText.length == 0 { + let lineNumberToDisplay = lineNumberString(for: 1) ?? "1" + let width = lineNumberFormatting.gutter.width + let height = defaultFont.lineHeight + layoutManager.drawLineNumber(lineNumber: lineNumberToDisplay, rect: CGRect(origin: .zero, size: CGSize(width: width, height: height)), lineNumberFormatting: lineNumberFormatting, currentCGContext: currentCGContext) + } + + currentCGContext.restoreGState() + + super.draw(rect) + } + + func drawDefaultLineNumberIfRequired() { + guard isLineNumbersEnabled else { return } + draw(CGRect(origin: .zero, size: contentSize)) + } + override var selectedTextRange: UITextRange? { didSet{ let old = oldValue?.toNSRange(in: self) @@ -503,6 +585,10 @@ class RichTextView: AutogrowingTextView { return } setupPlaceholder() + if isLineNumbersEnabled { + //TODO: else use default + contentMode = .redraw + } } func attributeValue(at location: CGPoint, for attribute: NSAttributedString.Key) -> Any? { @@ -725,10 +811,15 @@ extension RichTextView: TextStorageDelegate { func textStorage(_ textStorage: PRTextStorage, edited actions: NSTextStorage.EditActions, in editedRange: NSRange, changeInLength delta: Int) { updatePlaceholderVisibility() + drawDefaultLineNumberIfRequired() } } extension RichTextView: LayoutManagerDelegate { + var lineNumberWrappingMarker: String? { + lineNumberProvider?.lineNumberWrappingMarker + } + var listLineFormatting: LineFormatting { return richTextViewListDelegate?.listLineFormatting ?? RichTextView.defaultListLineFormatting } @@ -737,6 +828,10 @@ extension RichTextView: LayoutManagerDelegate { return defaultTextFormattingProvider?.paragraphStyle } + func lineNumberString(for index: Int) -> String? { + lineNumberProvider?.lineNumberString(for: index) + } + func listMarkerForItem(at index: Int, level: Int, previousLevel: Int, attributeValue: Any?) -> ListLineMarker { let font = UIFont.preferredFont(forTextStyle: .body) let defaultValue = NSAttributedString(string: "*", attributes: [.font: font]) diff --git a/Proton/Sources/Swift/Editor/EditorView.swift b/Proton/Sources/Swift/Editor/EditorView.swift index 10a17738..3eb967cb 100644 --- a/Proton/Sources/Swift/Editor/EditorView.swift +++ b/Proton/Sources/Swift/Editor/EditorView.swift @@ -188,6 +188,23 @@ open class EditorView: UIView { set { richTextView.textDragInteraction?.isEnabled = newValue } } + /// Line number provider to be used to show custom line numbers in gutter. + /// - Note: Only applicable when `isLineNumbersEnabled` is set to `true` + public var lineNumberProvider: LineNumberProvider? { + get { richTextView.lineNumberProvider } + set { richTextView.lineNumberProvider = newValue } + } + + public var isLineNumbersEnabled: Bool { + get { richTextView.isLineNumbersEnabled } + set { richTextView.isLineNumbersEnabled = newValue } + } + + public var lineNumberFormatting: LineNumberFormatting { + get { richTextView.lineNumberFormatting } + set { richTextView.lineNumberFormatting = newValue } + } + public override var bounds: CGRect { didSet { guard oldValue != bounds else { return } diff --git a/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRenderUpdatedImageInViewAttachment.1.png b/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRenderUpdatedImageInViewAttachment.1.png index fbd335b2..7a697ec7 100644 Binary files a/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRenderUpdatedImageInViewAttachment.1.png and b/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRenderUpdatedImageInViewAttachment.1.png differ diff --git a/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRendersUpdatedViewInAttachment.1.png b/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRendersUpdatedViewInAttachment.1.png index fbd335b2..7a697ec7 100644 Binary files a/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRendersUpdatedViewInAttachment.1.png and b/Proton/Tests/Attachments/__Snapshots__/AttachmentUpdateSnapshotTests/testRendersUpdatedViewInAttachment.1.png differ diff --git a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testFixedWidthRendering.1.png b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testFixedWidthRendering.1.png index 50ad2a77..3e58b036 100644 Binary files a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testFixedWidthRendering.1.png and b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testFixedWidthRendering.1.png differ diff --git a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testMatchContentRendering.1.png b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testMatchContentRendering.1.png index c7b1387d..692e28b7 100644 Binary files a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testMatchContentRendering.1.png and b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testMatchContentRendering.1.png differ diff --git a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testWidthRangeRendering.1.png b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testWidthRangeRendering.1.png index 15f8dbf7..742e131e 100644 Binary files a/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testWidthRangeRendering.1.png and b/Proton/Tests/Attachments/__Snapshots__/ViewAttachmentSnapshotTests/testWidthRangeRendering.1.png differ diff --git a/Proton/Tests/Core/__Snapshots__/ListsSnapshotTests/testSingleLevelList.1.png b/Proton/Tests/Core/__Snapshots__/ListsSnapshotTests/testSingleLevelList.1.png index e806529c..714163c7 100644 Binary files a/Proton/Tests/Core/__Snapshots__/ListsSnapshotTests/testSingleLevelList.1.png and b/Proton/Tests/Core/__Snapshots__/ListsSnapshotTests/testSingleLevelList.1.png differ diff --git a/Proton/Tests/Editor/EditorSnapshotTests.swift b/Proton/Tests/Editor/EditorSnapshotTests.swift index a26da401..da27b00a 100644 --- a/Proton/Tests/Editor/EditorSnapshotTests.swift +++ b/Proton/Tests/Editor/EditorSnapshotTests.swift @@ -25,9 +25,12 @@ import SnapshotTesting @testable import Proton class EditorSnapshotTests: SnapshotTestCase { + let mockLineNumberProvider = MockLineNumberProvider() + override func setUp() { super.setUp() recordMode = false + mockLineNumberProvider.indexOffSet = 0 } func testRendersPlaceholder() { @@ -1156,6 +1159,170 @@ class EditorSnapshotTests: SnapshotTestCase { assertSnapshot(matching: viewController.view, as: .image, record: false) } + func testLineNumbersBlank() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.isLineNumbersEnabled = true + viewController.render(size: CGSize(width: 300, height: 75)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testLineNumbersDefault() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 + Test line 2 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 125)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testLineNumbersWithLineSpacing() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.paragraphStyle.lineSpacing = 30 + + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 Test line 1 Test line 1 Test line 1 + Test line 2 Test line 1 Test line 1 Test line 1 + Test line 3 Test line 1 Test line 1 + Test line 4 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 400)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testLineNumbersWithParagraphSpacing() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.paragraphStyle.paragraphSpacing = 30 + editor.lineNumberProvider = mockLineNumberProvider + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 Test line 1 Test line 1 Test line 1 + Test line 2 Test line 1 Test line 1 Test line 1 + Test line 3 Test line 1 Test line 1 + Test line 4 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 400)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func FIXME_testLongLineNumbers() { + recordMode = true + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.lineNumberProvider = mockLineNumberProvider + mockLineNumberProvider.indexOffSet = 888 + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 Test line 1 Test line 1 Test line 1 + Test line 2 Test line 1 Test line 1 Test line 1 + Test line 3 Test line 1 Test line 1 + Test line 4 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 400)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testLineNumbersEnableDisable() { + let viewController = EditorTestViewController() + let editor = viewController.editor + + let text = """ + Test line 1 + Test line 2 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + editor.isLineNumbersEnabled = false + viewController.render(size: CGSize(width: 300, height: 125)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + + editor.isLineNumbersEnabled = true + viewController.render(size: CGSize(width: 300, height: 125)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + + editor.isLineNumbersEnabled = false + viewController.render(size: CGSize(width: 300, height: 125)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testLineNumbersWithFormatting() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.isLineNumbersEnabled = true + editor.lineNumberFormatting = LineNumberFormatting( + textColor: .white, + font: UIFont.italicSystemFont(ofSize: 17), + gutter: Gutter( + width: 20, + backgroundColor: .black, + lineColor: .red, + lineWidth: 2 + )) + + let text = """ + Test line 1 + Test line 2 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 125)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + + func testLineNumbersWithWrappedText() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 Test line 1 Test line 1 Test line 1 Test line 1 Test line 1 + Test line 2 Test line 2 + Test line 3 Test line 3 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 220)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + + func testCustomLineNumbersWithWrappedText() { + let viewController = EditorTestViewController() + let editor = viewController.editor + editor.lineNumberProvider = mockLineNumberProvider + editor.isLineNumbersEnabled = true + let text = """ + Test line 1 Test line 1 Test line 1 Test line 1 Test line 1 Test line 1 + Test line 2 Test line 2 + Test line 3 Test line 3 + """ + + editor.appendCharacters(NSAttributedString(string: text)) + + viewController.render(size: CGSize(width: 300, height: 220)) + assertSnapshot(matching: viewController.view, as: .image, record: recordMode) + } + private func addCaretRect(at range: NSRange, in editor: EditorView, color: UIColor) { let rect = editor.caretRect(for: range.location) let view = UIView(frame: rect) diff --git a/Proton/Tests/Editor/Mocks/MockLineNumberProvider.swift b/Proton/Tests/Editor/Mocks/MockLineNumberProvider.swift new file mode 100644 index 00000000..1654a006 --- /dev/null +++ b/Proton/Tests/Editor/Mocks/MockLineNumberProvider.swift @@ -0,0 +1,33 @@ +// +// MockLineNumberProvider.swift +// Proton +// +// Created by Rajdeep Kwatra on 8/2/2023. +// Copyright © 2023 Rajdeep Kwatra. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation +import UIKit + +import Proton + +class MockLineNumberProvider: LineNumberProvider { + var lineNumberWrappingMarker: String? { "- " } + var indexOffSet = 0 + + func lineNumberString(for index: Int) -> String? { + "\(index + indexOffSet)." + } +} diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testAppliesAndRemovesListStyleToEntireLineOnPartialSelection.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testAppliesAndRemovesListStyleToEntireLineOnPartialSelection.2.png index 90372ca4..bce713d6 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testAppliesAndRemovesListStyleToEntireLineOnPartialSelection.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testAppliesAndRemovesListStyleToEntireLineOnPartialSelection.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.1.png index 9994e4b5..7baadf85 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.2.png index 37925e10..2f4e3c0f 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testContinuesNumberingWhenTwoListsAreCombined.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.1.png index b27ad859..c96e91fe 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.2.png index 93b07886..a0465766 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListBetweenTwoParagraphs.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListFromSelectedText.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListFromSelectedText.1.png index 9a48bf59..41c72c0c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListFromSelectedText.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListFromSelectedText.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandAtEnd.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandAtEnd.1.png index b44879a9..6fc7e6c3 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandAtEnd.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandAtEnd.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInBeginning.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInBeginning.1.png index 65f7e514..2301cdee 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInBeginning.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInBeginning.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInTheMiddle.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInTheMiddle.1.png index 931e447f..3a2ccdd7 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInTheMiddle.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesListWithoutSelectionUsingCommandInTheMiddle.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnReturnKey.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnReturnKey.1.png index 6475ad8f..50c06c91 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnReturnKey.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnReturnKey.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.1.png index c9b1e1f6..4e1b66c5 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.2.png index b6c694b5..bc270976 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.3.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.3.png index 708f534d..45f3179a 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.3.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testCreatesNewListItemOnSecondReturnKeyWhenInMiddleOfAList.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.1.png index 6475ad8f..50c06c91 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.2.png index d4d39a27..31ea9856 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKey.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.1.png index a8558ebc..7d42a99d 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.2.png index 3d2b88ac..e8ff3e45 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testExitsNewListItemOnSecondReturnKeyWithTrailingNonListText.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.1.png index 8ab5a54a..29051816 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.2.png index 9a48bf59..41c72c0c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithMultipleSelectedLines.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.1.png index 5290e458..94514ac3 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.2.png index 9a48bf59..41c72c0c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInBeginning.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.1.png index 5290e458..94514ac3 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.2.png index 9a48bf59..41c72c0c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInEnd.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.1.png index 5290e458..94514ac3 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.2.png index 9a48bf59..41c72c0c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsAndOutdentsListWithoutSelectedRangeInMiddle.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.1.png index 751abb79..fa0ba90d 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.2.png index 7bab90f2..78664d35 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.3.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.3.png index c976f179..fc47594b 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.3.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testIndentsNestedItems.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testInitiatesCreationOfList.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testInitiatesCreationOfList.1.png index de48b52b..65a44135 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testInitiatesCreationOfList.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testInitiatesCreationOfList.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.1.png index 751abb79..fa0ba90d 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.2.png index 69db497f..50e79c91 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.3.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.3.png index 1f761b44..b9fa6ebe 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.3.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsNestedItems.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.1.png index 0c954f64..e1ab22c2 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.2.png index ee58d953..2e118bd7 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.3.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.3.png index cbb1b8c9..a283ea9d 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.3.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.4.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.4.png index 1f9af3b9..83adfd47 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.4.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.4.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.5.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.5.png index 98d510e7..04c4148e 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.5.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.5.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.6.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.6.png index aafa8b91..8a0a323e 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.6.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.6.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.7.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.7.png index 8cb9f9b6..9d549275 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.7.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testOutdentsToZerothLevel.7.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testQueriesDelegateForListLineMarker.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testQueriesDelegateForListLineMarker.1.png index a3398865..0a257050 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testQueriesDelegateForListLineMarker.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testQueriesDelegateForListLineMarker.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.1.png index 928795bc..622c43aa 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.2.png index 0e107250..87ae4b8a 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRegeneratesNumbersOnChangesToNonListTextInMiddleOfLists.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.1.png index fbdc4b57..99769961 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.2.png index 5c1400dc..44ed9acc 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.3.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.3.png index 58e441f1..670c2c1c 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.3.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRemoveListAttributeFromRange.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInArrowFormat.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInArrowFormat.1.png index f07c4909..768ccf50 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInArrowFormat.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInArrowFormat.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInAttributedString.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInAttributedString.1.png index 3d503892..49f2ae0f 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInAttributedString.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListInAttributedString.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListWithDifferentAttributeValues.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListWithDifferentAttributeValues.1.png index 101a7364..9d8a449e 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListWithDifferentAttributeValues.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testRendersListWithDifferentAttributeValues.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.1.png index 147db396..21dcac2e 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.2.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.2.png index 7a104676..416411c3 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.2.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testResetsParagraphStyleOnExitingList.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipListMarkerForSkipAttribute.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipListMarkerForSkipAttribute.1.png index 6d437fa7..e22822cc 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipListMarkerForSkipAttribute.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipListMarkerForSkipAttribute.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipNumberingForMultilineText.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipNumberingForMultilineText.1.png index 14f3a403..339682d0 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipNumberingForMultilineText.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipNumberingForMultilineText.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyAtEndOfTheList.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyAtEndOfTheList.1.png index d8ef47ea..7c872e67 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyAtEndOfTheList.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyAtEndOfTheList.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyInMiddleOfList.1.png b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyInMiddleOfList.1.png index 42443ea0..8b8ff7a6 100644 Binary files a/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyInMiddleOfList.1.png and b/Proton/Tests/Editor/__Snapshots__/EditorListsSnapshotTests/testSkipsListMarkerOnShiftReturnKeyInMiddleOfList.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testCustomLineNumbersWithWrappedText.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testCustomLineNumbersWithWrappedText.1.png new file mode 100644 index 00000000..bf5541a8 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testCustomLineNumbersWithWrappedText.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersBlank.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersBlank.1.png new file mode 100644 index 00000000..d52f7995 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersBlank.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersDefault.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersDefault.1.png new file mode 100644 index 00000000..1e3d438d Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersDefault.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.1.png new file mode 100644 index 00000000..e23ff546 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.2.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.2.png new file mode 100644 index 00000000..1e3d438d Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.2.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.3.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.3.png new file mode 100644 index 00000000..e23ff546 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersEnableDisable.3.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithFormatting.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithFormatting.1.png new file mode 100644 index 00000000..fe0e6587 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithFormatting.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithLineSpacing.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithLineSpacing.1.png new file mode 100644 index 00000000..7bbd4e2a Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithLineSpacing.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithParagraphSpacing.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithParagraphSpacing.1.png new file mode 100644 index 00000000..2e15b54d Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithParagraphSpacing.1.png differ diff --git a/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithWrappedText.1.png b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithWrappedText.1.png new file mode 100644 index 00000000..77de82c9 Binary files /dev/null and b/Proton/Tests/Editor/__Snapshots__/EditorSnapshotTests/testLineNumbersWithWrappedText.1.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewColumn.1.png b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewColumn.1.png index 70b5a975..eece9d2d 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewColumn.1.png and b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewColumn.1.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewRow.1.png b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewRow.1.png index 70b5a975..eece9d2d 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewRow.1.png and b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testAppliesStyleToNewRow.1.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testInsertsRowAtIndexInMiddle.2.png b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testInsertsRowAtIndexInMiddle.2.png index 5684376c..82716b9a 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testInsertsRowAtIndexInMiddle.2.png and b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testInsertsRowAtIndexInMiddle.2.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testMaintainsRowHeightBasedOnContent.4.png b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testMaintainsRowHeightBasedOnContent.4.png index abdc7f35..cc9e1af9 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testMaintainsRowHeightBasedOnContent.4.png and b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testMaintainsRowHeightBasedOnContent.4.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testRendersGridViewAttachment.1.png b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testRendersGridViewAttachment.1.png index 740a34d0..81532dae 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testRendersGridViewAttachment.1.png and b/Proton/Tests/Grid/__Snapshots__/GridViewAttachmentSnapshotTests/testRendersGridViewAttachment.1.png differ diff --git a/Proton/Tests/Grid/__Snapshots__/GridViewSnapshotTests/testRendersGridView.1.png b/Proton/Tests/Grid/__Snapshots__/GridViewSnapshotTests/testRendersGridView.1.png index fcb0c9b7..ca205fac 100644 Binary files a/Proton/Tests/Grid/__Snapshots__/GridViewSnapshotTests/testRendersGridView.1.png and b/Proton/Tests/Grid/__Snapshots__/GridViewSnapshotTests/testRendersGridView.1.png differ