Skip to content

UI Improvements for Locked Admin Questions#1229

Open
nospame wants to merge 10 commits intomasterfrom
ejp/locked-questions-ui-improvements
Open

UI Improvements for Locked Admin Questions#1229
nospame wants to merge 10 commits intomasterfrom
ejp/locked-questions-ui-improvements

Conversation

@nospame
Copy link
Copy Markdown
Contributor

@nospame nospame commented Apr 23, 2026

Product Description

Adds form tree indicators for question locked status, updates question property enabled state immediately based on locking/unlocking, and adds a "select all"-like lock and unlock for all questions contained in a group when it gets locked or unlocked.

Not shown: removes "Edit Source XML" and "Edit Bulk Translations" options when a form contains any locked questions and the edit_locked_questions feature is false or absent.

Screen.Recording.2026-04-23.at.12.27.43.PM.mov

Technical Summary

https://dimagi.atlassian.net/browse/SAAS-19545
UI updates as noted in product description, as well as some small refactors for code readability and efficiency.

Feature Flag

In HQ the lock plugin is enabled by LOCKED_ADMIN_QUESTIONS.

Safety Assurance

Safety story

Tested functionality locally. The vast majority of changes here are limited to the lock plugin so any current issues would be constrained to only those with the feature flag enabled for testing purposes, with any remaining edge cases hopefully caught by QA.

Automated test coverage

Automated testing is added or modified for the key functionality added in this PR.

QA Plan

This feature will get QA as a whole before removing the feature flag and making it generally available.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

nospame and others added 10 commits April 14, 2026 10:05
- Locked groups show 'unlock' if they contain any unlocked questions
- Updates icon when setting is changed

Co-Authored-By: Claude <noreply@anthropic.com>
Walk up from the changed mug to update parent group icons via
setTreeExtraIcons. Only locked Groups are checked since they're
the only nodes whose icon varies based on children's lock state.
Add test for parent icon updating when child is locked/unlocked.

Co-Authored-By: Claude <noreply@anthropic.com>
- the form has any locked questions
- edit_locked_questions feature is false or absent
Set explicitly on children rather than having each child check its parent
Toggling a group's lock now recurses through all descendants so nested
children match the group's new state. Descendants remain independently
toggleable afterwards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant