Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

feat: question approval progress bar on homepage #270

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jengkhaw95
Copy link
Contributor

@jengkhaw95 jengkhaw95 commented Oct 6, 2022

🛠️ Fixes Issue

Closes #262

➕ Changes Introduced

  1. Added a component QuestionApprovalProgressBarSection and placed it on the homepage.

  2. Count of the approved questions is fetched in a useEffect (on mount) using supabase client in the QuestionApprovalProgressBarSection component.

📄 Note To Reviewers

  1. 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. Reference
    image

  2. Implementation 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
mobile

Desktop View
desktop

@vercel
Copy link

vercel bot commented Oct 6, 2022

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

Name Status Preview Updated
defaang ✅ Ready (Inspect) Visit Preview Oct 7, 2022 at 4:53PM (UTC)

@ykdojo
Copy link
Collaborator

ykdojo commented Oct 7, 2022

Thank you @jengkhaw95.

This is a good start:
image

A few issues though:

  1. Since we're at 3%, it doesn't look quite good.

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"?

  1. The top portion of the landing page and the progress bar section look too blended together. Is there a good way to separate them?

Copy link
Collaborator

@ykdojo ykdojo left a 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)

@jengkhaw95
Copy link
Contributor Author

Yes, it makes sense that we start with 10 approved questions.
Let me work on a sample describing the goal. (Will upload it here when it's ready)

Currently, I don't have any idea about separating the landing page and the progress bar section.
I'm open to suggestions for both.

@ykdojo
Copy link
Collaborator

ykdojo commented Oct 14, 2022

@jengkhaw95 any updates?

@ykdojo
Copy link
Collaborator

ykdojo commented Oct 14, 2022

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.

@ykdojo
Copy link
Collaborator

ykdojo commented Oct 14, 2022

Like this: #303

Copy link
Contributor

@adilwahla adilwahla left a comment

Choose a reason for hiding this comment

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

cool

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Make a progress bar
3 participants