Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export workflow #987

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Export workflow #987

merged 1 commit into from
Oct 16, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Oct 16, 2024

Important

Add export functionality for workflows in JSON and YAML formats in WorkflowActions.tsx.

  • Export Feature:
    • Added handleExport function in WorkflowActions.tsx to export workflows as JSON or YAML.
    • Introduced downloadFile function in WorkflowActions.tsx to facilitate file downloads.
    • Updated DropdownMenu in WorkflowActions.tsx to include export options.
  • Conversion Logic:
    • Modified convert function in workflowEditorUtils.ts to retain original workflow title during export.
  • UI Components:
    • Added DownloadIcon to export options in WorkflowActions.tsx.

This description was created by Ellipsis for 32100b8. It will automatically update as commits are pushed.

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add export functionality for workflows in JSON and YAML formats in `WorkflowActions.tsx`.
>
>   - **Export Feature**:
>     - Added `handleExport` function in `WorkflowActions.tsx` to export workflows as JSON or YAML.
>     - Introduced `downloadFile` function in `WorkflowActions.tsx` to facilitate file downloads.
>     - Updated `DropdownMenu` in `WorkflowActions.tsx` to include export options.
>   - **Conversion Logic**:
>     - Modified `convert` function in `workflowEditorUtils.ts` to retain original workflow title during export.
>   - **UI Components**:
>     - Added `DownloadIcon` to export options in `WorkflowActions.tsx`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for e09d41cbc2741afff9aded8ecac5c4510a3515e8. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 32100b8 in 34 seconds

More details
  • Looked at 145 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_gOnASNn7FJuSe32B


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

const element = document.createElement("a");
element.setAttribute(
"href",
"data:text/plain;charset=utf-8," + encodeURIComponent(contents),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using application/json as the MIME type for JSON files instead of text/plain. This ensures better compatibility and handling by browsers and other tools.

Suggested change
"data:text/plain;charset=utf-8," + encodeURIComponent(contents),
"data:application/json;charset=utf-8," + encodeURIComponent(contents),

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 32100b8 in 34 seconds

More details
  • Looked at 145 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:1072
  • Draft comment:
    The change to retain the original workflow title during export is correct and aligns with the PR description.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The convert function in workflowEditorUtils.ts is used to convert workflows for export. The change in the PR ensures the original title is retained during export, which aligns with the PR description.

Workflow ID: wflow_qjUSYppx4bDJT5PN


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

const element = document.createElement("a");
element.setAttribute(
"href",
"data:text/plain;charset=utf-8," + encodeURIComponent(contents),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using application/json as the MIME type for JSON files instead of text/plain. This ensures better compatibility and handling by browsers and other tools.

@msalihaltun msalihaltun merged commit 7341b92 into main Oct 16, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/export-workflow branch October 16, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants