Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Eventyay Common: Create an event dashboard" #503

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

mariobehling
Copy link
Member

@mariobehling mariobehling commented Jan 9, 2025

Reverts #484

Summary by Sourcery

Remove the event dashboard.

Copy link

sourcery-ai bot commented Jan 9, 2025

Reviewer's Guide by Sourcery

This PR reverts the changes introduced in #484, which implemented an event dashboard. The revert removes the dashboard view and associated logic, including widgets, permissions checks, and context processors. It also simplifies the base template and removes styling related to the dashboard.

Class diagram showing removed EventIndexView and related components

classDiagram
    class EventIndexView {
        -template_name: str
        -rearrange(widgets)
        -_get_user_permissions()
        -_collect_dashboard_widgets()
        -_filter_log_entries()
        -_check_event_statuses()
        +get_context_data()
    }

    class Event {
        +talk_schedule_url
        +talk_session_url
        +talk_speaker_url
        -talk_dashboard_url
        -talk_settings_url
    }

    note for Event "Removed dashboard and settings URLs"
    note for EventIndexView "Entire class removed"
Loading

File-Level Changes

Change Details Files
Removed event dashboard view and logic
  • Deleted the organiser_dashboard, event_index_widgets_lazy, and EventIndexView functions and classes.
  • Removed dashboard-related imports and dependencies.
  • Simplified the organiser_dashboard function to only include basic context variables for ticket, talk, and video components.
src/pretix/eventyay_common/views/dashboards.py
Removed dashboard-related code from context processors
  • Removed logic for handling dashboard widgets and permissions checks.
  • Simplified the contextprocessor and _default_context functions.
  • Removed dashboard-specific context variables and settings.
  • Removed imports related to dashboard navigation and plugin enablement.
src/pretix/eventyay_common/context.py
Reverted changes in base template and styling
  • Removed the context selector dropdown from the base template.
  • Removed or adjusted CSS styles related to the dashboard layout and responsiveness.
src/pretix/eventyay_common/templates/eventyay_common/base.html
src/pretix/static/eventyay-common/scss/custom.scss
Removed event dashboard URLs and navigation
  • Removed URL patterns for the event dashboard and its widgets.
  • Removed navigation entries related to the event dashboard.
  • Removed or updated template files associated with the event dashboard and its components.
src/pretix/eventyay_common/urls.py
src/pretix/eventyay_common/navigation.py
src/pretix/eventyay_common/templates/eventyay_common/event/component_link.html
src/pretix/eventyay_common/templates/eventyay_common/event/fragment_dashboard.html
src/pretix/eventyay_common/templates/eventyay_common/event/index.html
Simplified event creation redirect
  • Changed the redirect after event creation to point to the event list page with a congratulations parameter instead of the event dashboard.
src/pretix/eventyay_common/views/event.py
Updated event links in various templates
  • Updated links pointing to the event dashboard to now point to the event update page.
src/pretix/control/templates/pretixcontrol/event/component_link.html
src/pretix/eventyay_common/templates/eventyay_common/events/index.html
Removed talk-related URL properties and updated talk URL generation
  • Removed talk_dashboard_url and talk_settings_url properties.
  • Updated talk_schedule_url, talk_session_url, and talk_speaker_url properties to use settings.TALK_HOSTNAME instead of a global variable.
src/pretix/base/models/event.py
Removed subevent retrieval utility
  • Removed the get_subevent function used to retrieve subevent information from request parameters.
src/pretix/eventyay_common/utils.py

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

@mariobehling mariobehling merged commit daba8fa into development Jan 9, 2025
3 of 5 checks passed
Copy link

@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 @mariobehling - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

Comment on lines +1138 to 1139
url = urljoin(talk_host, f"{self.slug}/schedule")
return url
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Inline variable that is immediately returned (inline-immediately-returned-variable)

Suggested change
url = urljoin(talk_host, f"{self.slug}/schedule")
return url
return urljoin(talk_host, f"{self.slug}/schedule")

Comment on lines +1144 to 1145
url = urljoin(talk_host, f"{self.slug}/talk")
return url
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Inline variable that is immediately returned (inline-immediately-returned-variable)

Suggested change
url = urljoin(talk_host, f"{self.slug}/talk")
return url
return urljoin(talk_host, f"{self.slug}/talk")

Comment on lines +1150 to 1151
url = urljoin(talk_host, f"{self.slug}/speaker")
return url
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Inline variable that is immediately returned (inline-immediately-returned-variable)

Suggested change
url = urljoin(talk_host, f"{self.slug}/speaker")
return url
return urljoin(talk_host, f"{self.slug}/speaker")

try:
url = resolve(request.path_info)
except Resolver404:
return {}

if not request.path.startswith(f"{get_script_prefix()}common"):
if not request.path.startswith(get_script_prefix() + 'common'):
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Use f-string instead of string concatenation (use-fstring-for-concatenation)

Suggested change
if not request.path.startswith(get_script_prefix() + 'common'):
if not request.path.startswith(f'{get_script_prefix()}common'):

Comment on lines +7 to +8
'ticket_component': settings.SITE_URL + '/control',
'talk_component': settings.TALK_HOSTNAME + '/orga',
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Use f-string instead of string concatenation [×2] (use-fstring-for-concatenation)

Suggested change
'ticket_component': settings.SITE_URL + '/control',
'talk_component': settings.TALK_HOSTNAME + '/orga',
'ticket_component': f'{settings.SITE_URL}/control',
'talk_component': f'{settings.TALK_HOSTNAME}/orga',

@mariobehling mariobehling deleted the revert-484-eventyay_c_dashboard branch January 9, 2025 12:25
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.

1 participant