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

   <!--
   Thanks for sending a pull request (PR)! Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: 
        [Contributing to 
Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
     2. Ensure you have added or run the appropriate tests for your PR
     3. If the PR is work in progress, mark it a draft on GitHub.
     4. Please write your PR title to summarize what this PR proposes, we 
       are following Conventional Commits style for PR titles as well.
     5. Be sure to keep the PR description updated to reflect all changes.
   -->
   
   ### What changes were proposed in this PR?
   
   Wires the Drive export action into the three UI surfaces where download is 
currently available. The download button in each location has been converted to 
a dropdown with "Download" and "Export to Drive" (or "Connect to Drive" when 
not connected) options:
   
   - **Dashboard list items** (`list-item.component`) — for workflows and 
datasets
   - **Dataset detail page** (`dataset-detail.component`) — separate dropdowns 
for per-version ZIP download and per-file download
   - **Workflow editor menu** (`menu.component`) — for the workflow JSON export 
button
   
   All three surfaces:
   - Call `DriveService.getToken()` on init to set initial connection state
   - Subscribe to `DriveService.onConnected()` to update state live and show a 
"Google Drive connected" toast when the OAuth flow completes in the popup
   - Show a "Exported to Google Drive" success toast on successful export
   - Keep the dropdown button highlighted while the menu is open
   - Fall back to `connect()` (or `connect(true)` on `invalid_grant`) when the 
user clicks "Connect to Drive" while not connected
   
   <img width="400" height="179" alt="Screenshot 2026-05-21 at 4 12 15 PM" 
src="https://github.com/user-attachments/assets/a505e328-9648-49b8-9161-5f77cb003a54";
 />
   <img width="1496" height="763" alt="Screenshot 2026-05-21 at 4 12 44 PM" 
src="https://github.com/user-attachments/assets/c0f410cf-1503-4c0a-b202-64efd25058c2";
 />
   <img width="1268" height="538" alt="Screenshot 2026-05-21 at 4 10 32 PM" 
src="https://github.com/user-attachments/assets/830dcd2c-8205-4746-9dfc-52bc15f99f42";
 />
   <img width="1054" height="659" alt="Screenshot 2026-05-21 at 4 10 47 PM" 
src="https://github.com/user-attachments/assets/08950920-9988-42ce-9348-4f6266ad6413";
 />
   <img width="252" height="67" alt="Screenshot 2026-05-21 at 4 11 02 PM" 
src="https://github.com/user-attachments/assets/b7b43ed2-6663-4246-a84b-23f3ff75a1ef";
 />
   
   ### Any related issues, documentation, discussions?
   
   Closes #4240
   
   ### How was this PR tested?
   
   Unit tests added for all three components:
   
   - **`list-item.component.spec.ts`** — `Drive integration` describe block: 
token status sets `isDriveConnected`, `onConnected` emission updates state and 
shows toast, `connect()` called when not connected, workflow and dataset export 
paths call `exportToDrive` and show success toast
   - **`menu.component.spec.ts`** — `Drive integration` describe block: same 
connection state coverage, plus `onClickDriveExportWorkflow` serializes 
workflow content and shows success toast
   - **`dataset-detail.component.spec.ts`** — new spec file: token status, 
`onConnected` toast, `onClickDriveExportVersion` and `onClickDriveExportFile` 
across connected/disconnected/missing-selection/success paths
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 4.6
   


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