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(LearneyFrontEnd): Added estimated completion time chip #89

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/conceptInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import LevelBadge from "./questions/levelBadge";
import { LevelsProgressBar } from "./questions/progressBars";
import { useRouter } from "next/router";
import { signInTooltip } from "../lib/learningAndPlanning/learningAndPlanning";
import { BoltIcon } from "./svgs/icons";

type OnVote = (node: NodeSingular, url: string, up: boolean | null) => void;

Expand Down Expand Up @@ -95,6 +96,15 @@ export function ConceptInfo({
}
className={questionModalShown ? "z-[15]" : ""}
>
<div className="flex justify-center ">
{/* TODO: Remove hard coded time estimates */}
<div className="mb-4 flex max-w-sm items-center justify-center rounded-full bg-[#E9EAFF]">
<BoltIcon />
<span className="pt-2 pb-2 pr-4 pl-2 font-sans font-semibold">
Estimated completion time: 10 mins
Comment on lines +100 to +104
Copy link
Owner

Choose a reason for hiding this comment

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

We need to do this TODO before we can merge.

Also while we're having the map author add concept time estimates, I think they should have a flag that turns them on or off stored in the backend. Given we have a variety of maps, it might be a useless feature for many maps unless set explicitly.

E.g. on StatQuest's map, he probably doesn't want an estimated time of 10 minutes for every single video of his on the map 😂

We can then add a ticket to add a checkbox to the map editor to turn on concept time estimates. What do you think?

Copy link
Owner

@Henry-Pulver Henry-Pulver Mar 16, 2022

Choose a reason for hiding this comment

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

Also, just had a thought. Do users want to know how long this concept takes, or do they care more about how long it will take them to learn this (including learning all prerequisites)?

Ie the second one is: "If I set this as my goal, how long would it take me to learn it?"

What do you think? Should we display both? If so, how?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to do this TODO before we can merge.

Also while we're having the map author add concept time estimates, I think they should have a flag that turns them on or off stored in the backend. Given we have a variety of maps, it might be a useless feature for many maps unless set explicitly.

E.g. on StatQuest's map, he probably doesn't want an estimated time of 10 minutes for every single video of his on the map 😂

We can then add a ticket to add a checkbox to the map editor to turn on concept time estimates. What do you think?

Yeah feature toggle is great to have, we can absolutely do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, just had a thought. Do users want to know how long this concept takes, or do they care more about how long it will take them to learn this (including learning all prerequisites)?

Ie the second one is: "If I set this as my goal, how long would it take me to learn it?"

What do you think? Should we display both? If so, how?

Yeah, this is interesting!
We should absolutely show the estimated time to complete the goal. I think it makes sense to show it on profile, what do you think?

Copy link
Owner

Choose a reason for hiding this comment

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

Also, just had a thought. Do users want to know how long this concept takes, or do they care more about how long it will take them to learn this (including learning all prerequisites)?
Ie the second one is: "If I set this as my goal, how long would it take me to learn it?"
What do you think? Should we display both? If so, how?

Yeah, this is interesting! We should absolutely show the estimated time to complete the goal. I think it makes sense to show it on profile, what do you think?

Yep, you're right. I think you suggested making another ticket for this - let's do that! 😄

</span>
</div>
</div>
<div
className={classNames(
!questionsEnabled && "hidden",
Expand Down
21 changes: 21 additions & 0 deletions components/svgs/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,24 @@ export function TrophyIcon() {
</svg>
);
}

export function BoltIcon() {
return (
<svg
width="18"
height="18"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="pl-1.5"
>
<path
d="M8.8335 1.25V6.5H14.6668L7.16683 14.75V9.5H1.3335L8.8335 1.25Z"
stroke="#3F3F46"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}