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

USER STORY: Update all tabs' content & counts when tasks are watched/unwatched #124

Closed
11 tasks done
blahosyl opened this issue Aug 13, 2024 · 1 comment
Closed
11 tasks done
Assignees
Labels
e: ux tasks Epic: UX for Tasls p: should have Priority: High value but not crucial

Comments

@blahosyl
Copy link
Owner

blahosyl commented Aug 13, 2024

As a Logged-in User,

I want to see the count of tasks I'm watching be updated in real time,

so that can be informed of the change without reloading the page.

Acceptance Criteria

When tasks are watched/unwatched in other tabs,

  1. Tab counts of watched tasks
  2. The list of watched tasks
    is updated without reloading the page

Tasks

Update tasks in all columns when a task is watched/unwatched

  • implement changedWatch & setChangedWatch state in TaskTabs & ProfileDetail
  • pass it down to TaskList / TaskKanban on all tabs
  • destructure changedWatch & setChangedWatch in TaskList / TaskKanban , pass it down to Task
  • in TaskList / TaskKanban in useEffect(), add changedWatch, setChangedWatch to the triggers of the function
  • in TaskList / TaskKanban in useEffect(), add setChangedWatch(false); under setHasLoaded(false);
  • destructure changedWatch & setChangedWatch in Task
  • in Task, add setChangedWatch(true); to handleWatch & handleUnwatch ()
  • in ProfileDetail, also get the list of tasks with fetchData

Update the counts of all watched columns when

  • fetch the Profile data of the currentUser, so that assigned_count, watched_count & owned count are updatedwhen the logged-in user watches/unwatches a task.
    Implemented using the fetchData function from ProfileDetail, rewritten as fetchProfileData in TaskList. However, fetchData is also used in TaskTab, so maybe this implementation would be preferred.
  • implement logic for updating counts in ProfileDetail
  • implement logic for updating counts in TaskKanban OR move rendering logic from TaskKanban to TaskDetail, and render list or kanban conditionally depending on the taskList prop within the TaskList component
@blahosyl blahosyl self-assigned this Aug 13, 2024
@blahosyl blahosyl moved this to Todo in Task Manager Aug 13, 2024
@blahosyl blahosyl added p: could have Priority: Nice to have e: ux tasks Epic: UX for Tasls labels Aug 13, 2024
@blahosyl blahosyl moved this from Todo to In Progress in Task Manager Aug 14, 2024
blahosyl added a commit that referenced this issue Aug 14, 2024
move `changeWatch` to `TaskTabs & pass it down the component tree
blahosyl added a commit that referenced this issue Aug 14, 2024
@blahosyl blahosyl changed the title USER STORY: Update tab counts when tasks are watched/unwatched USER STORY: Update all tabs' content & counts when tasks are watched/unwatched Aug 14, 2024
blahosyl added a commit that referenced this issue Aug 14, 2024
blahosyl added a commit that referenced this issue Aug 14, 2024
works but it takes a while to settle down, and the number goes back and forth
@blahosyl blahosyl added p: should have Priority: High value but not crucial and removed p: could have Priority: Nice to have labels Aug 14, 2024
@blahosyl
Copy link
Owner Author

Further streamlining of the code might be possible #132

@github-project-automation github-project-automation bot moved this from In Progress to Done/Won't do in Task Manager Aug 15, 2024
blahosyl added a commit that referenced this issue Aug 15, 2024
blahosyl added a commit that referenced this issue Aug 16, 2024
after the restructuring of `TaskKanban` to `TaskList`, we also need to pass the `taskTlist` prop to `TaskList` in `ProfileDetail`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: ux tasks Epic: UX for Tasls p: should have Priority: High value but not crucial
Projects
Status: Done/Won't do
Development

No branches or pull requests

1 participant