Skip to content

Comments

fix(todo-list-table): update include done tasks toggle logic #175

Merged
yesyash merged 2 commits intodevelopfrom
fix/show-doneTask-toggle
Aug 8, 2025
Merged

fix(todo-list-table): update include done tasks toggle logic #175
yesyash merged 2 commits intodevelopfrom
fix/show-doneTask-toggle

Conversation

@AnujChhikara
Copy link
Contributor

@AnujChhikara AnujChhikara commented Aug 8, 2025

Date: 8 Aug 2025

Developer Name: @AnujChhikara


Issue Ticket Number

  • Include done task toggle not visible on default page

Description

  • create a variable to store the logic to show the done task toggle button and based on that render the toggle

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1 image

Test Coverage

Screenshot 1

Additional Notes

Note

I'm currently writing a description for your pull request. I should be done shortly (<1 minute). Please don't edit the description field until I'm finished, or we may overwrite each other. If I find nothing to write about, I'll delete this message.

Description by Korbit AI

What change is being made?

Update the logic for displaying the 'Include Done Tasks' toggle by using the showIncludeDoneTasksToggle variable to check for the current tab.

Why are these changes being made?

This change ensures the 'Include Done Tasks' toggle is visible when the user is viewing either the 'All' tab or when no specific tab is selected, improving user experience by consistent handling of the toggle across relevant views without dependency on directly referencing the specific tab.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Summary by CodeRabbit

  • New Features
    • The "Include Done" toggle is now visible in the search bar when either the "All" tab is selected or no tab is selected, improving accessibility to this filter option.

Walkthrough

A new boolean constant is introduced in the todo-list-table.tsx component to determine when the "Include Done" toggle should be displayed. The condition for rendering this toggle now checks if the current tab is "All" or if no tab is selected, instead of only when the "All" tab is active.

Changes

Cohort / File(s) Change Summary
Todo List Table Toggle Logic
components/todo-list-table.tsx
Added a boolean constant to broaden the condition for rendering the "Include Done" toggle, now showing it when the tab is "All" or not selected.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

bug

Poem

A toggle appears, now broad and bright,
Whether "All" or none, it shines its light.
Tasks done or not, you choose the view—
The code’s more clear, the logic new.
🐇 With every hop, the UI grows right!

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/show-doneTask-toggle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues... but I did find this shark.

                (`.
                 \ `.
                  )  `._..---._
\`.       __...---`         o  )
 \ `._,--'           ,    ___,'
  ) ,-._          \  )   _,-'
 /,'    ``--.._____\/--''
Files scanned
File Path Reviewed
components/todo-list-table.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@coderabbitai coderabbitai bot added the bug Something isn't working label Aug 8, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
components/todo-list-table.tsx (1)

220-231: Ensure Switch is controlled with a boolean to avoid controlled/uncontrolled warnings.

includeDone is optional; when undefined the Switch may become uncontrolled. Coerce to boolean.

Apply this diff:

-            <Switch
+            <Switch
               id="includeDoneTasks"
-              checked={includeDone}
+              checked={!!includeDone}
               onCheckedChange={(checked) => onIncludeDoneChange?.(!!checked)}
             />

Optional: If this component can appear multiple times on a page, consider using a unique id via useId() for the id/htmlFor pair to avoid collisions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7c6fd9 and f64d5ad.

📒 Files selected for processing (1)
  • components/todo-list-table.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: shubhdevelop
PR: Real-Dev-Squad/todo-frontend#35
File: components/SimmerSkeleton.tsx:0-0
Timestamp: 2025-03-16T10:34:22.088Z
Learning: The shimmer component in the todo app should maintain the app's color palette (white, indigo-50) without making colors configurable, as it's designed specifically for this application.

MayankBansal12
MayankBansal12 previously approved these changes Aug 8, 2025
@yesyash yesyash merged commit 9be4606 into develop Aug 8, 2025
3 checks passed
@yesyash yesyash deleted the fix/show-doneTask-toggle branch August 8, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants