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

feat: open an injected course page on course block click in popup main #146

Merged
merged 29 commits into from
Mar 16, 2024

Conversation

DereC4
Copy link
Member

@DereC4 DereC4 commented Mar 11, 2024

I don't got any courses to show, but this is a description:

image
(fig 1.)

When we click on a course here, we want to open up calendar, and open up the associated injected popup for that course, shown in fig 2

image
(fig 2.)

Current implementation is as such:

PopupCourseBlock takes in a function for clicking functionality, defaulting to nothing if we want nothing to happen. I found active schedule in popupmain, so I attached the handleOpenCalendar function to those course block components.

handleOpenCalendar takes in two parameters at the moment, the uniqueId and the associated course.

From there, the intention is to open calendar with parameters. I believe they pass correctly, but right now I'm only passing the uniqueId because I'm not sure what to do with the course.

From the calendar's side, I use URLSearchParams to receive the params (currently only uniqueId)

I saw some work in progress code on calendar so wasn't sure what to do with that. That's where we are for now! Lemme know your thoughts

edit: Looks like we're good to go now!

@DereC4 DereC4 marked this pull request as draft March 11, 2024 22:27
@DereC4
Copy link
Member Author

DereC4 commented Mar 15, 2024

Quick explanation of what is basically left:

When calendar.tsx detects a course it (should) open up the course injected popup, so the course just needs to be made on calendar.tsx. The parameter passing is set up now

@DereC4
Copy link
Member Author

DereC4 commented Mar 15, 2024

(fixing tests real quick ignore that)

@DereC4 DereC4 marked this pull request as ready for review March 15, 2024 08:00
@doprz doprz changed the title feat: Opening an injected course page when clicking on a course block in popup main feat: open an injected course page on course block click in popup main Mar 16, 2024
@doprz doprz self-requested a review March 16, 2024 01:24
src/pages/background/handler/calendarBackgroundHandler.ts Outdated Show resolved Hide resolved
src/shared/messages/TabInfoMessages.ts Show resolved Hide resolved
src/stories/components/List.stories.tsx Outdated Show resolved Hide resolved
src/stories/components/PopupCourseBlock.stories.tsx Outdated Show resolved Hide resolved
src/views/components/PopupMain.tsx Outdated Show resolved Hide resolved
src/views/components/calendar/Calendar/Calendar.tsx Outdated Show resolved Hide resolved
src/views/components/calendar/Calendar/Calendar.tsx Outdated Show resolved Hide resolved
src/views/components/calendar/Calendar/Calendar.tsx Outdated Show resolved Hide resolved
@DereC4 DereC4 requested a review from doprz March 16, 2024 04:22
Copy link
Collaborator

@doprz doprz left a comment

Choose a reason for hiding this comment

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

The changes that I requested looks good to me. Let's just wait on @Razboy20's review.

.storybook/preview.tsx Show resolved Hide resolved
@Razboy20 Razboy20 merged commit 2709484 into Longhorn-Developers:main Mar 16, 2024
6 checks passed
@Samathingamajig Samathingamajig deleted the derek/popupInject branch March 16, 2024 20:58
@DereC4
Copy link
Member Author

DereC4 commented Mar 16, 2024

WE DID IT

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