-
-
Notifications
You must be signed in to change notification settings - Fork 120
feat: question approval progress bar on homepage #270
base: main
Are you sure you want to change the base?
feat: question approval progress bar on homepage #270
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…stion-approval-progress-bar-section
…ub.com/jengkhaw95/defaang into question-approval-progress-bar-section
Thank you @jengkhaw95. A few issues though:
What do you think of setting the initial goal to 10 questions? Then we can describe what will happen when we have 10 approved questions. Maybe something like - "All users with at least one approved question get access to all other questions"?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(described my feedback in my earlier comment)
Yes, it makes sense that we start with 10 approved questions. Currently, I don't have any idea about separating the landing page and the progress bar section. |
@jengkhaw95 any updates? |
One idea: what if we pulled the progress bar all the way to the bottom? That way, we can have a white background there, and show the progress bar in its own distinct section - just an idea though. |
Like this: #303 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
🛠️ Fixes Issue
Closes #262
➕ Changes Introduced
Added a component
QuestionApprovalProgressBarSection
and placed it on the homepage.Count of the approved questions is fetched in a
useEffect
(on mount) using supabase client in theQuestionApprovalProgressBarSection
component.📄 Note To Reviewers
Inline style (width) is used on the progress bar element as a dynamic class name like:
w-[{currentPercentage}]
does not work in tailwindcss JIT mode. ReferenceImplementation of a multi-step progress bar could be introduced in the future, as soon as the steps are defined. (Might require further discussion)
📷 Screenshots
Mobile View
Desktop View