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: change heading based on filter #195

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

elle-l-em
Copy link

Description

Change the heading text so that it reflects the current tab. Previously, all tabs said "remaining", now they say:

  • All: "N tasks"
  • Active: "N tasks remaining" (same as before)
  • Completed: "N tasks completed"

Motivation

I started using this and was confused that when I went to my completed tasks, it said those tasks were still "remaining". All the tab filters say "remaining" but I think of "remaining" tasks as the tasks still left to do, not the completed ones. Now the header text appropriately reflects the active filter.

Additional details

None

Related issues and pull requests

None

Copy link

It looks like this is your first pull request. 🎉
Thank you for your contribution! One of the project maintainers will triage
and assign the pull request for review. We appreciate your patience. To
safeguard the health of the project, please take a moment to read our
code of conduct.

@bsmth bsmth self-requested a review August 26, 2024 11:35
@bsmth bsmth added the needs content update Needs update to the content repo to support this change. label Aug 29, 2024
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Nice, thank you. I think that's a good improvement. Would you be able to also update the doc here?

https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state#deleting_tasks_from_state_and_ui

We can add a new section about making the heading consistent, showing the code addition here, then update the final code block at the end of the article. Does that make sense?

@bsmth bsmth changed the title Change heading based on filter feat: change heading based on filter Aug 29, 2024
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months. needs content update Needs update to the content repo to support this change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants