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

Eventyay-Common: Create Dropdown menu similar to the "Tickets" component #464

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

odkhang
Copy link
Collaborator

@odkhang odkhang commented Nov 27, 2024

This PR resolved #442

Summary by Sourcery

Implement a dropdown menu similar to the 'Tickets' component, enhancing the navigation experience with a new submenu. Add an 'Account' section to the global navigation and introduce a popover feature for the profile menu. Create a new account settings page template for user settings management.

New Features:

  • Introduce a dropdown menu similar to the 'Tickets' component, enhancing the user interface with a submenu for additional navigation options.
  • Add a new 'Account' section in the global navigation, providing users with direct access to account settings.

Enhancements:

  • Enhance the profile menu with a popover feature, allowing users to access various sections like Dashboard, My Events, Organizers, and Account more intuitively.

Documentation:

  • Add a new account settings page template, providing users with options to update their general and login settings.

Copy link

sourcery-ai bot commented Nov 27, 2024

Reviewer's Guide by Sourcery

This PR implements a dropdown menu component similar to the "Tickets" component, featuring a user profile menu with nested submenus. The implementation includes styling updates, new JavaScript functionality for menu interactions, and backend changes to support the new account settings feature.

Sequence diagram for the profile menu interaction

sequenceDiagram
    actor User
    participant Webpage
    participant Dropdown
    participant Submenu
    User->>Webpage: Click on profile icon
    Webpage->>Dropdown: Show profile menu
    User->>Dropdown: Hover over "Dashboard"
    Dropdown->>Submenu: Display submenu
    User->>Submenu: Click on "Tickets"
    Submenu->>User: Redirect to Tickets page
Loading

Updated class diagram for the UserSettings view

classDiagram
    class UserSettings {
        +get_object(queryset)
        +get_form_kwargs()
        +form_invalid(form)
        +form_valid(form)
        +get_success_url()
    }
    class User {
        +send_security_notice(msgs, email)
        +log_action(action, user, data)
    }
    UserSettings --> User
    note for UserSettings "Handles user account settings update logic"
Loading

File-Level Changes

Change Details Files
Added new dropdown menu UI component with nested submenu functionality
  • Created new popover-based dropdown menu with hover-triggered submenus
  • Added styling for menu items, hover states, and submenu positioning
  • Implemented JavaScript handlers for menu interactions
  • Added menu items for Dashboard, Tickets, Talks, Events, Organizers, Account, Admin, and Logout
src/pretix/static/pretixcontrol/scss/main.scss
src/pretix/static/eventyay-common/js/ui/popover.js
src/pretix/static/utils/js/utils.js
Implemented new account settings functionality
  • Created new account settings view and template
  • Added form handling for user settings including password changes
  • Implemented security notifications for account changes
  • Added URL routing for account settings
src/pretix/eventyay_common/views/account.py
src/pretix/eventyay_common/templates/eventyay_common/account/settings.html
src/pretix/eventyay_common/urls.py
Updated base template and context to support new menu functionality
  • Added necessary JavaScript includes
  • Modified user profile section in header
  • Added context variables for menu configuration
  • Updated navigation menu labels
src/pretix/eventyay_common/templates/eventyay_common/base.html
src/pretix/eventyay_common/context.py

Assessment against linked issues

Issue Objective Addressed Explanation
#442 Create a dropdown menu with specified items (Dashboard with Tickets/Talks/Video submenu, My Events, Organizers, Account, Admin, Logout)
#442 Rename 'Events' to 'My Events' in the left sidebar
#442 Add 'Account' to the left sidebar

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

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.

Eventyay-Common: Create Dropdown menu similar to the "Tickets" component
1 participant