fix(ui): fix the default category#1295
Conversation
WalkthroughThe default value for the mail category selection in the Categories component was updated from 'Important' to 'All Mail'. This change affects which category is initially displayed when the component loads or when no category is specified in the query state. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CategoriesComponent
User->>CategoriesComponent: Load or reset component
CategoriesComponent->>CategoriesComponent: Initialize query state with default ('All Mail')
CategoriesComponent-->>User: Display mails in 'All Mail' category
Possibly related PRs
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/mail/components/mail/mail.tsx (1)
939-941: Avoid default-value duplication – extract a constant
'All Mail'is now hard-coded as the default in two separate hooks (CategoriesandCategorySelect).
If a future change alters the default again it’s easy to miss one site and create divergent behaviour.Consider lifting the string into a shared constant, e.g.
export const DEFAULT_CATEGORY = 'All Mail';and reference it from every
useQueryState('category', { defaultValue: DEFAULT_CATEGORY })call.
Merge activity
|
Description
fix this issue:

related issue: #1282
Type of Change
Please delete options that are not relevant.
Areas Affected
Please check all that apply:
Testing Done
Describe the tests you've done:
Security Considerations
For changes involving data or authentication:
Checklist
Additional Notes
Add any other context about the pull request here.
Screenshots/Recordings
Add screenshots or recordings here if applicable.
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.
Summary by CodeRabbit