-
Notifications
You must be signed in to change notification settings - Fork 26
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
Kuwait Theme: Activity Check-in component #2562
Conversation
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.
Nice to have this scaffolded out. I assume you're seeing the logic for handling the countdown and unlock as a placeholder that should be replaced by logic that connects to our real system of handling this data? @esmeetewinkel is that something that has been discussed/thought through already, or shall we add it to our meeting agenda?
I would also say that it probably makes sense to style the component to be centred within its div. Laying out the element so that it sits to the side of another element is something that should be handled at the authoring level (i.e. by putting the elements inside a display_group
component).
packages/components/plh/plh-kids-kw/components/activity-check-in/activity-check-in.component.ts
Outdated
Show resolved
Hide resolved
packages/components/plh/plh-kids-kw/components/activity-check-in/activity-check-in.component.ts
Outdated
Show resolved
Hide resolved
packages/components/plh/plh-kids-kw/components/activity-check-in/activity-check-in.component.ts
Outdated
Show resolved
Hide resolved
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.
I'm not sure how you're proposing to author the "days left". One way that would be intuitive to me is that the component can have a parameter (maybe unlock_at
) which is a timestamp of the moment of unlocking. If this parameter value is
- falsy (undefined or empty string): don't show the "days left" progress bar + text. Button is disabled.
- a time stamp in the future: compute how many days left and display progress bar + text. Button is disabled.
- a time stamp in the past: don't show the "days left" progress bar + text. Button is enabled.
Edited: thinking about it further I think we also need something like a start_countdown_at
parameter
Thanks for the review @esmeetewinkel I've pushed the following changes
![]() ![]() ![]() ![]() When the title text has to wrap onto multiple lines the styling isn't perfect, but it is an improvement: |
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.
Thanks @jfmcquade, looking lots better and I can confirm the error has disappeared + item locks correctly when timestamp doesn't exist.
The only display that doesn't look great yet is the one where the countdown bar is displayed. Would it make sense to tweak that to the current image dimensions or better to leave as-is?
…pp-builder into feature-kw-check-in-component
Should be a quick fix to get it look it nicer, but I'm going to merge as-is for now and will follow up later today after working through other higher priority issues |
PR Checklist
Description
plh_activity_check_in
created and styled. Corresponding debug sheet: LinkAuthor Notes
(updated by @jfmcquade)
plh_activity_check_in
component with the followingparameter_list
:title
: The title of the component attached to the bottomlocked_icon_asset
: Icon that appears next to the title while the component is lockedlocked_image_asset
: Illustration that appears while component is lockedunlocked_icon_asset
: Icon that appears next to the title while the component is unlockedunlocked_image_asset
: Illustration that appears while component is unlockedcountdown_start_date
: The date from which the countdown is initially startedcountdown_days
: The number of days after the start date that the activity is unlockedcountdown_text_list
: A list of text strings relating to the number of days left to countdown, in order from fewest to mostGit Issues
Closes #2539
Screenshots
Component demo sheet:
@jfmcquade:
comp_plh_activity_check_in
debug.date.now.mov