Skip to content

Conversation

MohamedAbd0
Copy link
Contributor

  • Automatically detects empty lists in API responses
  • Provides user-friendly empty states instead of blank screens
  • Supports various API response formats (direct arrays, nested data, etc.)
  • Maintains backward compatibility (optional parameter)
  • Follows UX best practices for empty state design

Description

dynamic_view widget to include the new emptyTemplate parameter.

  1. Added emptyTemplate to Properties Table: Updated the properties table to include the new emptyTemplate parameter with a clear description.

  2. Added Empty State Handling Section: Created a comprehensive example showing how to use the emptyTemplate with:

    • A practical e-commerce scenario
    • Proper empty state UI with icon, text, and action button
    • Best practices for styling empty states
  3. Added Empty Template Behavior Section: Explained exactly when the empty template is triggered with:

    • Three different scenarios with API response examples
    • Clear documentation of the detection logic
  4. Updated Best Practices: Enhanced the best practices section to emphasize:

    • Always providing empty templates for list views
    • Designing informative and actionable empty states

Related Issues

Closes #284

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

- Automatically detects empty lists in API responses
- Provides user-friendly empty states instead of blank screens
- Supports various API response formats (direct arrays, nested data, etc.)
- Maintains backward compatibility (optional parameter)
- Follows UX best practices for empty state design
@MohamedAbd0
Copy link
Contributor Author

Hi @divyanshub024, please review the suggested solution.

@divyanshub024
Copy link
Member

@MohamedAbd0 There are some conflicts. Can you please resolve them?

@MohamedAbd0
Copy link
Contributor Author

@divyanshub024, conflicts were resolved, Bro.

@divyanshub024 divyanshub024 merged commit d9541c5 into StacDev:dev Jun 19, 2025
4 checks passed
@divyanshub024
Copy link
Member

Thank you for your contribution @MohamedAbd0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Empty list check for api responses

2 participants