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] Format Course Details Data #148

Open Jaylin0312 opened 1 month ago

Jaylin0312 commented 1 month ago

Mockups / Screenshots

The current course details is not formatted as seen in the screenshot below:

photo_2024-05-31 01 06 00

Features

Instead of displaying the course details as a large block of unformatted text, the information should ideally be presented in a well-formatted and readable manner.

davidlhw commented 1 month ago

this issue is largely a result of how the data in obtained and stored in the db

for eg, bullet pointers are not stored as <ol><li/></ol> elements, for example, but rather, just stored as characters

probably not as relevant to be a ui task in this repository

we can consider manipulating data like these in the FE but there won't be a way to guarantee it is as expected. probably better to address this logic with the way data is scrapped instead

davidlhw commented 2 weeks ago

confirmed that this is a bug on the FE. the database seem to have the correct text structure

the potential fix is mentioned in #168

This is likely due to the missing CSS property white-space: pre-wrap; on the review modal body theme at src/common/components/ReviewModal/ReviewModal.theme.ts#L25

image

Jansen52x commented 2 weeks ago

I would like to work on this issue.

Jaylin0312 commented 1 week ago

Reopen this issue as https://github.com/AfterClass-io/afterclass.io-v2/pull/174 fixed review modal instead of course detail modal

davidlhw commented 1 week ago

the fix for the course page is similar but at another location: src/modules/reviews/InformationSection/InformationCard/InformationModal.tsx#L24

by adding a white-space: pre-wrap; css property to the <Modal.Body> like so:

<Modal.Body className={xxx}>