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
[MBL-1027] Blocked User Messages UI #1887
Conversation
|
||
userBlockedBannerView.tag = -99 | ||
tabController.addChild(userBlockedBannerHostingController) | ||
tabController.view.addSubview(userBlockedBannerView) |
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.
adding the banner to the tabController rather than the ViewController directly. This helped to avoid some more specific styling that we would need to do in order to have this banner sit above the tab bar and not block the ViewController's content.
With this approach, we can simply call updateTableViewBottomContentInset
on viewDidAppear.
Kickstarter-iOS/Features/UserBlockedBanner/UserBlockedBannerView.swift
Outdated
Show resolved
Hide resolved
6cdabba
to
85b4a9b
Compare
85b4a9b
to
bd1022d
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1887 +/- ##
==========================================
- Coverage 83.74% 83.73% -0.01%
==========================================
Files 1222 1222
Lines 111440 111501 +61
Branches 29644 29665 +21
==========================================
+ Hits 93322 93363 +41
- Misses 17101 17118 +17
- Partials 1017 1020 +3 β View full report in Codecov by Sentry. |
Kickstarter-iOS/Features/Messages/Controller/MessagesViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/UserBlockedBanner/UserBlockedBannerView.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/Messages/Controller/MessagesViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/Messages/Controller/MessagesViewController.swift
Outdated
Show resolved
Hide resolved
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.
There are a couple things in here I have questions about before merging. My specific comments are inline in the code, but here are the three things I'd like to see addressed:
- New banner view, vs. re-using old banner view
- Suggestions for improving the code to display a banner from the tab bar controller
- Clarifying
participantIsBlocked
vs.userHasBeenBlocked
signals
@amy-at-kickstarter using the existing uikit banner. had to do some rework to control the dismissal of the banner, but i think I've addressed everything now. |
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.
I didn't run and test this, but looks good apart from the spelling error! (And you can already use the isBlocked
field on the creator if you'd like to.)
Kickstarter-iOS/Features/MessageBanner/Controller/MessageBannerViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/MessageBanner/Controller/MessageBannerViewController.swift
Show resolved
Hide resolved
Kickstarter-iOS/Features/MessageBanner/Controller/MessageBannerViewController.swift
Show resolved
Hide resolved
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.
LGTM. I also like @ifosli's suggestions!
π² What
If a user has blocked someone that they have a message thread with we need to disable the Reply button and inform users that they have blocked said user
π€ Why
If a user has blocked someone they will no longer receive new messages or be able to message them.
π How
Uses the same design that we had for the creator dashboard deprecation warning banner to inform users.
The isBlocked value is being hardcoded for now but this will be updated so that we get the isBlocked status from the backend instead in MBL-1024.
π See
| After π¦ |
| |
β Acceptance criteria
β° TODO