-
Notifications
You must be signed in to change notification settings - Fork 149
Extend title view for big titles #393
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
Conversation
# Conflicts: # Example/Example/EditorDemoController.swift
|
|
||
| // MARK: - Title and Title placeholder position methods | ||
| func updateTitleHeight() { | ||
| let sizeThatShouldFitTheContent = titleTextField.sizeThatFits(CGSize(width:self.view.frame.size.width - ( 2 * Constants.margin), height: CGFloat.greatestFiniteMagnitude)) |
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.
Maybe move the CGSize instantiation one line upwards, to aid readability?
- No need to use
selfnorsize.view.frame.widthshould do the trick!
| } | ||
|
|
||
| func updateTitlePlaceholderVisibility() { | ||
| self.titlePlaceholderLabel.isHidden = !self.titleTextField.text.isEmpty |
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.
No need to use self
|
Only thing i'm not really sure about is: since we don't currently support "Scrolling the Title" to get it out of the way, in the multiline title scenario, users might end up with something like this: Note that "Line 1 ... 3" cannot be scrolled, and the edition area ends up being quite tight (this is on the iPhone SergioEstevao!). Thoughts on this one? (Maybe we wanna delay this a bit until we can also implement the scrollabe title behavior, or merge it, but cap the mechanism to just one line, temporarily?) |
|
@jleandroperez I will tackle the title view scrolling out of the way next. Just after this PR is in. |
jleandroperez
left a comment
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.
Sounds good to me @SergioEstevao!. Worst case scenario, we can always cap the title's height, temporarily.
Nice work!
![]()
* Add AztecUITests to AztecExample scheme * Add tests for #393 * Add #675 UI test and some refactoring * Add #465 UI test * Make tests work on iPhone SE * Updates after PR review * Add tests #771 & #768 * dont do missclick when mediaButton is not Hittable * Reset simulator state before test run * Check programatically whenever options strip is in expanded postion * minor changes, some work on PageObject refactoring * fix project structure * tweaking failed test * another tweak for failed test * tweak for swiping issue on iPhone SE * clean-up * Add some reliability to tests on bigger screens * Tests passing on iPads 🎉
* Add AztecUITests to AztecExample scheme * Add tests for #393 * Add #675 UI test and some refactoring * Add #465 UI test * Make tests work on iPhone SE * Updates after PR review * Add tests #771 & #768 * dont do missclick when mediaButton is not Hittable * Reset simulator state before test run * Check programatically whenever options strip is in expanded postion * minor changes, some work on PageObject refactoring * PageObject & first a bit complex formatting test * Add UnorderedListWithRemovedStyles test & some PO refactoring * Add complex styling test & further refactoring * Add few more tests 🎉 * New tests and refactoring: * Add more Formatting tests * Add Link related tests * Add AccesibilityIDs into EditorDemoControler * Refactor some tests to use PageObjects * fix locator name * Add Images Tests * Make tests pass on iPhone X

Closes #385
Relate to this: wordpress-mobile/WordPress-iOS#6824
On this PR I'm converting the Title to an UITextView to allow multiple lines and adjusting the size of it depending of the text inserted.
I'm also adding a placeholder label because UITextView doesn't have placeholder labels!
How to test: