feat: migrate to ep_plugin_helpers padToggle (User + Pad Wide settings)#88
Merged
JohnMcLear merged 1 commit intomainfrom May 7, 2026
Merged
feat: migrate to ep_plugin_helpers padToggle (User + Pad Wide settings)#88JohnMcLear merged 1 commit intomainfrom
JohnMcLear merged 1 commit intomainfrom
Conversation
…ings The hand-rolled User Settings checkbox only let each user toggle the reference pane for themselves — there was no way for the pad creator to set a pad-wide default, no entry in the Pad Wide Settings panel, and the existing label had no l10n id. Switch to padToggle: same single checkbox in User Settings, plus a parallel checkbox in Pad Wide Settings that broadcasts to every connected client and is honored by enforceSettings. The hand-rolled referenceSettings.ejs template, the standalone eejs.js hook module, and the manual click wiring are gone — the helper owns checkbox rendering, cookie persistence, broadcast sync, enforce, and i18n. Server hooks now live in a top-level index.js to match the canonical layout. ep_plugin_helpers ^0.3.0 introduces padToggle. Pad-wide column degrades to a no-op on Etherpad cores without the ep_* padOptions passthrough patch (< 2.7.4); user-side toggle is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ⓘ 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. |
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
padTogglefromep_plugin_helpers ^0.3.0, so a parallel checkbox now appears in the Pad Wide Settings panel and broadcasts/persists/enforces the way native settings do.eejs.jsinto a top-levelindex.js(matching the canonical migration in ep_table_of_contents) and addloadSettings,clientVars, andeejsBlock_padSettingsexports.handleClientMessage_CLIENT_MESSAGEon the client so pad-wide broadcasts refresh local state, and replace the#options-referenceclick handler withreferenceToggle.init({onChange}).templates/referenceSettings.ejs(rendered checkbox is now generated by the helper) andeejs.js.ep_reference.titlel10n id withShow Reference / Quote creatoras the screen-reader fallback (previously the label had nodata-l10n-idat all).Test plan
pnpm run lintpasses (no new warnings).enforceSettingsset in pad options forces the user-side checkbox to follow the pad-wide value.DO NOT MERGE.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com