-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Data Cleaning] Add row + page selection state frontend #36120
Conversation
…n a single record is selected
…n the page checkbox in header is selected
...from the alpine data model
{% if is_checked %} | ||
checked="checked" | ||
{% endif %} | ||
name="selected_record" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had thought this would be selected_case
based on the previous commit. Is this overwriting selected_case
?
Why do these checkboxes even need names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is overriding it...I missed that. it should be {{column.name}}
, i'll update that in the later commits.
the reason they need names...you shall soon see :) the select page action will gather the list of ids on that page using this name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok turns out I don't want to use column.name, but the other commit is a bugfix if someone wants to use CaseSearchElasticRecord
with the default CheckBoxColumn
. It will throw an error without this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, got it
id="{{ css_id }}" | ||
class="form-check-input" | ||
type="checkbox" | ||
name="select_page" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: You might name this selected_page
to better match selected_record
and selected_case
.
Technical Summary
review commit-by-commit please
This PR introduces the
DataCleaningHtmxSelectionColumn
, a subclass ofCheckBoxColumn
, which handles display of the selection checkbox in the data cleaning table view.NOTE: There are several
#todo
placeholders in this PR where I will eventually add the backend logic to retrieve and update the actualBulkEditSession
selected record(s) state by updating the relatedBulkEditRecord
objects.Additionally, I introduce the client-side selection state logic, maintained through an alpine model.
Single record selection, updating the row styling:

All record selection, updating the selection state of the header checkbox:

note: this PR does not include the functionality for clicking on the header checkbox to select all records on the page.
Related JIRA ticket
https://dimagi.atlassian.net/browse/SAAS-16863
Feature Flag
DATA_CLEANING_CASES
Safety Assurance
Safety story
only affects logic behind a feature flag. no production workflows are affected
Automated test coverage
most important logic is already tested
QA Plan
not yet
Rollback instructions
Labels & Review