mengw15 commented on code in PR #7314: URL: https://github.com/apache/texera/pull/7314#discussion_r3720913479
########## frontend/src/app/workspace/component/notebook-import-modal/notebook-import-modal.component.html: ########## @@ -0,0 +1,137 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<form + class="import-modal-form" + [formGroup]="importForm" + nz-form> + <div class="import-modal-diagram"> + <img + ngSrc="assets/notebook_migration_tool/tool_popup_diagram.png" + alt="Notebook to Workflow" + width="1646" + height="479" /> + </div> + + <nz-alert + class="import-modal-warning" + nzType="warning" + nzShowIcon + nzMessage="Generating overwrites your current workflow; the previous version is kept in version history."></nz-alert> + + <nz-form-item> + <p class="import-modal-text"> + This tool converts a Python Jupyter Notebook into a Texera workflow using LLM capabilities. After you submit a + notebook, the LLM service will generate a corresponding Texera workflow. The conversion time depends on the + notebook’s complexity and can take 1–5 minutes. Once the process is complete, the workflow workspace will reload + with: + </p> + <ol class="import-modal-list"> + <li> + The generated workflow ready to use (Note: you will still need to upload the dataset and connect it to the + workflow). + </li> + <li>A floating Jupyter window containing the uploaded notebook for reference.</li> + </ol> + <p class="import-modal-text"> + Feel free to navigate away from this tab while you wait for the workflow to generate. Please do not close the + window. + </p> + </nz-form-item> + + <nz-form-item> + <nz-form-label [nzNoColon]="true"> + <span class="import-modal-label"> Upload Python Jupyter Notebook </span> + </nz-form-label> + <nz-form-control> + <div class="import-modal-upload-row"> + <nz-upload Review Comment: Worth an `nzAccept=".ipynb"` here. Any file can be selected today, and the extension check runs in the opener after Submit — which resolves the callback `true` regardless of the result, so the modal closes and the file/model selection is lost even though no import started. ########## frontend/src/app/workspace/component/notebook-import-modal/notebook-import-modal.component.html: ########## @@ -0,0 +1,137 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<form + class="import-modal-form" + [formGroup]="importForm" + nz-form> + <div class="import-modal-diagram"> + <img + ngSrc="assets/notebook_migration_tool/tool_popup_diagram.png" + alt="Notebook to Workflow" + width="1646" Review Comment: The PNG is 1132×290 (`file` / IHDR header), so these don't match. `img[width][height]` maps to `aspect-ratio: auto attr(width)/attr(height)`: the box is reserved from the declared 3.44 ratio before load, then re-laid out at the real 3.90 once it arrives — about 23px of shift for everything below the diagram at `nzWidth: 700`. Dev builds also log NG0913, since the ratios differ by more than the 0.1 tolerance. `width="1132" height="290"` fixes both. No distortion either way — the scss sets `height: auto`. -- 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]
