AfterClass-io / afterclass.io-v2

[alpha] v2 of https://afterclass.io!
https://afterclass-io.vercel.app
MIT License
4 stars 2 forks source link

feat(UI): Course Page Info Card #146

Closed Jaylin0312 closed 1 month ago

Jaylin0312 commented 1 month ago

Context

This PR addresses issue #88 and focuses on the implementation of the information component for the course page. The key features are as follows:

Implementation Decisions

For the Information Card, I have chosen a composition design by allowing the card component to accept Log In Button and Modal as children. This approach was adopted for several reasons:

Initially, I considered consolidating the rendering of the button and modal into a single component (e.g., placing the button within the modal component since both are client-based). However, this approach might violate separation of concerns and it does not address the issue of prop drilling. Additionally, it is inconsistent with our current component design, which favours a composition-based approach over a component-based one.

Changes

Note

Course detail component will be implemented in a separate PR

Testing

all reviews for selected course: https://afterclass-io-v2-git-feat-course-page-info-section-afterclass.vercel.app/course/COR-IS1702

Preview

Unauthenticated

Screenshot 2024-05-29 at 12 13 52 AM

Authenticated

Screenshot 2024-05-29 at 12 13 08 AM

Modal

Screenshot 2024-05-29 at 12 13 20 AM
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
afterclass-io-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 7:29am