Skip to content

Add empty state illustration when History or Rules lists are empty #5

Description

@vssinghh

🎯 Summary

When the History or Rules screens have no items, the user sees a blank screen. Add a friendly empty state with an icon and message to guide the user.

📍 Where to Look

  • app/src/main/java/com/hush/app/ui/screens/history/HistoryScreen.kt — The LazyColumn for history logs
  • app/src/main/java/com/hush/app/ui/screens/rules/RulesScreen.kt — The rules list

✅ What to Do

  1. Check if the list is empty before rendering the LazyColumn
  2. If empty, show a centered column with:
    • A Material icon (e.g., Icons.Outlined.Notifications for History, Icons.Outlined.Rule for Rules)
    • A friendly title like "No notifications yet" or "No rules created"
    • A subtitle with guidance like "Filtered notifications will appear here" or "Say something in Chat to create your first rule"
  3. Use MaterialTheme.colorScheme.onSurfaceVariant for muted text styling

🧪 How to Verify

  • Fresh install or clear app data
  • Open History tab — should show the empty state illustration
  • Open Rules tab — should show the empty state illustration
  • Create a rule — the empty state should disappear and the rule should appear

💡 Hints

  • Use a simple if/else around the LazyColumn — no complex logic needed
  • Look at how other Material 3 apps handle empty states for design inspiration

A small polish that makes the app feel much more professional! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIUser interface changesenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions