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

Event Tickets Dashboard: Add an info box for the organizer and teams #482

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

HungNgien
Copy link
Contributor

@HungNgien HungNgien commented Dec 19, 2024

image
Add info box "Event organizer"

image
image

When click to organizer and teams will return these views.

This PR resolves #478

Summary by Sourcery

New Features:

  • Add an info box to the event dashboard displaying the event organizer and their teams.

Summary by Sourcery

New Features:

  • Display the event organizer and their teams in an info box on the event dashboard.

Copy link

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This pull request implements a new info box on the event dashboard. The info box displays the event organizer and the organizer's teams. It also restyles the event dashboard to accommodate the new info box. The implementation involved modifying the dashboard structure to include the new info box and updating the styling to ensure it fits correctly within the dashboard layout.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Add an info box to display event organizer and teams.
  • Added a new template fragment (fragment_info_box.html) to render the info box content.
  • Included the new template fragment in the main event dashboard template (index.html).
  • Added the organizer_teams variable to the dashboard view context to provide team information to the template.
  • Updated the dashboard view to retrieve and pass organizer teams to the template.
src/pretix/control/templates/pretixcontrol/event/index.html
src/pretix/control/templates/pretixcontrol/event/fragment_info_box.html
src/pretix/control/views/dashboards.py
Restyle event dashboard to accommodate the new info box.
  • Wrapped the timeline and info box sections in a dashboard container.
  • Added CSS classes and styles to create a two-column layout for the info box and timeline.
  • Adjusted the timeline styles to fit within the new layout.
  • Added responsive design rules to handle different screen sizes.
  • Removed unnecessary panel wrappers from the timeline template (fragment_timeline.html).
src/pretix/control/templates/pretixcontrol/event/index.html
src/pretix/control/templates/pretixcontrol/event/fragment_timeline.html
src/pretix/static/eventyay-common/scss/custom.scss

Assessment against linked issues

Issue Objective Addressed Explanation
#478 Add an info box showing the event organizer with a link to the organizer
#478 Add links to the organizer's teams in the info box

Possibly linked issues


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

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 @HungNgien - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider moving inline styles (padding-left, display) to proper CSS classes for better maintainability
  • The teams query request.event.organizer.teams.all might cause unnecessary database hits. Consider prefetching the teams in the view if they aren't already
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 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.

@HungNgien HungNgien marked this pull request as draft December 19, 2024 04:14
@HungNgien HungNgien marked this pull request as ready for review December 19, 2024 04:25
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 @HungNgien - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 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.

Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Please make the organizer and teams clickable. So, they can be accessed from this dashboard. Thanks

@HungNgien
Copy link
Contributor Author

Please make the organizer and teams clickable. So, they can be accessed from this dashboard. Thanks

Updated

@HungNgien HungNgien requested a review from odkhang December 19, 2024 08:51
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

As you can see in the screenshot the top two boxes got changed to a gray background and the heading row is misaligned.

Copy link
Collaborator

@odkhang odkhang left a comment

Choose a reason for hiding this comment

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

look okay from my end

Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Do not change the background of the table color. Keep it like the original. See below.

Screenshot from 2024-12-21 16-51-24

@HungNgien HungNgien marked this pull request as draft December 23, 2024 04:36
@HungNgien HungNgien marked this pull request as ready for review December 24, 2024 01:43
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 @HungNgien - 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.

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.

Event Tickets Dashboard: Add an info box for the organizer and teams
3 participants