Commit Graph

337 Commits

Author SHA1 Message Date
Igor Solomennikov
094fa0f30d
Allow attaching links to text stories with "Generate Link Previews" setting being OFF. 2022-09-21 14:55:49 -07:00
Harry
1710bf98d1
Fix iOS 16 UITextView sizing issue in OWSTableViewController2
* Fix iOS 16 UITextView sizing issue in OWSTableViewController2

* remove iOS 16 check, add iOS 17 canary check
2022-09-21 13:28:11 -07:00
Igor Solomennikov
19cf2d07f6 Change font weight for 'regular' text style in text stories from Bold to Medium. 2022-09-21 11:33:27 -07:00
Michelle Linington
4ada6b3a3f Derive bundle ID from an Xcode build setting
See [#5423][5423].

[5423]: https://github.com/signalapp/Signal-iOS/pull/5423
2022-09-21 18:10:42 +00:00
Igor Solomennikov
5c98fcfeb7
Updated look for link previews in text stories. 2022-09-20 12:57:22 -07:00
Igor Solomennikov
c8831ed921
Improved appearance for text on colored background in text story composer.
Also in photo editing UI - for text overlays.

Previous implementation used NSAttributedString's ability to set text background
color. Appearance wasn't impressive though as there wasn't a way to add padding
around the text or round corners for the background.

New approach is to add a rectangle background underneath the text - which
story viewer was already doing.
2022-09-20 12:52:43 -07:00
Evan Hahn
02494b048a
Hide left groups from various pickers
If you've left a group, we shouldn't show it in any pickers except the
blocking manager (`AddToBlockListViewController`). Before this commit,
we were showing it in a few places. That might let you sorta-send a
message to a group you'd left.

I enumerated all the places where we have pickers, and what their
behavior should be.

| Description                                                           | Code                                        | Show groups?             | Show left groups?        |
| --------------------------------------------------------------------- | ------------------------------------------- | ------------------------ | ------------------------ |
| Various group member pickers (adding members, group story recipients) | `BaseMemberViewController`                  | No                       | N/A                      |
| Send payment screen                                                   | `PaymentsSendRecipientViewController`       | No                       | N/A                      |
| Gift badging “choose recipient” screen                                | `BadgeGiftingChooseRecipientViewController` | No                       | N/A                      |
| Composer                                                              | `ComposeViewController`                     | Yes, only when searching | No                       |
| Add to block list (in Settings → Privacy)                             | `AddToBlockListViewController`              | Yes, only when searching | Yes, only when searching |
| Share sheet                                                           | `SharingThreadPickerViewController`         | Yes                      | No                       |
| Message forwarding                                                    | `ForwardMessageViewController`              | Yes                      | No                       |
| In-app camera                                                         | `CameraFirstCaptureSendFlow`                | Yes                      | No                       |
| Share group link via Signal                                           | `GroupLinkViewController`                   | Yes                      | No                       |
| Share sticker pack, from in a chat                                    | `StickerPackViewController`                 | Yes                      | No                       |
| Share sticker pack, from sticker management screen                    | `ManageStickersViewController`              | Yes                      | No                       |
| “New Group Story” screen                                              | `NewGroupStoryViewController`               | Yes (exclusively)        | No                       |

This doesn't intend to change the behavior of *deleted* groups. Those
will show up when searching if groups are shown at all. For example, a
deleted group will show in the composer if you search for it just like
any other group. A deleted group will *not* show in the "send payment"
screen because groups are never shown there. Again, the behavior around
deleted groups should remain unchanged.

Co-authored-by: Max Radermacher <max@signal.org>
2022-09-20 14:36:36 +00:00
Harry
e2b5570646
Compensate for extra status bar height on iPhone 14 pro devices
* Compensate for extra status bar height on iPhone 14 pro devices

* use string sysctlKey

* more commenting
2022-09-19 15:46:17 -07:00
Sasha Weiss
c96144ad38
Always configure the textLabel in a CVComponentSysteMessage 2022-09-19 14:14:50 -07:00
Harry
ae4837e600
Segment story videos longer than 30s
* initial approach commit, needs cleanup

* Keep >30s videos for non-story recipients, but split for stories

* Some cleanup

* fix too many chats toast offset

* show tooltip in the send flow

* pr feedback
2022-09-16 15:29:44 -07:00
Evan Hahn
4d55d95869 Autofix SwiftLint whitespace issues
I recommend reviewing this with whitespace changes disabled.
2022-09-15 16:37:44 +00:00
Sasha Weiss
6aaf11b5d8
Update indentation in GroupManager+GroupInvites 2022-09-14 11:53:41 -07:00
Igor Solomennikov
607fdc810e
Add support for multi-point gradient background in text stories.
Also update palette of background colors and gradients to latest spec.
2022-09-14 08:26:23 -07:00
Nora Trapp
ae6b55b1bf Hide some extraneous back button labels 2022-09-12 15:35:02 -07:00
Nora Trapp
ad34089ffe Sync group stories with storage service 2022-09-12 12:00:14 -07:00
Igor Solomennikov
a6ff75a24c
Text story composer
* Hide camera controls when switching to TEXT.

* Streamline camera capture session state tracking.

Stop camera when switching to TEXT.

* Basic text story composer.

All UI works, but needs fine-tuning and tapping on Next (->) doesn't do anything.

* Run auto-genstrings.

* Adjust text size and alignment as user enters text.

1..49 characters: 34 pt, center-aligned.
50..199 characters: 24 pt, center-aligned.
200.. characters: 18 pt, natural alignment.

* Change default text color in text story composer to white.

* Added support for changing background of text story composer.

Selection is allowed from palette of 5 gradients and 11 solid colors.

* Improve vertical alignment of text in text story composer.

Text (and possible link preview panel in the future) should be vertically
centered in the area above either bottom controls or onscreen keyboard.

* Add UI for attaching a link preview to a text story.

* Add support for posting text stories.

* Lint.
2022-09-12 11:38:28 -07:00
Nora Trapp
565ffe4f5a Don't show story ring on note-to-self 2022-09-12 11:23:23 -07:00
Nora Trapp
b60a862e17 allow choosing if you want to view story or avatar 2022-09-12 11:23:23 -07:00
Nora Trapp
da9f52c67d Update conversation split view styling 2022-09-12 10:48:28 -07:00
Nora Trapp
6dc57c6eb0 Don't allow sending stories to groups you are no longer a member of 2022-09-12 10:38:47 -07:00
Nora Trapp
86be80dbd7 Add story info sheet 2022-09-12 10:36:15 -07:00
Nora Trapp
248dbd1263 Restrict media quality when sending to stories 2022-09-12 10:17:28 -07:00
Nora Trapp
9bd91f66b6 Allow turning off stories 2022-09-12 10:14:09 -07:00
Nora Trapp
95ddec00b5 Redesigned story privacy settings 2022-09-12 10:14:09 -07:00
Nora Trapp
de0ef9444b Fix some usage of NSLocalizedString 2022-09-11 10:36:23 -07:00
Nora Trapp
73316f2420 Notify for replies to group stories 2022-09-08 17:12:24 -07:00
Nora Trapp
66c25a4afd Batch update identity keys and present safety number sheet on camera first and sharing flows 2022-09-08 09:42:43 -07:00
Nora Trapp
92d5207158 Batch lookup safety number changes when selecting conversations from conversation picker 2022-09-08 09:42:43 -07:00
Harry
9fe09ce980
Add context menu to story viewer
* Consolidate context menu actions into one class used by Stories list and my stories

* add context menu to story viewer

* change hidden stories header into a regular cell

* generate context menu at tap time to properly reload hidden state

* some cleanup

* pr feedback

* Add DelegatingContextMenuButton to maintain desired hooks without deviating ContextMenuButton's API from that of UIButton
2022-09-07 18:13:00 -07:00
Jordan Rose
3d312796e6
The in-app calling PiP should dodge the keyboard
- Dismissing the keyboard resets the PiP window to its original
  location, unless it's been moved since

- Tested against all of iPad's various keyboard modes (undocked /
  floating keyboards are ignored)
2022-09-07 15:41:23 -07:00
Evan Hahn
1fb1bb297a
Swiftify showUIForLaunchFailure
A pretty mechanical conversion.

There were a few weirder things that I called out in comments.
2022-09-07 14:42:01 -05:00
Nora Trapp
e1f770c40b Allow viewing sending state and resending failed stories from 'My Stories' view 2022-09-06 16:01:32 -07:00
Sasha Weiss
07a5e95d6a
Show the MemberActionSheet for tapped names in group system messages, reapplied 2022-09-06 14:40:01 -07:00
Harry
87d9e5df2a
Set story hidden state from stories view controller context menu
* Set hidden state from stories view controller context menu

* fix toasts when shown on controllers with UIScrollViews as their root views

* delete when hiding the onboarding story

* run translations script

* respond to pr feedback

* add hidden state to systemStoryManager

* use hidden state from SystemStoryManager for onboarding story

* remove unused method
2022-09-06 09:48:06 -07:00
Evan Hahn
03dd818cdb
"Add to Another Group": show archived groups, order by recency
Previously, archived groups didn't show up in the "Add to Another Group"
view. Now, they do!

This also orders groups entirely by recency.

This view used `ThreadViewHelper`, which (1) omitted archived groups
(2) had a bunch of dormant database observation code. I removed this
class and replaced it with some inline code that fetches groups.
2022-09-01 08:41:42 -05:00
Igor Solomennikov
a74c7e0885
Modify link preview panel UI used in stories viewer to allow its re-use.
• Extract the code into a new TextAttachmentView.LinkPreviewView class.
• Modify the code to accept wider variety of link preview data.
2022-08-31 16:53:38 -07:00
Evan Hahn
6737d09e22
ThreadViewModel no longer needs Objective-C interoperability
The last Objective-C reference to `ThreadViewModel` was removed in
793101f0e4, so we can remove a bunch of
`@objc` annotations.
2022-08-31 15:51:25 -07:00
Nora Trapp
09598d2e7a Add remote flag for stories 2022-08-31 13:34:24 -07:00
Harry
b9dd5cb63c
Use final avatar for system author (onboarding story)
* Use final avatar for system author (onboarding story)

* remove onboarding story feature flag
2022-08-30 16:45:37 -07:00
Evan Hahn
c77a8022ed Hide blocked contacts from recipient pickers
Because we don't show blocked contacts in the recipient picker, we can
also remove some code that checks for blocked contacts.
2022-08-30 22:36:59 +00:00
Igor Solomennikov
b5ee24febe
Fix an issue causing incorrect line wraps in media editor's text overlays.
When calculating layout size of the photo overlay text max width is capped at
how wide UITextView was during editing, with the purpose of preserving wrapping
between editor (UITextView) and overlay (CATextLayer).
Previously though, UITextView was set to auto-shrink its width to content size,
which caused max width to not be not enough after changing the font to a bolder variant.
The fix is to pin UITextView's width to view margins so that all available width
is always used when measuring text overlay height.
2022-08-30 10:36:41 -07:00
Meher Kasam
44431f1920 Add "Speak Message" accessibility feature
If "Speak Selection" is enabled in your iOS settings, you can now choose
to speak the message.

See [#5417][0] for more details.

Co-Authored-By: Evan Hahn <evanhahn@signal.org>

[0]: https://github.com/signalapp/Signal-iOS/pull/5417
2022-08-29 16:25:04 -05:00
Igor Solomennikov
6c1ed8d0dd
GradientView API improvement.
Allow to set just the gradient colors, without locations, relying on CAGradientLayer's
uniform color distribution logic.

Also update all the uses of GradientView to only specify colors because all the
places were using just two locations: 0 and 1.
2022-08-26 20:58:04 -07:00
Sasha Weiss
569cdb2aad
Durable jobs for leaving groups 2022-08-26 13:13:23 -07:00
Max Radermacher
6955b6f53a Revert tapping names in group system messages
- Revert "More flexible selection styling in CVTextLabel"
  (commit e1317d814c)

- Revert "Show the MemberActionSheet for tapped names in group system messages"
  (commit 48bc3c07d0)
2022-08-26 11:43:58 -07:00
Sasha Weiss
11e2729c49
Auto-leave groups when added by a blocked contact 2022-08-25 16:20:15 -07:00
Sasha Weiss
e1317d814c
More flexible selection styling in CVTextLabel 2022-08-25 15:33:28 -07:00
Sasha Weiss
48bc3c07d0
Show the MemberActionSheet for tapped names in group system messages 2022-08-25 13:03:38 -07:00
Jordan Rose
ecc48d7935 Remove dedicated "Call is Full" screen
With more information on the group call lobby screen, it doesn't make
sense to have the entire camera feed replaced with a "Call is Full"
message. Instead, disable the Join button as before, and show a toast
if the user taps on it anyway.
2022-08-24 12:15:48 -07:00
Jordan Rose
50e8ef7ed8 Extract TSGroupThread.sortedGroupMembers(...) from FullTextSearcher
This will be used for deterministically listing group members in the
group call lobby, hence some customization that FullTextSearcher
doesn't need.
2022-08-24 12:15:48 -07:00