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

Notifications: Adds the green dot badge to the notification tab #443

Merged
merged 8 commits into from
Nov 16, 2018

Conversation

bummytime
Copy link
Member

This PR adds the ability to show/hide a "green dot badge" on any tab in MainTabBarController via the showDotOn(_ tab: WooTab) and hideDotOn(_ tab: WooTab) funcs. I also added a simple UIView fade in/out animation helper in a new UIView+Animation.swift extension.

note_dot

This badge is temporarily wired up in NotificationsViewController looking for unread notes when the resultsController updates. This logic should be removed when PushNotificationManager is added.

Ref: #19

Testing

  1. Build and run the app and open the notifications tab
  2. On the web, place a new order
  3. Pull-to-refresh on the notification list screen— Verify the green dot badge fades in
  4. Mark all as read — Verify the green dot badge fades out

Feel free to test multiple devices and in both landscape & portrait orientations.

@jleandroperez could you take a peek at this?

… issue/19-green-dot

* 'develop' of github.com:woocommerce/woocommerce-ios:
  Quick fix for notifications navbar button
  Tweaked NoteTableViewCell.xib for dynamic type
  OrderLoaderViewController: Updating reloadOrder Hook
  Revert "Revert to this commit to test OrderLoader Failure State"
  Revert to this commit to test OrderLoader Failure State
  Implementing OrderLoaderViewController
  NotificationsViewController: Wiring OrderLoaderVIewController
  OrderDetailsViewController: Adding comment
  Updating Project
  Orders.storyboard: Updating ViewController Identifier
  MetaContainer: New Key
  UIStoryboard: Woo Methods
  Use 'cocoapods-repo-update' CocoaPods plugin
@bummytime bummytime added the feature: notifications Related to notifications or notifs. label Nov 16, 2018
@bummytime bummytime added this to the 0.11 milestone Nov 16, 2018
@bummytime bummytime self-assigned this Nov 16, 2018
@bummytime bummytime added this to MVLP Backlog in MVLP Kanban Board via automation Nov 16, 2018
@bummytime bummytime moved this from MVLP Backlog to Review/Testing in MVLP Kanban Board Nov 16, 2018
@astralbodies astralbodies mentioned this pull request Nov 16, 2018
39 tasks
Copy link
Collaborator

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

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

Works exactly as advertised!!!

:shipit:

@wpmobilebot
Copy link
Collaborator

SwiftLint found issues

Warnings

File Line Reason
NotificationsViewController.swift 472 Lines should not have trailing whitespace.

Generated by 🚫 Danger

@bummytime bummytime merged commit dd80f1a into develop Nov 16, 2018
MVLP Kanban Board automation moved this from Review/Testing to Done/Merged Nov 16, 2018
@bummytime bummytime deleted the issue/19-green-dot branch November 16, 2018 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: notifications Related to notifications or notifs.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants