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
Native Editor - Input view design + icon work #4729
Conversation
- plus minor font rename
- subheadline more closely matches design config default icon sizing of 16px
- Uses UIButton.Configuration for styling buttons - Allows SFSymbols to scale up as needed
- Using WKEditorHeaderSelectButton and WKEditorHeaderSelectScrollView for header selection - Using WKEditorMultiButton for other formatting options - Tweak input view title font size and make close button palette style.
- add top spacing - Allow theme button text to grow with dynamic type
+ delete old custom icons
image = UIImage(systemName: "plus.circle.fill", withConfiguration: configuration) | ||
} | ||
|
||
image = image?.withRenderingMode(.alwaysTemplate) |
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.
Was the idea to use the renderingMode
method argument 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.
@mazevedofs Good catch! Originally I thought I might need to be able to pass different rendering modes to support both palette and monochrome icons, but it turns out .alwaysTemplate
worked for both. I forgot to remove the parameter after that. I'll add that cleanup to my next PR.
|
||
let buttonConfig = createButtonConfig(image: image) | ||
button.configuration = buttonConfig | ||
button.configurationUpdateHandler = buttonConfigurationUpdateHandler(button:) |
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.
Cool! I didn't know about this!
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.
@mazevedofs yep, it's the newer style of button configuration for UIKit. I can't remember if this was required for this particular button, but I needed it to add padding to the buttons in WKEditorMultiButton
without triggering project warnings. We'll need to use a similar approach in WKSmallMenuButton
to remove those warnings.
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! (the comment I left is a minor detail so I'm merging it)
Phabricator:
https://phabricator.wikimedia.org/T344508
Notes
This wraps up the task with finalizing the new input view design as requested in this comment. I also did another pass at icons in the toolbars, find and replace, and navigation bar to improve dynamic type support.
Test Steps