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

BUG: Deleted task pages show empty task card #129

Closed
blahosyl opened this issue Aug 14, 2024 · 5 comments
Closed

BUG: Deleted task pages show empty task card #129

blahosyl opened this issue Aug 14, 2024 · 5 comments
Assignees
Labels
e: ux tasks Epic: UX for Tasls e: view tasks Epic: View tasks p: should have Priority: High value but not crucial

Comments

@blahosyl
Copy link
Owner

Image

It should show a "not found" page.

@blahosyl blahosyl moved this to Todo in Task Manager Aug 14, 2024
@blahosyl blahosyl added this to the Sprint 3: UX & styling milestone Aug 14, 2024
@blahosyl blahosyl self-assigned this Aug 14, 2024
@blahosyl blahosyl added p: should have Priority: High value but not crucial e: view tasks Epic: View tasks labels Aug 14, 2024
@blahosyl
Copy link
Owner Author

This occurs both on Dev and Prod. The Admin panel shows that the tasks are deleted from the database.

blahosyl added a commit that referenced this issue Aug 14, 2024
@blahosyl
Copy link
Owner Author

Clearing the Cache does not work. Error message about redirecting.

Image

@blahosyl
Copy link
Owner Author

blahosyl commented Aug 14, 2024

This also happens if a task is deleted on the Admin panel.

It also happens in the Walkthrough project:

Image

@blahosyl
Copy link
Owner Author

blahosyl commented Aug 14, 2024

One of my attempts at a solution was to put all of the rendering in TaskDetail into a conditional clause checking if task exists, otherwise render the NotFound page. This failed to work. Similarly, checking for task.id failed.

I theorized that this is because these 2 variables are defined in the component, and must exist so that the app knows which task the user wants to see. However, task.title is empty if the task has been deleted, and it must not be empty for any existing tasks, since it's a compulsory field. Setting this as the condition for rendering the TaskDetail page received the desired result for deleted pages.

ed35c35

@blahosyl blahosyl added the e: ux tasks Epic: UX for Tasls label Aug 14, 2024
@blahosyl blahosyl moved this from In Progress to Done/Won't do in Task Manager Aug 14, 2024
@blahosyl blahosyl closed this as completed by moving to Done/Won't do in Task Manager Aug 14, 2024
@blahosyl blahosyl reopened this Aug 14, 2024
@github-project-automation github-project-automation bot moved this from Done/Won't do to In Progress in Task Manager Aug 14, 2024
@blahosyl
Copy link
Owner Author

blahosyl commented Aug 14, 2024

The change in ed35c35 also caused TaskDetail pages for existing tasks to show a "Not Found" page (I suspect because the rendering conditional kicked in before the data were received from the API.

Instead, I used the setLoaded logic from TaskList and implemented in in TaskDetail as well.

blahosyl added a commit that referenced this issue Aug 14, 2024
`task.title` also caused existing task pages not to render
@github-project-automation github-project-automation bot moved this from In Progress to Done/Won't do in Task Manager Aug 14, 2024
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 e: view tasks Epic: View tasks p: should have Priority: High value but not crucial
Projects
Status: Done/Won't do
Development

No branches or pull requests

1 participant