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

Implement timezone feature on schedule/session page similar with Talk systems #243

Merged
merged 15 commits into from
Oct 11, 2024

Conversation

lcduong
Copy link
Contributor

@lcduong lcduong commented Oct 4, 2024

This PR related to #241, implement timezone select in schedule/session pages

image

Summary by Sourcery

Implement a timezone selection feature on the schedule and session pages, enabling users to toggle between the event's timezone and their own. Enhance user experience by storing the selected timezone in local storage.

New Features:

  • Introduce a timezone selection feature on the schedule and session pages, allowing users to choose between the event's timezone and their own detected timezone.

Enhancements:

  • Add functionality to save the user's selected timezone in local storage for persistent user experience across sessions.

Copy link

sourcery-ai bot commented Oct 4, 2024

Reviewer's Guide by Sourcery

This pull request implements a timezone feature on the schedule/session pages, allowing users to switch between the event timezone and their local timezone. The changes primarily affect the UI and user interaction in the schedule view.

User Journey Diagram for Timezone Feature on Schedule/Session Page

journey
    title User Journey for Timezone Selection
    section Schedule Page
      User selects timezone: 5: User
      System displays timezone options: 5: System
      User chooses between event timezone and local timezone: 5: User
      System updates schedule to reflect selected timezone: 5: System
    section Session Page
      User views session times in selected timezone: 5: User
      System maintains timezone preference across sessions: 5: System
Loading

File-Level Changes

Change Details Files
Added timezone selection functionality
  • Introduced new data properties: userTimezone and currentTimezone
  • Added a computed property 'inEventTimezone' to check if the user is in the event's timezone
  • Implemented a method 'saveTimezone' to store the user's timezone preference in localStorage
  • Added logic in the 'created' lifecycle hook to set initial timezone values
webapp/src/views/schedule/sessions/index.vue
webapp/src/views/schedule/index.vue
Updated UI to display timezone selection
  • Added a bunt-select component for timezone selection when not in event timezone
  • Added a label to display the event timezone when in the event timezone
  • Adjusted styling for the new timezone selection component
webapp/src/views/schedule/sessions/index.vue
webapp/src/views/schedule/index.vue
Refactored template structure and indentation
  • Changed indentation from spaces to tabs
  • Reorganized some elements in the template
webapp/src/views/schedule/sessions/index.vue

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.

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

Overall Comments:

  • Consider extracting the timezone-related logic into a shared component or utility function to reduce code duplication between schedule/sessions/index.vue and schedule/index.vue.
  • For better state management, consider using Vuex or a similar solution instead of localStorage for persisting user preferences like timezone selection.
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.

@mariobehling mariobehling requested a review from hongquan October 4, 2024 10:59
Copy link
Member

@hongquan hongquan left a comment

Choose a reason for hiding this comment

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

Many v-for are still missing :key.

@odkhang odkhang requested a review from hongquan October 9, 2024 04:15
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.

Working as far as I can see.

@mariobehling mariobehling merged commit 65b548c into fossasia:development Oct 11, 2024
2 of 3 checks passed
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.

4 participants