Skip to content
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

vector-im/element-ios/issues/4976 - Replaced GrowingTextView with sim… #5052

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

stefanceriu
Copy link
Member

…pler, custom implementation. Cleaned up the RoomInputToolbar header.

@github-actions
Copy link

github-actions bot commented Oct 26, 2021

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/HFtfJn


NotificationCenter.default.addObserver(self, selector: #selector(textDidChange), name: UITextView.textDidChangeNotification, object: self)

if let heightConstraint = constraints.filter({ $0.firstAttribute == .height && $0.relation == .equal }).first {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this potentially break if someone added an equal heights constraint between the text view and something else in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Break might a a strong word. If there's another height constraint set and the textView detects it then it will set its height on that.
If there's 2 of them active at the same time for some reason you will either see breaking constraints or it will just work if the priorities are different.
Either way, it breaking shouldn't be a particularly hard problem to find or fix.

…tation. Cleaned up the RoomInputToolbar header.
@stefanceriu stefanceriu force-pushed the stefan/4976-input-toolbar-text-view branch from 318a46e to efa726b Compare October 26, 2021 14:41
@pixlwave
Copy link
Member

pixlwave commented Oct 26, 2021

A couple of things I've noticed in use:

  • Editing an existing message works, but cancelling the edit clears the composer without restoring the placeholder.
  • Selecting everything you've entered and deleted similarly doesn't restore the placeholder.

@stefanceriu stefanceriu merged commit 04aaec2 into develop Oct 27, 2021
@stefanceriu stefanceriu deleted the stefan/4976-input-toolbar-text-view branch October 27, 2021 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants