Skip to content

400 Inline edits#409

Open
PanickerAnsel wants to merge 3 commits intomainfrom
400-manual-data-collection-clicking-none-should-inline-edit-on-the-same-page-no-popup
Open

400 Inline edits#409
PanickerAnsel wants to merge 3 commits intomainfrom
400-manual-data-collection-clicking-none-should-inline-edit-on-the-same-page-no-popup

Conversation

@PanickerAnsel
Copy link
Copy Markdown
Collaborator

Fixes #400

What was changed?
The Data Collection page table has been updated. Specifically, the way users interact with empty (None) cells in the Treeview has been modified. A new inline editing component (CTkEntry) is now overlaid directly onto the table cell, replacing the need to launch the ChangeMeasurementsDialog popup for empty values.

Why was it changed?
This change addresses a workflow interruption during manual data collection. Previously, clicking on a None value to input data would open a separate window/popup, which was slow and disruptive to the data entry flow. By allowing inline editing, the interface becomes much faster and more responsive, allowing researchers to quickly input data down the list without navigating through extra windows.

How was it changed?
Modified data_collection_ui.py.
Added a single-click event bindingto detect exactly which cell the user clicks using self.table.identify(...).
Implemented _enter_inline_edit(self, row_id, column_id) which calculates the screen coordinates of the target cell using self.table.bbox() and instantly places a CTkEntry widget perfectly over the cell.
Added event bindings to the temporary CTkEntry widget: validates the input and seamlessly pipes it into the pre-existing self.change_selected_value(...) database method. and safely destroy the widget without saving if the user cancels.
Updated _open_selected_for_edit (the existing double-click handler) with a guard clause to intentionally ignore/return early on None values, ensuring the old popup window is no longer created for empty data points.

Copy link
Copy Markdown
Collaborator

@Jahnavidarisetti Jahnavidarisetti left a comment

Choose a reason for hiding this comment

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

Inline editing is currently enabled in both Manual and Automatic modes, which allows unintended edits during Automatic Mode. Please add a guard to restrict _enter_inline_edit so it only runs in Manual Mode and keeps cells read-only otherwise.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manual data collection: clicking None should inline-edit on the same page (no popup)

2 participants