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

[OE/ADVAPP-945]: Feature Flag Cleanup: EnableBrandingBar #1076

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
use Filament\Forms\Get;
use Filament\Forms\Form;
use Filament\Pages\SettingsPage;
use App\Features\EnableBrandingBar;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Components\TextInput;
use App\Filament\Clusters\GlobalSettings;
Expand Down Expand Up @@ -82,7 +81,7 @@ public function form(Form $form): Form
Toggle::make('dismissible')
->inline(false)
->label('Dismissible')
->visible(fn (Get $get) => EnableBrandingBar::active() && $get('is_enabled'))
->visible(fn (Get $get) => $get('is_enabled'))
->columnSpanFull(),
TextInput::make('college_text')
->label('College Text')
Expand All @@ -107,7 +106,7 @@ public function save(): void
$settings = app(CollegeBrandingSettings::class);

// Check the specific field
if (EnableBrandingBar::active() && ! $settings->dismissible) {
if (! $settings->dismissible) {
User::query()->update(['is_branding_bar_dismissed' => false]);
}
}
Expand Down
47 changes: 0 additions & 47 deletions app/Features/EnableBrandingBar.php

This file was deleted.

3 changes: 1 addition & 2 deletions app/Filament/Pages/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
use Filament\Facades\Filament;
use App\Settings\DisplaySettings;
use Filament\Actions\ActionGroup;
use App\Features\EnableBrandingBar;
use Filament\Forms\Components\Grid;
use Illuminate\Support\Facades\Hash;
use Filament\Forms\Components\Select;
Expand Down Expand Up @@ -269,7 +268,7 @@ public function form(Form $form): Form
->schema([
Toggle::make('is_branding_bar_dismissed'),
])
->visible(fn (CollegeBrandingSettings $settings) => EnableBrandingBar::active() && $settings->dismissible),
->visible(fn (CollegeBrandingSettings $settings) => $settings->dismissible),
Section::make('Connected Accounts')
->description('Disconnect your external accounts.')
->aside()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
@php
use App\Settings\CollegeBrandingSettings;
use Filament\Support\Enums\MaxWidth;
use App\Features\EnableBrandingBar;

$navigation = filament()->getNavigation();
$collegeBrandingSettings = app(CollegeBrandingSettings::class);
Expand All @@ -48,14 +47,7 @@
<x-filament-panels::topbar :navigation="$navigation" />

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::TOPBAR_AFTER, scopes: $livewire->getRenderHookScopes()) }}
@if ($collegeBrandingSettings->is_enabled && ! EnableBrandingBar::active())
<div
style="--c-600: {{ \Filament\Support\Colors\Color::all()[$collegeBrandingSettings->color][600] }}"
class="sticky top-16 z-10 bg-custom-600 text-sm font-medium text-white px-6 py-2 flex items-center h-10"
>
{{ $collegeBrandingSettings->college_text }}
</div>
@elseif ($collegeBrandingSettings->is_enabled && EnableBrandingBar::active())
@if ($collegeBrandingSettings->is_enabled)
<livewire:branding-bar />
@endif

Expand Down Expand Up @@ -140,7 +132,7 @@ class="fi-sidebar-close-overlay fixed inset-0 z-30 bg-gray-950/50 transition dur

<x-filament-panels::sidebar
:navigation="$navigation"
:has-branding-bar="EnableBrandingBar::active() ? $collegeBrandingSettings->is_enabled && ! $currentUser->is_branding_bar_dismissed : $collegeBrandingSettings->is_enabled"
:has-branding-bar="$collegeBrandingSettings->is_enabled && ! $currentUser->is_branding_bar_dismissed"
class="fi-main-sidebar"
/>

Expand Down