镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[harmony] Bug 2066699: Add extension hook: user_preferences_settings - #182

Open
justdave wants to merge 3 commits into
mainfrom
bug-2066699-harmony
Open

justdave wants to merge 3 commits into
mainfrom
bug-2066699-harmony

Conversation

@justdave

Copy link
Copy Markdown
Member

Details

Extension can add setting names to the %skip_settings hash to exclude them from the General Settings tab in User Preferences (for example if it will be managing them with custom UI from an additional settings tab).

Additional info

Test Plan

#156 will make use of this once it lands

@justdave
justdave requested review from dylanwh and mrenvoize August 26, 2026 08:57
@justdave
justdave added this pull request to stack #187 September 17, 2026 15:31
@justdave
justdave force-pushed the bug-2066699-harmony branch from b1c771f to 3a142af Compare October 24, 2026 04:27
mrenvoize
mrenvoize previously approved these changes Nov 1, 2026

@mrenvoize mrenvoize left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The hook filters in both DoSettings and SaveSettings in userprefs.cgi. Minor: the Example extension's hook skips example_pref, which is a custom form field rather than a General Settings entry, so the example is a no-op; worth changing it to a real setting name. The upstream twin (bugzilla/bugzilla#255) has a slightly different DoSettings structure, so please keep behaviour in step.

Extension can add setting names to the `%skip_settings` hash to exclude them from the General Settings tab in User Preferences (for example if it will be managing them with custom UI from an additional settings tab).
@justdave
justdave force-pushed the bug-2066699-harmony branch from ae45860 to 1281a61 Compare November 1, 2026 06:37

@mrenvoize mrenvoize left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after the rebase. The Example extension now registers a real setting (product_chooser), skips it in General Settings via the new hook, and saves it from its own tab with validation, which resolves my earlier comment about example_pref. The hook is filtered in both display and save paths in userprefs.cgi.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants