fix(registry,programs): restore readonly=disabled and editable lists broken by lint#59
Conversation
…s broken by lint The lint commit 7bd3831 incorrectly changed readonly="disabled" to readonly="1" and removed editable attributes from list views, making membership, IDs, and relationship fields read-only in the UI. Affected views: - spp_registry: group/individual membership, reg_ids, relationships - spp_programs: program membership reg_ids, relationships, duplicates
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical regression that rendered several key list views uneditable within the application's forms. By restoring the correct Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Add group_membership_ids, individual_membership_ids, reg_ids, related_1_ids, related_2_ids, and beneficiary_ids to the allow_editable_o2m list so the ui.large_o2m_editable lint rule does not flag them in future runs.
There was a problem hiding this comment.
Code Review
This pull request fixes a regression introduced by a linting tool, which made several list views read-only. The changes correctly restore the editable attributes on lists and adjust the readonly properties on fields, allowing users to again edit memberships, IDs, and relationships. The changes are consistent with the description and appear to solve the issue. I've added a few minor suggestions to improve XML formatting consistency across the modified files for better long-term maintainability.
| <field name="beneficiary_ids" nolabel="1" colspan="2"> | ||
| <list delete="0" editable="bottom"> |
There was a problem hiding this comment.
For consistency with other view files in this pull request (e.g., spp_registry/views/individual_views.xml) and for better readability, consider placing attributes of the <field> and <list> tags on separate lines.
| <field name="beneficiary_ids" nolabel="1" colspan="2"> | |
| <list delete="0" editable="bottom"> | |
| <field | |
| name="beneficiary_ids" | |
| nolabel="1" | |
| colspan="2" | |
| > | |
| <list | |
| delete="0" | |
| editable="bottom" | |
| > |
| <page string="IDs" name="ids"> | ||
| <field name="reg_ids" nolabel="1" colspan="2" readonly="1"> | ||
| <list> | ||
| <field name="reg_ids" nolabel="1" colspan="2"> |
| readonly="1" | ||
| > | ||
| <list> | ||
| <field name="related_1_ids" nolabel="1" colspan="2"> |
| <field name="group_membership_ids" readonly="disabled" nolabel="1"> | ||
| <list editable="top" default_order='status asc,ended_date asc'> |
There was a problem hiding this comment.
For consistency with other view files in this PR (e.g., spp_registry/views/individual_views.xml) and for better readability, consider placing attributes of the <field> and <list> tags on separate lines.
| <field name="group_membership_ids" readonly="disabled" nolabel="1"> | |
| <list editable="top" default_order='status asc,ended_date asc'> | |
| <field | |
| name="group_membership_ids" | |
| readonly="disabled" | |
| nolabel="1" | |
| > | |
| <list | |
| editable="top" | |
| default_order="status asc,ended_date asc" | |
| > |
| <separator string="Group Membership" /> | ||
| <field name="individual_membership_ids" readonly="1" nolabel="1"> | ||
| <list> | ||
| <field name="individual_membership_ids" readonly="disabled" nolabel="1"> |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #59 +/- ##
==========================================
- Coverage 72.02% 68.97% -3.05%
==========================================
Files 65 400 +335
Lines 6148 32081 +25933
==========================================
+ Hits 4428 22128 +17700
- Misses 1720 9953 +8233
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Why is this change needed?
Commit
7bd3831(lint migration) incorrectly changedreadonly="disabled"toreadonly="1"and removededitableattributes from list views. This made membership, IDs, and relationship fields read-only — users can no longer add members, IDs, or relationships directly from the registrant form.How was the change implemented?
Restored
readonly="disabled"andeditable="top"/editable="bottom"on all affected fields across 5 files:spp_registry:
group_membership_views.xml—group_membership_idsindividual_membership_views.xml—individual_membership_idsindividual_views.xml—reg_ids,related_1_ids,related_2_ids(both Individual and Group forms)spp_programs:
program_membership_view.xml—reg_ids,related_1_ids,individual_membership_idsduplicate_view.xml—beneficiary_idsNew unit tests
N/A — view-only fix, no logic changes.
Unit tests executed by the author
N/A
How to test manually
Related links
Lint commit that caused the regression:
7bd3831