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

feat: Activity Viewer #1769

Merged
merged 7 commits into from
Jun 22, 2024
Merged

feat: Activity Viewer #1769

merged 7 commits into from
Jun 22, 2024

Conversation

tom-ludwig
Copy link
Member

Description

  • Introduces an Activity Viewer in the CE's toolbar
  • Implements TaskNotificationHandler to efficiently manage task notifications.
  • Enhances task creation process by enabling new task notifications from any where within the workspace.
  • Initialises TaskNotificationHandler at the workspace level to ensure separation and independent handling of notifications.

Posting a new task notification is as easy as pie.

let uuidString = UUID().uuidString

func createTask() {
     let userInfo: [String: Any] = [
         "id": "uniqueTaskID",
         "action": "create",
         "title": "Task Title"
     ]
     NotificationCenter.default.post(name: .taskNotification, object: nil, userInfo: userInfo)
}

Available Methods

  • create:
    Creates a new Task Notification.
    Required fields: id (String), action (String), title (String).
    Optional fields: message (String), percentage (Double), isLoading (Bool).
  • createWithPriority:
    Creates a new Task Notification and inserts it at the start of the array.
    This ensures it appears in the activity viewer even if there are other task notifications before it.
    Note: This should only be used for important notifications!
    Required fields: id (String), action (String), title (String).
    Optional fields: message (String), percentage (Double), isLoading (Bool).
  • update:
    Updates an existing task notification. It's important to pass the same id to update the correct task.
    Required fields: id (String), action (String).
    Optional fields: title (String), message (String), percentage (Double), isLoading (Bool).
  • delete:
    Deletes an existing task notification.
    Required fields: id (String), action (String).
  • deleteWithDelay:
    Deletes an existing task notification after a certain TimeInterval.
    Required fields: id (String), action (String), delay (Double).
    Important: When specifying the delay, ensure it's a double.
    For example, '2' would be invalid because it would count as an integer, use '2.0' instead.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code
  • I have implemented tests for the newly added methods.

Screenshots

Screenshot 2024-06-21 at 6 58 16 PM
Screenshot 2024-06-21 at 6 58 21 PM

- Introduces an Activity Viewer in the CE's toolbar
- Implements TaskNotificationHandler to efficiently manage task notifications.
- Enhances task creation process by enabling new task notifications from any where within the workspace.
- Initialises TaskNotificationHandler at the workspace level to ensure separation and independent handling of notifications.
@0xWDG
Copy link
Collaborator

0xWDG commented Jun 22, 2024

Looks good, please fix the merge conflict, and the remaining lint errors.

@FastestMolasses FastestMolasses merged commit c1c3abb into main Jun 22, 2024
2 checks passed
@FastestMolasses FastestMolasses deleted the feat/438/activity-viewer branch June 22, 2024 20:54
@thecoolwinter thecoolwinter added the enhancement New feature or request label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Activity Viewer
4 participants