Skip to content

Commit

Permalink
Fixes Mobile sidebar for settings and resolve last conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoni committed Oct 15, 2024
1 parent 027f5c0 commit 95d8f9a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/Common/Admin/Conditional_Content/Black_Friday.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ protected function get_end_time(): ?Date_I18n {
* @inheritdoc
*/
protected function should_display(): bool {
return true;

if ( $this->has_user_dismissed() ) {
return false;
}
Expand Down Expand Up @@ -214,6 +216,13 @@ public function include_tickets_settings_section(): void {
* @return void
*/
public function include_sidebar_section( $sidebar ): void {
$cache = tribe_cache();
if ( $cache[ __METHOD__ ] ) {
return;
}

$cache[ __METHOD__ ] = true;

// Check if the content should currently be displayed.
if ( ! $this->should_display() ) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}

#tec-settings-form__sidebar-modal {
background: transparent;
margin: 0 0 0 auto;
max-width: var(--tec-width-sidebar);
padding: 0;
Expand Down
14 changes: 7 additions & 7 deletions src/resources/postcss/tribe-common-admin/settings/_sidebar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@
min-height: fit-content;

> .tec-settings-form__sidebar-section {
background-color: var(--tec-color-background);
border: 1px solid var(--tec-color-border-default);
border-radius: var(--tec-border-radius-default);
display: flex;
flex-direction: column;
gap: var(--tec-spacer-3);
margin: 0 auto auto 0;
overflow: hidden;
border: 1px solid var(--tec-color-border-default);
}
}

Expand All @@ -55,6 +49,12 @@
}

> .tec-settings-form__sidebar-section {
background-color: var(--tec-color-background);
border-radius: var(--tec-border-radius-default);
overflow: hidden;
display: flex;
flex-direction: column;
gap: var(--tec-spacer-3);

.tec-settings-form__sidebar-section {
margin: 0 var(--tec-spacer-4);
Expand Down

0 comments on commit 95d8f9a

Please sign in to comment.