feat: padSelect helper + padToggle runtime-flag honor#10
Merged
Conversation
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
4 tasks
Sibling to padToggle but for non-boolean values chosen from a fixed list
(e.g. indent size, theme, language). Same architecture as padToggle:
- Server: padSelect({pluginName, settingId, l10nId, defaultLabel, options,
defaultValue}). Validates config, renders <select> with one <option>
per choice in mySettings + padSettings (latter gated on
Etherpad >= 2.7.4 ep_* passthrough patch + admin opt-in via
enablePluginPadOptions). Exposes loadSettings, clientVars,
eejsBlock_mySettings, eejsBlock_padSettings.
- Client: padSelect({…}). init({onChange}) binds the dropdowns, reads
cookie / pad option / default in priority order, fires onChange with
the effective value (and again whenever user picks or another
collaborator changes the pad-wide value via padoptions broadcast).
Exposes init + handleClientMessage_CLIENT_MESSAGE.
- Per-option l10n via {value, label, l10nId?}.
Bumps ep_plugin_helpers 0.3.1 -> 0.4.0 (new helper export).
Tests: 10 cases covering config validation, rendering, settings.json
defaultValue override, clientVars block shape.
JohnMcLear
force-pushed
the
feat/honor-runtime-flag
branch
from
May 8, 2026 09:07
40c9716 to
8a6cb7d
Compare
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
Two changes on this branch:
feat(padToggle): honor runtime settings.enablePluginPadOptions flag(f3bd6fc) — padToggle's pad-wide block now respects the runtimesettings.enablePluginPadOptionsflag in addition to the compile-timepadOptionsPluginPassthroughcapability. Without this, admins who haven't opted in still saw the (non-functional) pad-wide checkbox.feat: padSelect helper(40c9716) — sibling topadTogglefor non-boolean values chosen from a fixed list (e.g. indent size, theme, language). Same architecture: per-user cookie + pad-wide via the ep_* passthrough patch when available, with the same defensive degradation when the patch is missing. Per-option l10n via{value, label, l10nId?}. 10 unit tests covering config validation, rendering, settings.json overrides, and the clientVars block shape.The next consumer is
ep_syntax_highlighting, which now usespadSelectfor its 2-vs-4-spaces indent-size picker — an exact use casepadTogglecouldn't cover.Bumps version 0.3.1 → 0.4.0 (new helper export).
Test plan
npx mocha test/pad-select.js— 10 cases passnpx mocha test/pad-toggle.js— existing tests still passep_syntax_highlighting's indent picker; verified via Playwright probe that#options-indent-sizerenders in the user-settings panel with options[2, 4]and defaults to2.🤖 Generated with Claude Code