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

   ### What changes were proposed in this PR?
   
   This PR lets users add Python UDF parameters directly from the properties 
panel.
   
   The parameter list now includes a dashed **Add parameter** button. Clicking 
it opens an inline draft row where the user can enter a name, select a 
supported type, and confirm with the check button or Enter, or cancel with the 
close button or Escape.
   
   Confirming the draft inserts a `self.UiParameter(...)` declaration into the 
operator's shared Python code. The code remains the single source of truth: the 
parameter row appears through the existing parse-and-sync flow instead of being 
written directly into the form model.
   
   The insertion logic:
   
   - groups new declarations with existing `UiParameter` declarations;
   - inserts into an existing `open()` method when available;
   - creates `open()` when it is absent;
   - handles docstrings, decorators, `pass`, comments, and empty class bodies;
   - converts display names into safe Python assignment targets while 
preserving the exact parameter name;
   - rejects missing names, duplicate declarations, unsupported types, and 
unsupported UDF code shapes.
   
   <!-- Add before/after properties-panel screenshots here before marking the 
PR ready. -->
   
   ### Any related issues, documentation, discussions?
   
   <!-- Issue link will be inserted immediately after issue creation. -->
   
   ### How was this PR tested?
   
   Manual verification by the author covered the add, confirm/cancel, 
declaration insertion, and properties-panel synchronization flows.
   
   Frontend CI formatting and lint:
   
   ```bash
   cd frontend
   yarn format:ci
   ```
   
   The command passes.
   
   The updated specifications cover component actions and error states, 
shared-code insertion and synchronization, declaration placement, identifier 
sanitization, duplicate names, unsupported types, unsupported classes, and 
malformed class bodies.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code Fable 5 Ultra, OpenAI Codex 5.6 Ultra, and Me
   


-- 
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