eugenegujing opened a new pull request, #9042:
URL: https://github.com/apache/texera/pull/9042

   ### What changes were proposed in this PR?
   
   The Volcano Plot uses `hover_name=table.columns[0]`, so the tooltip label is 
whatever column comes first in the input. That is fine for a DESeq2 table 
starting with `gene` and useless for one starting with a composite id or a 
number, and there is no way to change it. This PR copies Scatter Plot's `Hover 
column` property over, one column only.
   
   | Hover column | Result |
   |---|---|
   | empty or whitespace-only (default) | `hover_name=table.columns[0]`, 
unchanged for saved workflows |
   | set, present in the input | `hover_name=<that column>` |
   | set, missing from the input | the operator's error page `Missing hover 
column in table.`, like the existing check for the two required columns 
(Scatter Plot lets plotly raise a `ValueError` here) |
   
   Independent of the label-fix (#9037) and significance-threshold (#9039) PRs; 
all three touch neighbouring lines of `VolcanoPlotOpDesc.scala`, so whichever 
lands second needs a small rebase.
   
   Figures below are the operator's generated Python from `main` and from this 
branch (Hover column = `gene`), run on the 430-gene example workflow from the 
issue whose first column is `transcript|gene|chr|strand`; the same point is 
hovered in both.
   
   | Before | After (Hover column = gene) |
   |---|---|
   | <img width="1398" height="849" alt="hover-before-first-column" 
src="https://github.com/user-attachments/assets/57df5276-196c-45b4-946d-098d77f739cb";
 /> | <img width="1398" height="849" alt="hover-after-gene" 
src="https://github.com/user-attachments/assets/2aca08f2-e817-4ea2-940f-ce90eeb447e4";
 /> |
   
   ### Any related issues, documentation, discussions?
   
   Closes #9038
   
   PR #8504 adds a `generateStandaloneCode()` path to this operator that copies 
the current template, including `hover_name=table.columns[0]`. Whichever lands 
first, the other needs a follow-up.
   
   ### How was this PR tested?
   
   New tests in `VolcanoPlotOpDescSpec`, written before the source change:
   
   - empty or whitespace-only field keeps `hover_name=table.columns[0]` and 
emits no hover check
   - a set field emits the decoded column as `hover_name` plus the presence 
check, and no `table.columns[0]`
   - a column name with quotes and non-ASCII text reaches the code only as a 
decode site
   - a workflow JSON saved before this change generates byte-for-byte the same 
code as a default-constructed operator
   
   ```
   sbt -Dsbt.server.forcestart=true "WorkflowOperator/testOnly 
*VolcanoPlotOpDescSpec"
   # Tests: succeeded 11, failed 0, canceled 0, ignored 0, pending 1   (the 
pending one is pre-existing)
   
   sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafmtAll" 
"WorkflowOperator/Test/scalafmtAll"
   sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafixAll --check"
   # success
   ```
   
   Smoke run outside Texera (pytexera stubbed, pandas + plotly 5.24.1) on the 
430-gene mock table: defaults hover-label the first point as 
`ENST00000000000|GENE_0000|chr2|+`; Hover column = `gene` gives `GENE_0000`; 
Hover column = `no_such_column` yields `<h1>Volcano Plot failed</h1><p>Missing 
hover column in table.</p>`.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: Claude Code (claude-fable-5-1). Co-authored with Claude; 
the author reviewed the change before submission.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to