Skip to content

Add cross-platform showcase filter with per-platform screenshots - #475

Open
lessevv wants to merge 1 commit into
NativePHP:mainfrom
lessevv:showcase-cross-platform-filter
Open

Add cross-platform showcase filter with per-platform screenshots#475
lessevv wants to merge 1 commit into
NativePHP:mainfrom
lessevv:showcase-cross-platform-filter

Conversation

@lessevv

@lessevv lessevv commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • Adds a fourth "Cross-Platform" pill to the public /showcase page filter,
    alongside the existing All Apps / Mobile / Desktop, for apps where both
    has_mobile and has_desktop are true. The data already supported this
    (independent booleans, and the submission form already lets you check
    both) - only the public filtering UI was missing it.
  • Lets submitters optionally upload separate Mobile and Desktop screenshot
    sets once both platforms are selected, via two new nullable
    mobile_screenshots / desktop_screenshots columns. The showcase card
    now shows whichever set matches the visitor's current filter, falling
    back to the original shared screenshots field when no override exists.
  • Backwards compatible by construction: single-platform submissions never
    touch the new columns, and the existing screenshots field/behavior is
    completely unchanged. The Filament admin's existing screenshots field is
    also untouched - the new per-platform fields are separate, only shown
    when both platform toggles are on.

Test plan

  • php artisan test tests/Feature/ShowcasePageTest.php (new - filter
    correctness for mobile/desktop/both, incl. per-platform screenshots)
  • php artisan test tests/Feature/ShowcaseSubmissionTest.php (extended
    - platform-specific screenshot storage, and cleanup when a platform
    is unchecked)
  • php artisan test tests/Unit/ShowcaseTest.php (new - screenshotsFor()
    fallback/override logic)
  • vendor/bin/pint --dirty --format agent

I wasn't able to run these myself in this environment - composer install
needs a licensed Flux UI Pro token I don't have access to here.

Apps that support both mobile and desktop had no way to be filtered
for on the public showcase page - only "Mobile" or "Desktop" existed
as tabs, even though has_mobile/has_desktop were already independent
flags on the model. Adds a third "Cross-Platform" filter tab backed
by the existing withMobile()/withDesktop() scopes.

Also lets a submitter differentiate screenshots by platform once both
are selected, so the showcase card can show the Mobile set on the
Mobile filter and the Desktop set on the Desktop filter. This is
opt-in and additive: the existing screenshots field keeps working
exactly as before for single-platform apps, and is used as the
fallback for both-platform apps that never split their screenshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant