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(coachmark): Add default opening for not-stacked coachmarks #6516

Conversation

gcattan
Copy link
Contributor

@gcattan gcattan commented Nov 27, 2024

Closes #5709

Add a property to open the coachmark by default.

What did you change?

Add the property isOpenByDefault to the coachmark, which applies in the case the coachmark is not a stacked coachmark.
image

How did you test and verify your work?

Added two tests to the suite:

  1. Test that the coachmark is open if isOpenByDefault is true
  2. Test that a stacked coachmark is open, even if isOpenByDefault is false.

Copy link
Contributor

github-actions bot commented Nov 27, 2024

DCO Assistant Lite bot All contributors have signed the DCO.

Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit 8b6582b
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/6750aecf9f37fa0008306476
😎 Deploy Preview https://deploy-preview-6516--ibm-products-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 8b6582b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/6750aecf0638190007498a96
😎 Deploy Preview https://deploy-preview-6516--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gcattan
Copy link
Contributor Author

gcattan commented Nov 27, 2024

I have read the DCO document and I hereby sign the DCO.

@gcattan gcattan changed the title Feat/5709 default opening not stacked coachmark Feat(coachmark): Add default opening for not-stacked coachmarks Nov 27, 2024
@gcattan gcattan changed the title Feat(coachmark): Add default opening for not-stacked coachmarks feat(coachmark): Add default opening for not-stacked coachmarks Nov 27, 2024
@gcattan
Copy link
Contributor Author

gcattan commented Nov 27, 2024

I have read the DCO document and I hereby sign the DCO.

@gcattan gcattan marked this pull request as ready for review November 27, 2024 21:16
@gcattan gcattan requested a review from a team as a code owner November 27, 2024 21:16
@gcattan gcattan requested review from AlexanderMelox and devadula-nandan and removed request for a team November 27, 2024 21:16
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.91%. Comparing base (7005822) to head (8b6582b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6516      +/-   ##
==========================================
- Coverage   79.92%   79.91%   -0.01%     
==========================================
  Files         394      394              
  Lines       12887    12888       +1     
  Branches     4265     4267       +2     
==========================================
  Hits        10300    10300              
- Misses       2587     2588       +1     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components ∅ <ø> (∅)

Copy link
Contributor

@devadula-nandan devadula-nandan left a comment

Choose a reason for hiding this comment

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

The implementation looks good. Could you please add a control in the component API section of the documentation to reference this prop?

@gcattan
Copy link
Contributor Author

gcattan commented Dec 2, 2024

@devadula-nandan thanks for the suggestion! 4 workflows are still pending, everything else looks good.

@gcattan gcattan requested a review from matthewgallo December 3, 2024 10:27
@gcattan
Copy link
Contributor Author

gcattan commented Dec 4, 2024

As agreed in slack this morning with @devadula-nandan the last test probably doesn't make a valid point. Therefore removing it.

In top of it, we discussed the duplicated logic between this "overlayKind=stacked" property and the "CoachmarkStacked".
May be it will make sense to remove the overlayKind logic from the code in a follow-up work.

@devadula-nandan devadula-nandan self-requested a review December 4, 2024 12:36
@devadula-nandan devadula-nandan dismissed their stale review December 4, 2024 12:38

invalid test cleaned up

Copy link
Contributor

@devadula-nandan devadula-nandan left a comment

Choose a reason for hiding this comment

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

LGTM

@gcattan
Copy link
Contributor Author

gcattan commented Dec 4, 2024

@matthewgallo @AlexanderMelox can we merge this PR?
Also I see that one pipeline is failing, but I cannot see the logs.

@AlexanderMelox AlexanderMelox added the status: percy 🦔 This PR is waiting for a Percy check label Dec 4, 2024
@AlexanderMelox
Copy link
Contributor

@gcattan I do not have access to Percy checks neither, we prob have to wait for @matthewgallo or someone can give me access to Percy also

@matthewgallo
Copy link
Member

I can take a quick look at Percy

@gcattan
Copy link
Contributor Author

gcattan commented Dec 4, 2024

Thank you! I see that all checks are now passing.

@matthewgallo matthewgallo added this pull request to the merge queue Dec 4, 2024
@matthewgallo
Copy link
Member

Thanks for contributing @gcattan!

Merged via the queue into carbon-design-system:main with commit 73ee693 Dec 4, 2024
31 checks passed
@gcattan
Copy link
Contributor Author

gcattan commented Dec 4, 2024

Thank you all for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: percy 🦔 This PR is waiting for a Percy check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add an option to open by default not-stacked coachmarks
4 participants