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

Help Hub - DQA Changes #2267

Merged
merged 8 commits into from
Nov 13, 2024
3 changes: 3 additions & 0 deletions src/admin-views/help-hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
];
?>
<div class="tribe_settings wrap tec-events-admin-settings">
<div class="tribe-notice-wrap">
<div class="wp-header-end"></div>
</div>
<h1>
<img
class="tribe-events-admin-title__logo"
Expand Down
3 changes: 2 additions & 1 deletion src/admin-views/help-hub/support/iframe-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<body <?php body_class(); ?> data-opted-in="<?php echo esc_attr( $opted_in ); ?>">

<!-- Docsbot section-->
<div class="docsbot-widget-background"></div>
<div id="docsbot-widget-embed"></div>


Expand All @@ -51,7 +52,7 @@
);
?>
</p>
<a target="_parent" href="<?php echo esc_url( $help_hub::get_telemetry_opt_in_link() ); ?>" class="button-secondary"><?php esc_html_e( 'Manage Consent', 'tribe-common' ); ?></a>
<a target="_parent" href="<?php echo esc_url( $help_hub::get_telemetry_opt_in_link() ); ?>" class="button button-secondary"><?php esc_html_e( 'Manage my data sharing consent', 'tribe-common' ); ?></a>
</div>
</div>

Expand Down
119 changes: 105 additions & 14 deletions src/resources/postcss/help-hub-iframe.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
body {
font-family: var(--tec-font-family-sans-serif);
overflow: hidden;
background: transparent!important;
background: transparent !important;
}

.hide {
Expand All @@ -25,21 +25,68 @@ body {
display: flex;
height: 100vh;
justify-content: center;
pointer-events: none;
}

.blackout::before {
background-color: rgba(0, 0, 0, .8);
content: '';
height: 100vh;
left: 0;
pointer-events: none;
position: fixed;
top: 0;
transition: var(--tec-transition-opacity);
width: 100vw;
z-index: 999999;
}

.docsbot-widget-background {
display: none;
}

body[data-opted-in="0"].blackout {
display: initial;
}

/* Remove background-color from .blackout::before when opted-in is 0 */
body[data-opted-in="0"].blackout::before {
background-color: transparent;
}

/* Add background image to #docsbot-widget-embed when opted-in is 0 */
body[data-opted-in="0"] .docsbot-widget-background {
align-items: center;
background-image: url('../images/help-hub/docsbot-background.png');
background-position: left top;
background-repeat: no-repeat;
background-size: 815px 740px;
display: flex;
filter: blur(5px);
height: 100vh;
justify-content: center;
position: relative;
width: 100vw;

> * {
position: relative;
z-index: 1;
}

/* Black overlay */
&::before {
background-color: rgba(0, 0, 0, 0.5);
content: '';
height: 100%;
left: 0;
pointer-events: none;
position: absolute;
top: 0;
width: 100%;
z-index: 0;
}
}


/**
* Zendesk Styles
*/
Expand All @@ -53,24 +100,24 @@ body {
#webWidget {
height: 100% !important;
margin: 0 auto !important;
max-width: 100% !important; /* Ensure full width */
max-width: 100% !important;
min-width: 33vw !important;
width: 100% !important; /* Default to full width on the smallest screens */
width: 100% !important;
z-index: 99999999 !important;
}

/* Small screens and up: 80% width with 10% margins */
@media (--viewport-xxsmall) {
#webWidget {
width:100vw !important;
width: 100vw !important;
}
}

/* Medium screens and up: 50% width, centered */
@media (--viewport-medium) {
#webWidget {
width: 50% !important;
margin: 0 auto!important;
margin: 0 auto !important;
max-height: 100vh !important
}
}
Expand Down Expand Up @@ -99,11 +146,14 @@ body {
border-radius: 6px;
display: flex;
gap: var(--tec-spacer-4);
margin: 0 auto;
left: 50%;
margin: auto;
padding: var(--tec-spacer-4);
position: relative;
position: fixed;
text-align: left;
width: 80%;
top: 20%;
transform: translateX(-50%);
width: 98%;
z-index: 9999999;
}

Expand All @@ -122,13 +172,54 @@ body {
display: flex;
flex-direction: column;
gap: var(--tec-spacer-2);

/* Button Styles */
.button {
-webkit-appearance: none;
border-radius: 3px;
border-style: solid;
border-width: 1px;
box-sizing: border-box;
cursor: pointer;
display: inline-block;
font-size: 13px;
line-height: 2.15384615;
margin: 0;
min-height: 30px;
padding: 0 10px;
text-decoration: none;
white-space: nowrap;
}

/* Secondary Button Styles */
.button-secondary {
background: #f6f7f7;
border-color: #2271b1;
color: #2271b1;
vertical-align: top;
}

/* Anchor Tags Styled as Buttons */
a.button {
max-width: fit-content;
}

/* Link Styles */
a {
color: #2271b1;
margin-top: var(--tec-spacer-2);
text-decoration: underline;

&:hover {
color: #135e96;
}
}
}

/* Link Styles */
.tec-help-hub-iframe-opt-out-message__content a {
color: var(--tec-color-link-primary);
margin-top: var(--tec-spacer-2);
text-decoration: underline;
@media (--viewport-xsmall) {
.tec-help-hub-iframe-opt-out-message {
width: 80%;
}
}

@media screen {
Expand Down
16 changes: 11 additions & 5 deletions src/resources/postcss/help-hub.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ ul.tec-help-list__list-expanded {
padding-top: var(--tec-spacer-3);
}

.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-infobox{
.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-infobox {
display: none;
}

.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__header-block{
.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__header-block {
padding-right: 0;
}

Expand Down Expand Up @@ -210,15 +210,17 @@ ul.tec-help-list__list-expanded {
max-width: initial;
width: auto;
}
.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__header-block{
padding-right: var(--tec-spacer-4);

.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__header-block {
padding-right: var(--tec-spacer-7);
}
}

@media (--viewport-xlarge) {
.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__header-block {
.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__content-section .tec-settings-form__header-block {
padding-right: 0;
}

.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-infobox {
display: grid;
margin-left: calc(var(--tec-spacer-3) * -1);
Expand Down Expand Up @@ -247,4 +249,8 @@ ul.tec-help-list__list-expanded {
max-width: 898px;
width: calc(100vw - 200px - var(--tec-width-sidebar) - var(--tec-spacer-10));
}

.tribe_events_page_tec-events-settings .tec-settings-form .tec-settings-form__section-description {
margin-top: var(--tec-spacer-2);
}
}
Loading