Add cross-platform showcase filter with per-platform screenshots - #475
Open
lessevv wants to merge 1 commit into
Open
Add cross-platform showcase filter with per-platform screenshots#475lessevv wants to merge 1 commit into
lessevv wants to merge 1 commit into
Conversation
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.
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.
Summary
/showcasepage filter,alongside the existing All Apps / Mobile / Desktop, for apps where both
has_mobileandhas_desktopare 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.
sets once both platforms are selected, via two new nullable
mobile_screenshots/desktop_screenshotscolumns. The showcase cardnow shows whichever set matches the visitor's current filter, falling
back to the original shared
screenshotsfield when no override exists.touch the new columns, and the existing
screenshotsfield/behavior iscompletely 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 - filtercorrectness 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 agentI wasn't able to run these myself in this environment -
composer installneeds a licensed Flux UI Pro token I don't have access to here.