Skip to content

Commit

Permalink
Replace customized tip notices with success notices
Browse files Browse the repository at this point in the history
Stops standard tip notices in content from also being customized and displaying success icons.
This is more apparent after we've started rendering callout blocks as notice blocks.

See WordPress/wordpress.org#374
  • Loading branch information
adamwoodnz committed Oct 23, 2024
1 parent 84874b1 commit 601a1cf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<?php if ( $is_completed ) : ?>
<!-- wp:wporg/notice {"style":{"spacing":{"margin":{"top":"var:preset|spacing|20"}}}} -->
<div class="wp-block-wporg-notice is-tip-notice"
<div class="wp-block-wporg-notice is-success-notice"
style="<?php echo $module ? 'margin-top:var(--wp--preset--spacing--20)' : 'margin-bottom:var(--wp--preset--spacing--50)'; ?>">
<div class="wp-block-wporg-notice__icon"></div>
<div class="wp-block-wporg-notice__content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- /wp:wporg/notice -->
<?php elseif ( $is_pending_grade ) : ?>
<!-- wp:wporg/notice {"style":{"spacing":{"margin":{"top":0,"bottom":"var:preset|spacing|40"}}}} -->
<div class="wp-block-wporg-notice is-tip-notice" style="margin-top:-10px;margin-bottom:var(--wp--preset--spacing--40)">
<div class="wp-block-wporg-notice is-success-notice" style="margin-top:-10px;margin-bottom:var(--wp--preset--spacing--40)">
<div class="wp-block-wporg-notice__icon"></div>
<div class="wp-block-wporg-notice__content">
<p><?php esc_html_e( 'Well done! You completed the quiz.', 'wporg-learn' ); ?></p>
Expand Down
8 changes: 0 additions & 8 deletions wp-content/themes/pub/wporg-learn-2024/src/style/_sensei.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ body.sensei {
--sensei-module-lesson-color: var(--wp--preset--color--charcoal-1);
--sensei-lm-mobile-header-height: 60px;

.is-tip-notice .wp-block-wporg-notice__icon {
background: url(../../assets/icon-check.svg);
}

.wp-block-wporg-notice__icon {
height: 24px;
}

.wp-block-sensei-lms-course-theme-notices:empty {
display: none;
}
Expand Down

0 comments on commit 601a1cf

Please sign in to comment.