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

Center sessionIssue #PS-1317 fix: Add Planned Session modal online UI Implementation #371

Open
wants to merge 6 commits into
base: shiksha-2.0
Choose a base branch
from

Conversation

shreyas1434shinde
Copy link

@shreyas1434shinde shreyas1434shinde commented Jul 12, 2024

Description

Please describe the changes in your pull request in few words here.

Changes

List the changes done to fix a bug or introducing a new feature.

How to test

Describe the steps required to test the changes proposed in the pull request.

Please consider using the closing keyword if the pull request is proposed to
fix an issue already created in the repository
(https://help.github.com/articles/closing-issues-using-keywords/)

Summary by CodeRabbit

  • New Features

    • Introduced CenterSessionModal for displaying session-related content in a modal.
    • Added DeleteSession component for deleting sessions with user confirmation.
    • Implemented PlannedSession component for scheduling and managing sessions.
    • Added ScheduleModal to render planned sessions in a timetable.
    • Introduced TopicDetails for detailed topic information and management.
  • Style

    • Updated styles for icons and typography in SessionCardFooter.
  • Enhancements

    • Improved UI and state management for cohort details and sessions on the centers page.

Copy link

coderabbitai bot commented Jul 12, 2024

Important

Review skipped

Ignore keyword(s) in the title.

Ignored keywords (2)
  • WIP
  • DO NOT MERGE

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes introduce several new React components and enhancements to existing ones for handling session-related functionalities and their UI in a web application. Key additions include modal dialogs for managing sessions, a detailed view for topic details, and enhancements to session scheduling and deletion features. The updates also include styling improvements and state management for better user interaction and UI representation.

Changes

File Path Change Summary
src/components/CenterSessionModal.tsx Introduced CenterSessionModal component for displaying session-related content in a modal.
src/components/DeleteSession.tsx Added DeleteSession component to provide radio options for session deletion.
src/components/PlannedSession.tsx Added PlannedSession component for scheduling sessions with various options.
src/components/ScheduleModal.tsx Introduced ScheduleModal component to render planned sessions in a timetable.
src/components/SessionCardFooter.tsx Modified styling and commented out defaultExpanded property in Accordion component.
src/components/TopicDetails.tsx Added TopicDetails component to render detailed topic information and options.
src/pages/centers/[cohortId].tsx Updated imports, state management, and UI adjustments for session scheduling and cohort details.
src/styles/globals.css Added .facilitator-bg CSS class for specific background styling.
src/utils/Interfaces.ts Added SessionsModalProps interface for modal properties handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CenterPage as CenterPage
    participant CenterSessionModal as CenterSessionModal
    participant DeleteSession as DeleteSession
    participant PlannedSession as PlannedSession
    participant ScheduleModal as ScheduleModal
    participant TopicDetails as TopicDetails

    User->>CenterPage: Open Center Page
    CenterPage->>CenterSessionModal: Render Modal
    User->>CenterSessionModal: Interact with Modal (e.g., open/close)
    User->>DeleteSession: Choose Delete Option
    User->>PlannedSession: Schedule Session
    User->>ScheduleModal: View Timetable
    User->>TopicDetails: View/Edit Topic Details
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fd403ef and 2ca13cc.

Files ignored due to path filters (1)
  • src/assets/images/Facilitators.png is excluded by !**/*.png
Files selected for processing (9)
  • src/components/CenterSessionModal.tsx (1 hunks)
  • src/components/DeleteSession.tsx (1 hunks)
  • src/components/PlannedSession.tsx (1 hunks)
  • src/components/ScheduleModal.tsx (1 hunks)
  • src/components/SessionCardFooter.tsx (3 hunks)
  • src/components/TopicDetails.tsx (1 hunks)
  • src/pages/centers/[cohortId].tsx (8 hunks)
  • src/styles/globals.css (1 hunks)
  • src/utils/Interfaces.ts (1 hunks)
Files skipped from review due to trivial changes (5)
  • src/components/CenterSessionModal.tsx
  • src/components/DeleteSession.tsx
  • src/components/ScheduleModal.tsx
  • src/styles/globals.css
  • src/utils/Interfaces.ts
Additional comments not posted (9)
src/components/SessionCardFooter.tsx (2)

29-29: Verify the intentionality of commenting out defaultExpanded.

Commenting out the defaultExpanded property might change the default behavior of the Accordion. Ensure this change is deliberate and aligns with the intended functionality.


49-51: Styling changes look good.

The changes to use theme.palette.secondary.main for MenuBookIcon and Typography components are consistent and correctly applied.

src/components/TopicDetails.tsx (2)

59-59: Verify the intentionality of commenting out defaultExpanded.

Commenting out the defaultExpanded property might change the default behavior of the Accordion. Ensure this change is deliberate and aligns with the intended functionality.


16-108: TopicDetails component implementation looks good.

The TopicDetails component is well implemented using Material-UI components and custom styling. It follows best practices for React functional components.

src/components/PlannedSession.tsx (1)

22-227: PlannedSession component implementation looks good.

The PlannedSession component is well implemented using Material-UI components and custom styling. It follows best practices for React functional components.

src/pages/centers/[cohortId].tsx (4)

3-43: New imports look good.

The new imports from Material-UI and custom components are correctly added and used in the file.


55-64: State management and handlers look good.

The new state variables and handlers (open, handleOpen, handleClose) are correctly implemented and used in the file.


268-278: CenterSessionModal component addition looks good.

The CenterSessionModal component is correctly added with properties open, handleClose, title, and primary.


Line range hint 294-307:
WeekCalender and SessionCard components addition looks good.

The WeekCalender and SessionCard components are correctly added to display the sessions.

Copy link
Member

Choose a reason for hiding this comment

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

@shreyas1434shinde rename filename

<Typography
variant="h2"
sx={{
color: '#4D4639',
Copy link
Member

Choose a reason for hiding this comment

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

@shreyas1434shinde take colors from the theme

mt: 2,
}}
>
<Box>This session</Box>
Copy link
Member

Choose a reason for hiding this comment

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

@shreyas1434shinde add translation and colors from the theme

@shreyas1434shinde shreyas1434shinde changed the title Center sessionIssue #PS-1317 fix: Add Planned Session modal online UI Implementation (DNM) Center sessionIssue #PS-1317 fix: Add Planned Session modal online UI Implementation (DNM :- do not merge) Jul 12, 2024
@shreyas1434shinde shreyas1434shinde changed the title Center sessionIssue #PS-1317 fix: Add Planned Session modal online UI Implementation (DNM :- do not merge) Center sessionIssue #PS-1317 fix: Add Planned Session modal online UI Implementation Jul 15, 2024
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