fix: perbaikan tampilan website ketika slider belum diisi#1040
Merged
Conversation
|
🔄 AI PR Review sedang antri di server...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Fix Placeholder Slider Website
Deskripsi
Menambahkan gambar placeholder dan styling minimum height pada komponen slider website untuk menjaga tampilan tetap konsisten ketika belum ada slide yang ditambahkan atau gambar slide tidak ditemukan.
Perubahan yang dilakukan:
public/web/css/openkab.css): Menambahkanmin-height: 350pxpada.header-carouseldan.header-carousel .owl-carousel-itembeserta centering layoutresources/views/web/partials/slider.blade.php): Menambahkan fallback image placeholder untuk kondisi empty state dan broken imageonerrorattribute pada img tag untuk menangani kasus gambar slide tidak ditemukan di storageAlasan perubahan:
Dampak perubahan:
✅ Visual Consistency: Slider selalu menampilkan area dengan tinggi minimum 350px
✅ Graceful Degradation: Placeholder image tampil saat tidak ada data atau gambar hilang
✅ No Breaking Changes: Perubahan hanya pada tampilan, tidak mengubah logic repository atau database
Masalah Terkait (Related Issue)
Langkah untuk mereproduksi (Steps to Reproduce)
Sebelum perbaikan (masalah):
Setelah perbaikan (fix):
Testing pada fitur lain yang terkait:
Daftar Periksa (Checklist)
Teknis Detail
Penjelasan Teknis
CSS Changes (
public/web/css/openkab.css):min-heightpada container mencegah layout collapseobject-fit: containmenjaga aspect ratio gambar placeholderBlade Template Changes (
resources/views/web/partials/slider.blade.php):@forelsedengan@emptyblock untuk menangani kondisi tidak ada slide$placeholderImagedi-define di@phpblock untuk menghindari nested Blade syntax issue di dalam attributeonerrorhandler mengganti src ke placeholder ketika gambar slide gagal dimuatKonfigurasi yang berubah
Tidak ada
Dependencies yang ditambahkan
Tidak ada dependencies baru
Testing
Manual Testing
Screenshots / Video
simplescreenrecorder-2026-05-19_14.05.09.mp4
Sebelum:
Area slider kosong atau menampilkan ikon broken image, layout collapse
Sesudah:
Area slider menampilkan gambar placeholder "no-image.png" dengan tinggi konsisten 350px, gambar ter-center di tengah carousel
Breaking Changes
Tidak ada
Migration Guide
Tidak diperlukan
References
Catatan tambahan: Perubahan ini bersifat visual-only dan tidak mempengaruhi logic bisnis atau data slide di database. Placeholder menggunakan asset yang sudah tersedia di
public/assets/img/no-image.png.