Skip to content

Commit 01657b2

Browse files
JohnMcLearclaude
andauthored
feat(plugins): surface ep.json disables in plugin card (#395)
Plugins that intentionally remove a baseline Etherpad feature (ep_disable_chat, ep_disable_change_author_name, etc.) declare which features they disable in their ep.json `disables` array — see the contract proposal at ether/etherpad#7648. Render that list in the plugin card with an amber note ("Disables: chat") so users see what they're losing before they install. The badge is gated on `disables` being present and non-empty, so plugins without a disables field render unchanged. Note: this UI change is safe to ship now even before the plugins.viewer.json build pipeline is updated to source `disables` from ep.json — when the field is absent the badge no-ops. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c4dfae7 commit 01657b2

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

src/components/Plugin.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ export const PluginCom: FC<PluginProps> = ({plugins}) => {
7878
</div>
7979
</div>
8080
<div>{plugins.description}</div>
81+
{plugins.disables && plugins.disables.length > 0 && (
82+
<div
83+
className="mt-2 px-3 py-2 rounded-md text-sm bg-amber-950/50 border border-amber-800/60 text-amber-200"
84+
title="This plugin intentionally removes the listed Etherpad features. See doc/PLUGIN_FEATURE_DISABLES.md."
85+
>
86+
<span className="font-semibold">Disables: </span>
87+
{plugins.disables
88+
.map((tag) => tag.replace(/^@feature:/, ''))
89+
.join(', ')}
90+
</div>
91+
)}
8192
<div className="flex gap-10">
8293
{plugins.images && plugins.images.map((img, i) => <img src={img} className="w-60 object-contain" key={plugins.name + i} alt={"Image of " + plugins.name}/>)}
8394
{plugins.readme && <div className="w-full line-clamp-5 readme-of-plugin"

src/store/Plugin.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,23 @@ export type PluginResponseVal = {
4747
email: string
4848
},
4949
compatibility?: CompatibilityStatus,
50-
images?: string[]
50+
images?: string[],
51+
/**
52+
* `@feature:*` Playwright tags for core specs that the plugin
53+
* intentionally disables. Sourced from the plugin's `ep.json`
54+
* `disables` array; see ether/etherpad-lite#7648 and
55+
* `doc/PLUGIN_FEATURE_DISABLES.md` for the contract.
56+
*
57+
* If present and non-empty, the plugin is one whose CI is permitted
58+
* to skip specs tagged with these features — but is also required
59+
* to make those specs FAIL (i.e. the plugin must actually disable
60+
* what it declares). Surfaced in the plugin card so users see what
61+
* a plugin removes before installing.
62+
*
63+
* May be undefined for plugins that don't disable any baseline
64+
* feature, which is the common case.
65+
*/
66+
disables?: string[]
5167
}
5268

5369

0 commit comments

Comments
 (0)