Skip to content

Improve empty state UI for event list page#3112

Closed
Vachanbs wants to merge 2 commits intofossasia:devfrom
Vachanbs:improve-empty-events-ui
Closed

Improve empty state UI for event list page#3112
Vachanbs wants to merge 2 commits intofossasia:devfrom
Vachanbs:improve-empty-events-ui

Conversation

@Vachanbs
Copy link
Copy Markdown

@Vachanbs Vachanbs commented Mar 31, 2026

Description

This PR improves the empty state UI of the event list page.

Previously, when no events were available, the page displayed a simple message inside a table row. This update enhances the user experience by introducing a more structured and user-friendly layout, along with a clear call-to-action button to guide users toward creating their first event.


Changes Made

  • Replaced the plain "No events available" text with a styled UI block
  • Added a descriptive message for better clarity
  • Introduced a "Create Your First Event" button to improve usability
  • Ensured all text uses {% trans %} for internationalization support

File Modified

  • eventyay/app/eventyay/control/templates/control/event_list.html

How to Test

  1. Run the project locally

  2. Ensure there are no events in the database

  3. Navigate to the event list page

  4. Verify:

    • Improved message is displayed
    • Button is visible
    • Layout is centered and clean

Screenshots

afterimage After edit ---

Impact

Improves user experience and maintains consistency with Django internationalization practices.

Summary by Sourcery

Improve the empty state experience on the event list page when no events are present.

New Features:

  • Add a centered empty-state layout with heading, description, and primary action button to the event list page when there are no events.

Enhancements:

  • Replace the plain inline 'no events' message in the event list table with a more structured and visually prominent UI block using translatable text.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 31, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Enhances the empty-state UX for the event list by replacing the single-line placeholder row with a centered, styled block that includes descriptive copy and a primary call-to-action button, all fully wrapped in Django translation tags.

File-Level Changes

Change Details Files
Replace the minimal empty-state table row with a styled, centered empty-state block that includes messaging and a primary CTA button, ensuring text is translatable.
  • Replaced the single muted table cell text shown on empty event lists with a multi-line, centered empty-state layout using Bootstrap utility classes.
  • Added a heading, descriptive paragraph, and a primary button labeled "Create Your First Event" to guide users to create their first event when no events exist.
  • Wrapped all new empty-state strings in {% trans %} tags to preserve internationalization support.
  • Kept the empty-state content inside the existing {% empty %} branch while maintaining the table structure and column span.
app/eventyay/control/templates/control/event_list.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-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.

Hey - I've found 1 issue, and left some high level feedback:

  • Instead of hard-coding the href="/create", use a Django {% url %} tag pointing at the appropriate named view so this continues to work if routes change.
  • Align the indentation of the new {% empty %} block with the surrounding template markup to keep the HTML structure easier to read and maintain.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Instead of hard-coding the `href="/create"`, use a Django `{% url %}` tag pointing at the appropriate named view so this continues to work if routes change.
- Align the indentation of the new `{% empty %}` block with the surrounding template markup to keep the HTML structure easier to read and maintain.

## Individual Comments

### Comment 1
<location path="app/eventyay/control/templates/control/event_list.html" line_range="70" />
<code_context>
+    <div class="text-center mt-5 text-muted">
+      <h3>{% trans "No events available" %}</h3>
+      <p>{% trans "Looks like there are no events yet." %}</p>
+      <a href="/create" class="btn btn-primary mt-3">
+        {% trans "Create Your First Event" %}
+      </a>
</code_context>
<issue_to_address>
**suggestion:** Use Django URL reversing instead of a hardcoded "/create" path

This makes the link brittle if the URL pattern changes (e.g., prefixes, namespaces, localization). Use `{% url 'event-create' %}` (or the appropriate named URL) so the template stays in sync with the URLconf.

Suggested implementation:

```
      <a href="{% url 'event-create' %}" class="btn btn-primary mt-3">

```

1. Ensure that your URLconf defines a URL pattern with the name `event-create` that points to the event creation view.
2. If the actual URL name is different or namespaced (e.g., `control:event-create`), adjust the `{% url %}` tag accordingly: `{% url 'control:event-create' %}`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

<div class="text-center mt-5 text-muted">
<h3>{% trans "No events available" %}</h3>
<p>{% trans "Looks like there are no events yet." %}</p>
<a href="/create" class="btn btn-primary mt-3">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Use Django URL reversing instead of a hardcoded "/create" path

This makes the link brittle if the URL pattern changes (e.g., prefixes, namespaces, localization). Use {% url 'event-create' %} (or the appropriate named URL) so the template stays in sync with the URLconf.

Suggested implementation:

      <a href="{% url 'event-create' %}" class="btn btn-primary mt-3">

  1. Ensure that your URLconf defines a URL pattern with the name event-create that points to the event creation view.
  2. If the actual URL name is different or namespaced (e.g., control:event-create), adjust the {% url %} tag accordingly: {% url 'control:event-create' %}.

@mariobehling
Copy link
Copy Markdown
Member

We are closing this PR.

This PR does not meet the minimum requirements for review.

  • There is no linked issue, so it is unclear what problem this PR is solving or whether it aligns with project priorities.

  • For UI or workflow-related changes, we require clear evidence that the solution works as intended. This includes:

    • screenshots showing before and after behavior
    • a screencast demonstrating the full user flow
    • clear test steps and explanation of what was validated

None of this has been provided here.

Without this information, reviewers would need to reproduce and verify the changes themselves, which shifts the responsibility from the contributor to the reviewer. This is not acceptable.

Please ensure that future PRs:

  • are linked to a relevant issue
  • are complete and properly tested in a running environment
  • include all required documentation and visual proof

We are happy to review once these requirements are met.

@github-project-automation github-project-automation bot moved this from Backlog to Done in Eventyay Next Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants