New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Native Source Editor - Part 1 #4521
Conversation
I can reproduce this bug in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soooo cool seeing this come together! I ignored text theming stuff as I assume it's coming in forthcoming PRs. Just a couple of minor notes in PageEditorViewController
, but happy to merge as-is.
@@ -1853,6 +1854,7 @@ - (void)updateAppThemeIfNecessary { | |||
if (self.theme != theme) { | |||
[self applyTheme:theme]; | |||
[self.settingsViewController loadSections]; | |||
[self setWKAppEnvironmentThemeWithTheme: theme]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note for forthcoming PRs that we'd eventually need to also pass along the trait collection changes so the font scaling respects our design intents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - this is updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff
func pageEditorDidCancelEditing(_ pageEditor: PageEditorViewController, navigateToURL: URL?) | ||
} | ||
|
||
class PageEditorViewController: UIViewController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mark this as final
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, done!
// MARK: - WKSourceEditorViewControllerDelegate | ||
|
||
extension PageEditorViewController: WKSourceEditorViewControllerDelegate { | ||
func sourceEditorViewControllerDidTapFind(sourceEditorViewController: Components.WKSourceEditorViewController) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Components.
namespace prefix is unneeded here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
…o source-editor-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great!
Phabricator:
https://phabricator.wikimedia.org/T331936
Notes
This PR adds the native editor feature flag and implements the initial pieces of it within
PageEditorViewController
. I also added a full source edit button inArticleViewController
, so that we can test performance against a large set of wikitext as we build this. The entry point of this full source edit button is likely to change before release, though.Note I found a bug in the default automatic theme switching in this branch. Marking as draft while I look into that.
Test Steps