Skip to content

Improve empty events UI#3129

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

Improve empty events UI#3129
Vachanbs wants to merge 5 commits intofossasia:devfrom
Vachanbs:improve-empty-events-ui

Conversation

@Vachanbs
Copy link
Copy Markdown

@Vachanbs Vachanbs commented Apr 1, 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.


Changes Made

  • Replaced plain text with a structured UI block
  • Added descriptive message for clarity
  • Added "Create Your First Event" button
  • Used Django URL reversing instead of hardcoded paths
  • Ensured all text uses {% trans %} for internationalization
  • Added accessibility improvements using ARIA attributes

File Modified

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

Impact

Improves usability, accessibility, and maintainability of the event list page.

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.

Sorry @Vachanbs, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@Vachanbs
Copy link
Copy Markdown
Author

Vachanbs commented Apr 1, 2026

Added accessibility improvements (ARIA attributes) to the empty state UI.

@Saksham-Sirohi
Copy link
Copy Markdown
Collaborator

Please mention what issue this solves and attach screenshots

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Video Admin event list empty state (control/event_list.html) to replace the current “no events” table-row message with a more structured, call-to-action focused layout.

Changes:

  • Reformats the event list template markup and spacing.
  • Replaces the {% empty %} table row with a richer empty-state block (headline, description, CTA button).
  • Adds/adjusts accessibility-related attributes in the empty state and action UI.

Comment on lines +1 to +2
{% extends "pretixcontrol/admin/base.html" %} {% load i18n %} {% block
video_admin_content %}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The opening template tags are broken across lines: {% block on line 1 is not closed until line 2, which will raise a Django TemplateSyntaxError. Keep {% extends %}, {% load %}, and {% block video_admin_content %} as complete tags (typically one per line).

Suggested change
{% extends "pretixcontrol/admin/base.html" %} {% load i18n %} {% block
video_admin_content %}
{% extends "pretixcontrol/admin/base.html" %}
{% load i18n %}
{% block video_admin_content %}

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +8
{% trans "Overview of events managed by the Video Admin. Use the table actions
to manage settings, generate admin tokens, or clear data." %}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The {% trans %} string literal spans multiple lines, which will embed a newline and indentation into the translation key and rendered output. Use a single-line {% trans %} string or switch to {% blocktrans trimmed %} for multiline text.

Suggested change
{% trans "Overview of events managed by the Video Admin. Use the table actions
to manage settings, generate admin tokens, or clear data." %}
{% blocktrans trimmed %}Overview of events managed by the Video Admin. Use the table actions
to manage settings, generate admin tokens, or clear data.{% endblocktrans %}

Copilot uses AI. Check for mistakes.
</a>
{% endif %}
{% if event.domain %}
<a href="https://{{ event.domain }}" target="_blank">
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Links opened with target="_blank" should include rel="noopener" (or noopener noreferrer) to prevent tabnabbing and avoid giving the new page access to window.opener.

Suggested change
<a href="https://{{ event.domain }}" target="_blank">
<a href="https://{{ event.domain }}" target="_blank" rel="noopener noreferrer">

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +94
<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary mt-3"
aria-label="{% trans 'Create your first event' %}">
{% trans "Create Your First Event" %}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The empty-state CTA says “Create Your First Event” but links to control:organizers.add (create organizer). This is likely the wrong destination for an event-list empty state; link to the video admin event creation route instead (e.g. the same namespace used for cloning: eventyay_admin:video_admin:event.create) or adjust the button text to match the actual action.

Suggested change
<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary mt-3"
aria-label="{% trans 'Create your first event' %}">
{% trans "Create Your First Event" %}
<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary mt-3"
aria-label="{% trans 'Create your first organizer' %}">
{% trans "Create Your First Organizer" %}

Copilot uses AI. Check for mistakes.
Comment on lines +83 to +92
<div class="text-center mt-5 text-muted">

<h3 class="fw-bold" role="status">
{% trans "No events available" %}
</h3>

<p>{% trans "Looks like there are no events yet." %}</p>

<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary mt-3"
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The empty-state markup uses utility classes like mt-5 and fw-bold, but this admin UI is built on Bootstrap 3.4.1 and there is no .mt-5/.fw-bold defined in the repository stylesheets. This means the spacing/bold styling likely won’t apply; consider using existing Bootstrap 3 classes or add a dedicated class with CSS.

Suggested change
<div class="text-center mt-5 text-muted">
<h3 class="fw-bold" role="status">
{% trans "No events available" %}
</h3>
<p>{% trans "Looks like there are no events yet." %}</p>
<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary mt-3"
<div class="text-center text-muted" style="margin-top: 30px;">
<h3 role="status">
{% trans "No events available" %}
</h3>
<p>{% trans "Looks like there are no events yet." %}</p>
<a href="{% url 'control:organizers.add' %}"
class="btn btn-primary"
style="margin-top: 15px;"

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +50
<span class="fa fa-trash"></span> {% trans "Delete data" %}
</a>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Decorative FontAwesome icons should be marked aria-hidden="true" to avoid noise for screen readers (see similar patterns in other video admin templates).

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +60
<span class="fa fa-lock"></span> {% trans "Admin access" %}
</a>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Decorative FontAwesome icons should be marked aria-hidden="true" to avoid noise for screen readers (see similar patterns in other video admin templates).

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +69
<span class="fa fa-clone"></span> {% trans "Clone" %}
</a>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Decorative FontAwesome icons should be marked aria-hidden="true" to avoid noise for screen readers (see similar patterns in other video admin templates).

Copilot uses AI. Check for mistakes.
Comment on lines +76 to +77
<span class="fa fa-pencil"></span> {% trans "Edit" %}
</a>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Decorative FontAwesome icons should be marked aria-hidden="true" to avoid noise for screen readers (see similar patterns in other video admin templates).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@ArnavBallinCode ArnavBallinCode left a comment

Choose a reason for hiding this comment

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

thanks for the contribution, please add screenshots for the UI changes (before/after)?

Copy link
Copy Markdown
Member

@ArnavBallinCode ArnavBallinCode left a comment

Choose a reason for hiding this comment

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

also do address ai reviews

Copy link
Copy Markdown
Member

@ArnavBallinCode ArnavBallinCode left a comment

Choose a reason for hiding this comment

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

Please add screenshots for the UI changes (before/after)

@Saksham-Sirohi
Copy link
Copy Markdown
Collaborator

Closing as no proper response to the reviews and a denial to provide screenshots. Thank you for your contribution. Feel free to open it again properly

@github-project-automation github-project-automation Bot moved this from Backlog to Done in Eventyay Next Apr 18, 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.

4 participants