Open
Conversation
Contributor
Frontend previewsLast deployed commit is a4300d5eea4644b34ad6c2388d787cc4f20a589e
|
54f0a60 to
e70cd2c
Compare
Signed-off-by: Calum H. <calum@modrinth.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
storybook | da7eb2b | Feb 13 2026, 03:21 PM |
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
ContentPageLayoutcomponent used by both the app frontend (Mods.vue) and hosting frontend (content.vue), eliminating duplicated UI codeContentManagerContextdependency injection provider that decouples platform-specific API logic from the shared layoutuseV1ContentTabAPIfeature flag, allowing the old v0 file-based API to remain as the default for nowContent page layout (
ContentPageLayout.vue)Previously, the app's
Mods.vueand hosting'scontent.vueeach maintained their own implementations of the content management UI (search, filters, sorting, bulk actions, modpack card, empty states, confirmation modals, etc.). This PR extracts all of that into a singleContentPageLayoutcomponent in@modrinth/ui(~774 lines).The layout consumes its data and actions entirely through dependency injection rather than props, so platform-specific pages only need to provide their handlers via
provideContentManager()and then render<ContentPageLayout />.Shared composables were also extracted into
packages/ui/src/composables/content/:useContentSearch- fuzzy search via Fuse.jsuseContentFilters- dynamic filter pills (by type, updates, disabled)useContentSelection- multi-select stateuseBulkOperation- progress tracking with navigation guardsuseChangingItems- per-item loading statesDependency injection (
ContentManagerContext)A new DI provider at
packages/ui/src/providers/content-manager.tsdefines the contract betweenContentPageLayoutand its platform-specific implementations. The context includes:items,loading,error,refresh,toggleEnabled,deleteItem,browse,uploadFiles,mapToTableItembulkDeleteItems,bulkEnableItems,bulkDisableItems(hosting v1 only),updateItem,bulkUpdateItem,hasUpdateSupport(app only),shareItems,getOverflowOptions,uploadState, modpack actionsThis means the app's
Mods.vueprovides Tauri-backed handlers with update/share/export support, while hosting'scontent.vueprovides API-backed handlers with optional bulk operations - all feeding into the same layout.Feature flags (v0/v1 content API)
A
useV1ContentTabAPIfeature flag inapps/frontend/src/composables/featureFlags.tscontrols which hosting content API is used:archon.content_v0- individual toggle/delete calls that rename files with.disabledsuffixarchon.content_v1- supports bulk enable/disable/delete endpoints, modpack unlinking, and the new addon modelThe hosting
content.vuepage maintains dual query instances (only one enabled at a time) and conditionally provides bulk operation handlers to the layout only when v1 is active. The flag is passed as a prop from the page wrapper:<ServersManageContentPage :use-v1-api="flags.useV1ContentTabAPI" />.