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

(fix) O3-3896: Tutorials modal should use a standard Carbon modal component #20

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

IamMujuziMoses
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including a conventional commit type prefix and a Jira ticket number if applicable. See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.

Summary

This PR implements a fix for the Tutorial Modal styling of the Carbon Modal component.

Screenshots

Before

Screen.Recording.2024-09-24.at.21.06.26.mov

After

Screen.Recording.2024-09-24.at.21.07.11.mov

Related Issue

https://issues.openmrs.org/browse/O3-3896

@IamMujuziMoses
Copy link
Contributor Author

@chibongho @vasharma05 @usamaidrsk could you please review this PR, your feedback will be appreciated.

@IamMujuziMoses
Copy link
Contributor Author

Update:

Screenshot 2024-09-30 at 12 33 03

@chibongho
Copy link

Thanks @IamMujuziMoses. Looks fine to me, but I'm not too familiar with this code base and don't have permission to approve PRs in this repo.

@jayasanka-sack @Vijaykv5 Can you take a look?

<p className={styles.description}>
{t('modalDescription', 'Find walkthroughs and video tutorials on some of the core features of OpenMRS.')}
</p>
</ModalHeader>
<ModalBody className={styles.tutorialModal}>
<ModalBody className={styles.tutorialModal} hasScrollingContent >
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this? by default wrapping up over <React.Fragment> make it scrollable.
You can read it here #docs

Suggested change
<ModalBody className={styles.tutorialModal} hasScrollingContent >
<ModalBody className={styles.tutorialModal} >

<ul>
{tutorials.map((tutorial, index) => (
<li className={styles.tutorialItem} key={index}>
<h3 className={styles.tutorialTitle}>{tutorial.title}</h3>
<p className={styles.tutorialDescription}>{tutorial.description}</p>
<Button kind="ghost" onClick={() => handleWalkthroughClick(index)}>
<Link className={styles.tutorialLink} onClick={() => handleWalkthroughClick(index)} renderIcon={() =>
<ArrowRight aria-label="Arrow Right" />}>
Copy link
Contributor

Choose a reason for hiding this comment

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

@jayasanka-sack do we need to keep an Arrow Right here?
It's not defined in the design though.

@IamMujuziMoses Also please make the cursor to pointer

Copy link
Member

Choose a reason for hiding this comment

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

@Vijaykv5 it looks okay to me. Let's keep it.

+1 to cursor

Copy link
Member

Choose a reason for hiding this comment

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

I think the cursor is set to pointer by default for the link component. Please confirm.

@IamMujuziMoses IamMujuziMoses force-pushed the O3-3896 branch 2 times, most recently from 23baf38 to f72c2e9 Compare October 2, 2024 10:36
Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

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

Thanks @IamMujuziMoses !

@jayasanka-sack
Copy link
Member

The E2E test is failing when trying to click the walkthrough button. Could you please fix it?

Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

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

Please fix the failing E2E test as mentioned in here: #20 (comment)

@jayasanka-sack jayasanka-sack merged commit 1ff489b into openmrs:main Oct 2, 2024
5 checks passed
@Vijaykv5 Vijaykv5 mentioned this pull request Oct 5, 2024
3 tasks
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