Open
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request migrates the WMFComponentsObjC source editor formatters from Objective-C to Swift, completing the modernization of this codebase component. The migration removes the legacy Objective-C bridge module entirely and replaces it with native Swift implementations.
Changes:
- Migrated all source editor formatter classes from Objective-C to Swift, including text storage, formatters for bold/italics, templates, links, headings, lists, references, comments, find & replace, and various text decorations
- Converted
WMFSourceEditorColorsandWMFSourceEditorFontsfrom Objective-C classes with mutable properties to Swift structs with immutable properties using designated initializers - Updated
selectedMatchIndexin the find & replace formatter fromNSInteger(usingNSNotFoundsentinel) to optionalInt?(usingnil), following Swift conventions - Updated all test files to use the new Swift API conventions and struct initialization syntax
- Removed the WMFComponentsObjC target from Package.swift and eliminated the dependency on it
Reviewed changes
Copilot reviewed 90 out of 90 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Package.swift | Removed WMFComponentsObjC target and dependency |
| WMFSourceEditorFormatterTests.swift | Updated to use Swift API: struct initializers for colors/fonts, new method naming |
| WMFSourceEditorTextFrameworkMediatorTests.swift | Changed assertions from NSNotFound to nil for optional selectedMatchIndex |
| WMFComponentsObjC/** (all .h/.m files) | Deleted all Objective-C source files - migrated to Swift |
| WMFComponentsObjC/README.md | Removed (no longer needed for Objective-C bridging) |
| WMFComponentsObjC/include/** | Deleted all symlinked headers |
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.
Phabricator: N/A
Notes
Test Steps