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: Updated Disclaimer screen with trial option #73

Merged
merged 7 commits into from
Dec 16, 2024

Conversation

rijuma
Copy link
Member

@rijuma rijuma commented Dec 10, 2024

Ticket: COSMO-570🔒

Description

We are going to introduce a limited time free trial for audit users. This PR prepares the UI for that.
I've added the trial message to be shown by a prop, but it's currently disabled. This new UI element with the CTA will be tackled in ticket COSMO-602🔒 but I just took the opportunity to include it since it was just removing part of the mockup.

I took the opportunity to add some extra tweaks to the general UI to look closer to the expected figma design.

Screenshots

Without trial message

image

With trial message

image

@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch 2 times, most recently from 42a496b to 151fdff Compare December 10, 2024 20:29
@alangsto
Copy link
Member

alangsto commented Dec 10, 2024

I'll take a closer look at this tomorrow, but the message input should be closer to the bottom of the chat sidebar! It looks like its position moved (and this also differs from the Figma mocks) in the screenshots you provided.

@rijuma rijuma marked this pull request as ready for review December 13, 2024 18:32
@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch from 151fdff to 484ef9d Compare December 13, 2024 18:32
@ilee2u
Copy link
Member

ilee2u commented Dec 13, 2024

FYI I'm going to be rebasing my PR (#72) onto this one so our changes are synced.

Copy link
Member

@alangsto alangsto left a comment

Choose a reason for hiding this comment

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

A few nits, but otherwise looks good! Would you mind updating the screenshots included in the PR with the updated UX? Thank you!

src/components/Disclosure/Disclosure.test.jsx Outdated Show resolved Hide resolved
src/components/Disclosure/Disclosure.test.jsx Outdated Show resolved Hide resolved
src/components/Disclosure/index.jsx Outdated Show resolved Hide resolved
* feat: Added trial url and days to the chat intro

* feat: Updated some logic for the useCourseUpgrade() hook
@rijuma
Copy link
Member Author

rijuma commented Dec 13, 2024

A few nits, but otherwise looks good! Would you mind updating the screenshots included in the PR with the updated UX? Thank you!

Updated!

@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch from 52f19b2 to c61291b Compare December 13, 2024 18:49
@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch from b0582c3 to 4bd5522 Compare December 16, 2024 17:18
const { upgradeable, upgradeUrl, auditTrialLengthDays } = useCourseUpgrade();
const { track } = useTrackEvent();

const handleClick = () => track('edx.ui.lms.learning_assistant.message');
Copy link
Member

Choose a reason for hiding this comment

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

Just noticed this as I'm working through my rebase/refactor, but I don't think this is the correct event name. The message suffix would make more sense for segment events tracked for each message sent, but something like upgrade_click might be more suitable for this specific event.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for noticing this. I've changed it for edx.ui.lms.learning_assistant.disclosure_upgrade_click. My thoughts on this is to be able to tell whether a student updated straight from the disclosure message or from the other instances (Upgrade through the banner or the paywall when the trial expired).


const millisecondsInOneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds

export default function useCourseUpgrade() {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add comments on the key utility of this hook?

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. Thanks for the recommendation. I've added the JSDoc comments for both new hooks.

@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch from 8f7500f to ba7a021 Compare December 16, 2024 19:30
@rijuma rijuma force-pushed the rijuma/xpert-trial-welcome branch from ba7a021 to 0659a97 Compare December 16, 2024 19:36
Copy link
Member

@ilee2u ilee2u left a comment

Choose a reason for hiding this comment

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

Tested this with my PR. Everything works great, so LGTM 🚀

Copy link
Member

@schenedx schenedx left a comment

Choose a reason for hiding this comment

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

👍

@rijuma rijuma merged commit 3ba5f9d into main Dec 16, 2024
4 checks passed
@rijuma rijuma deleted the rijuma/xpert-trial-welcome branch December 16, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants