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

Add tags and changed display of speakers #218

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

odkhang
Copy link
Collaborator

@odkhang odkhang commented Aug 12, 2024

This PR closes/references issue #209 . It does so by:

  1. Update css for speaker box view
  2. Add tag into session/schedule page

How has this been tested?

Checklist

  • I have added tests to cover my changes.

Summary by Sourcery

Introduce tags to session and schedule pages and update the display of speakers. Refactor schedule components for better modularity and maintainability.

New Features:

  • Add tags to session and schedule pages, allowing sessions to be categorized and displayed with tags.

Enhancements:

  • Update the CSS for the speaker box view to improve the visual presentation of speakers.
  • Refactor the schedule components by creating separate components for LinearSchedule, GridSchedule, and Session, improving modularity and maintainability.

Copy link

sourcery-ai bot commented Aug 12, 2024

Reviewer's Guide by Sourcery

This pull request implements several changes to the schedule view of the web application, including the addition of tags to sessions, modifications to the display of speakers, and updates to the schedule components. The changes primarily focus on enhancing the user interface and improving the organization of schedule-related information.

File-Level Changes

Files Changes
webapp/src/views/schedule/sessions/index.vue
webapp/src/views/schedule/index.vue
Updated imports and component declarations to use locally defined schedule components instead of external ones.
webapp/src/views/schedule/schedule-components/GridSchedule.vue
webapp/src/views/schedule/schedule-components/LinearSchedule.vue
webapp/src/views/schedule/schedule-components/Session.vue
Introduced new components for different schedule views (grid and linear) and individual session display, with enhanced features such as tags support and sorting options.

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.

@odkhang
Copy link
Collaborator Author

odkhang commented Aug 12, 2024

image

image

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

Overall Comments:

  • Ensure that all functionality from the previous GridSchedule implementation is preserved in the new custom version.
  • Consider abstracting some of the component-specific styles into separate CSS files for better separation of concerns.
Here's what I looked at during the review
  • 🟡 General issues: 3 issues 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.

@@ -0,0 +1,437 @@
<template lang="pug">
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider breaking down GridSchedule component

The GridSchedule component is quite large and complex. Consider breaking it down into smaller, more manageable sub-components to improve readability and maintainability.

<template lang="pug">
.c-grid-schedule
  GridHeader
  GridBody
  GridFooter

hasAmPm () {
return moment.localeData().longDateFormat('LT').endsWith(' A')
},
timeslices () {
Copy link

Choose a reason for hiding this comment

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

suggestion (performance): Optimize timeslices computation for performance

The timeslices computation seems complex and might be performance-intensive. Consider memoizing this computation or optimizing the algorithm to improve rendering performance, especially for large schedules.

		timeslices: _.memoize(function () {
			const minimumSliceMins = 30
			const slices = []
			// ... rest of the function implementation
			return slices
		}),

}
},
methods: {
getContrastColor(bgColor) {
Copy link

Choose a reason for hiding this comment

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

suggestion: Move color contrast calculation to a utility function

The getContrastColor function could be moved to a separate utility file. This would make it reusable across components and easier to test independently.

import { getContrastColor } from '@/utils/colorUtils';

// ...

methods: {
  // Other methods...
},
computed: {
  contrastColor() {
    return getContrastColor(this.bgColor);
  },

@mariobehling
Copy link
Member

Please only fix docker build as well.

@mariobehling mariobehling merged commit a44d422 into fossasia:development Aug 12, 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.

2 participants