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

Re-commit filter feature + fix session type label + update calendar view for mobile #183

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

lcduong
Copy link
Contributor

@lcduong lcduong commented Aug 13, 2024

This PR closes/references issue #170 . It does so by …

How has this been tested?

Checklist

  • I have added tests to cover my changes.

Summary by Sourcery

Fix session type label to include both the name and default duration in minutes. Update calendar view for mobile by adding margin to the locales section.

Bug Fixes:

  • Fix session type label to include both the name and default duration in minutes.

Enhancements:

  • Update calendar view for mobile by adding margin to the locales section.

Copy link

sourcery-ai bot commented Aug 13, 2024

Reviewer's Guide by Sourcery

This pull request implements three main changes: 1) It adds a session type label to the schedule data, 2) It updates the calendar view for mobile devices, and 3) It re-commits a filter feature (though details about this are not visible in the provided diff). The changes primarily affect the schedule model and the CSS layout.

File-Level Changes

Files Changes
src/pretalx/schedule/models/schedule.py Added session type information to the talk data in the schedule model
src/pretalx/static/cfp/scss/_layout.scss Updated CSS for better mobile view of the calendar, specifically adjusting the margin for locale selection

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

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 adding tests to cover these changes, especially for the new session type formatting in the schedule model.
  • The session type string formatting in build_data could potentially be refactored for better readability and maintainability. Consider using a formatted string or a separate method for this.
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 to tell me if it was helpful.

@@ -669,7 +669,11 @@ def build_data(self, all_talks=False, filter_updated=None, all_rooms=False):
"state": talk.submission.state if all_talks else None,
"fav_count": count_fav_talk(talk.submission.code) if talk.submission else 0,
"do_not_record": talk.submission.do_not_record,
"tags": talk.submission.get_tag()
"tags": talk.submission.get_tag(),
"session_type": str(talk.submission.submission_type.name)
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider separating session type and duration into distinct fields

Separating the session type and duration would provide more flexibility for frontend processing and make it easier to sort or filter based on these attributes independently.

Suggested change
"session_type": str(talk.submission.submission_type.name)
"session_type": talk.submission.submission_type.name,
"session_duration": talk.submission.submission_type.default_duration,

@lcduong
Copy link
Contributor Author

lcduong commented Aug 13, 2024

image

image

image

image

image

@mariobehling mariobehling merged commit 1d10de6 into fossasia:development Aug 20, 2024
3 of 9 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.

3 participants