the marketplace is browsed by tag, not scrolled
/marketplace was a list of every plugin on the left and a preview on the right. that is a fine control panel and a poor shop: twenty-one rows sorted by nothing anybody cares about, where "something for my calendar" means reading all of them. now: tags down the left with counts, cards in a grid on the right, and clicking a card takes over the panel with a back link. three things about the shape. BOTH the filter and the selection are in the URL — ?tag= and ?selected=. a filter in component state is lost on Back, so filtering, opening a plugin and pressing Back would drop you in an unfiltered grid having lost your place. browser Back works for free for the same reason. selecting a tag also CLEARS the selection, because a detail for a plugin outside the new filter is a page the grid you are now looking at cannot return to. the detail REPLACES the grid rather than sitting beside it. a grid needs the width and a detail beside one gets half of it; neither reads well. the back link drops ?selected= and keeps ?tag=, which is the entire point of putting the filter there. the panel KEYS are unchanged though both components were replaced. a stored layout names them, and renaming would drop everyone back to the default arrangement for nothing — the key identifies a slot, not an implementation. two things found on the way. PluginItem and AvailablePlugin had no tags, so the api now carries them on both branches — from the manifest for a plugin that is here, from the catalogue for one that is not, same field either way. and the screen used useDashboardState, which persists the whole tree: the panels this ships would never have reached anyone who had opened it before. useAuthoredLayout takes the structure from source and persists only sizes, which is what an authored screen wants. 21/22 -> 22/78 as well: the left panel holds seven tags now, not twenty-one rows, and the width is worth more to the grid. verified: bundle contains the new panels, api returns tags for all 21 with none missing the field. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -99,6 +99,9 @@ pluginsRouter.get('/', async (ctx) => {
|
||||
prefix: e.publisher === 'officerdev' ? `/${e.appName}` : `/p/${e.publisher}/${e.appName}`,
|
||||
label: e.label,
|
||||
summary: e.summary,
|
||||
// What it is FOR, which is how the store is browsed. From the catalogue for a plugin that is not
|
||||
// here yet, from the manifest below for one that is — the same field either way.
|
||||
tags: e.tags ?? [],
|
||||
image: e.iconUrl,
|
||||
// Same precedence the installed list uses: artwork wins, the glyph name is the fallback.
|
||||
...(e.iconUrl ? {} : { icon: e.icon }),
|
||||
@@ -131,6 +134,7 @@ pluginsRouter.get('/', async (ctx) => {
|
||||
prefix: mountPrefix(plugin),
|
||||
label: plugin.manifest.label,
|
||||
summary: plugin.manifest.summary,
|
||||
tags: plugin.manifest.tags ?? [],
|
||||
icon: plugin.manifest.icon,
|
||||
// The plugin's own artwork, once published. Only while INSTALLED: `publishAssets` copies
|
||||
// `assets/` into `public/plugins/<appName>/` at install and `unpublishAssets` removes it, so a
|
||||
@@ -147,9 +151,9 @@ pluginsRouter.get('/', async (ctx) => {
|
||||
version: plugin.manifest.version,
|
||||
platform: plugin.manifest.platform,
|
||||
permissions: plugin.manifest.permissions,
|
||||
// What the owner must be able to set. Declared rather than rendered by the plugin, so a backend
|
||||
// plugin with no frontend of its own still gets a settings form — see `PluginSettings.tsx`.
|
||||
settings: plugin.manifest.settings ?? [],
|
||||
// What the owner must be able to set. Declared rather than rendered by the plugin, so a backend
|
||||
// plugin with no frontend of its own still gets a settings form — see `PluginSettings.tsx`.
|
||||
settings: plugin.manifest.settings ?? [],
|
||||
// What the tree declared. The UI shows these so "installed but does nothing" is legible.
|
||||
has: {
|
||||
api: !!plugin.api,
|
||||
|
||||
Reference in New Issue
Block a user