Skip to content

Resolve #388 - #1340

Merged
adkinsrs merged 2 commits into
develfrom
388-enabling-deletingadding-genes-when-editing-gene-carts
Oct 2, 2026
Merged

adkinsrs merged 2 commits into
develfrom
388-enabling-deletingadding-genes-when-editing-gene-carts

Conversation

@adkinsrs

@adkinsrs adkinsrs commented Oct 2, 2026

Copy link
Copy Markdown
Member

This pull request adds support for editing the genes in an "unweighted-list" gene cart directly from the user interface. It introduces a new editable textarea for gene symbols, updates the backend to handle gene list changes, and ensures the database is updated properly when genes are modified. The changes also improve the user experience by updating the gene count and preview dynamically.

Backend changes for gene list editing:

  • Added a save_members method and a remove_all_members method to the gene cart model in lib/geardb.py, allowing for safe replacement of gene cart members when editing. [1] [2]
  • Updated the save method in lib/geardb.py to use the new save_members method for "unweighted-list" carts, ensuring that gene members are properly handled on save.
  • Modified save_genecart_changes.cgi to accept and process a genes parameter, cleaning and splitting the input, and updating the gene cart members accordingly. [1] [2]

Frontend changes for gene list editing:

  • Updated gene_list_manager.html to include a new editable textarea for genes when editing "unweighted-list" gene carts.
  • Modified gene_list_manager.js to show/hide the gene textarea appropriately, fetch and display current gene symbols, and send gene changes to the backend. The gene count and preview are updated after edits. [1] [2] [3]
  • Updated common.v2.js to allow sending an optional genes field in the save request payload.

User interface improvements:

  • Updated the tooltip for the edit button to clarify that it edits the gene list.

Minor code cleanup:

  • Commented out some debug print statements in search_gene_carts.cgi.
  • Removed an outdated comment in geardb.py regarding foreign key cascade deletes.

@adkinsrs adkinsrs linked an issue Oct 2, 2026 that may be closed by this pull request
@adkinsrs
adkinsrs merged commit 5c16ee7 into devel Oct 2, 2026
2 checks passed
@adkinsrs
adkinsrs deleted the 388-enabling-deletingadding-genes-when-editing-gene-carts branch October 5, 2026 13:00
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.

Enabling deleting/adding genes when editing gene carts

1 participant