This is an automated email from the ASF dual-hosted git repository.
aicam pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new bcbf58b6a1 chore(gui): add edit description button in workspace (#4271)
bcbf58b6a1 is described below
commit bcbf58b6a125ecc2719e24eee6e412c6c2b0a2fa
Author: Jaeyun Kim <[email protected]>
AuthorDate: Sat Mar 14 15:21:52 2026 -0700
chore(gui): add edit description button in workspace (#4271)
### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
This PR added a new button to the workspace UI, and it allows users to
edit workflow description in workspace. It calls the
`MarkdownDescriptionComponent` introduced in #4212.
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves
#1234`
or `Closes #1234`. If it is only related, simply mention the issue
number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Fixes #4209
### Screenshot of implementation
<img width="400" height="150" alt="image"
src="https://github.com/user-attachments/assets/3c4a7532-7781-40f2-b9df-d3b53faaf25b"
/>
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if
the PR
is tested with existing test cases. Make sure to include/update test
cases that
check the changes thoroughly including negative and positive cases if
possible.
If it was tested in a way different from regular unit tests, please
clarify how
you tested step by step, ideally copy and paste-able, so that other
reviewers can
test and check, and descendants can verify in the future. If tests were
not added,
please describe why they were not added and/or why it was difficult to
add.
-->
Manually tested.
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
PR,
please include the phrase: 'Generated-by: ' followed by the name of the
tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for
details.
-->
Generated-by: ChatGPT 5.2
---
.../workspace/component/menu/menu.component.html | 8 +++++
.../app/workspace/component/menu/menu.component.ts | 39 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/frontend/src/app/workspace/component/menu/menu.component.html
b/frontend/src/app/workspace/component/menu/menu.component.html
index 7433ccab67..c1c8e8662c 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.html
+++ b/frontend/src/app/workspace/component/menu/menu.component.html
@@ -141,6 +141,14 @@
nz-icon
nzType="download"></i>
</button>
+ <button
+ (click)="onClickEditDescription()"
+ nz-button
+ title="change description">
+ <i
+ nz-icon
+ nzType="info-circle"></i>
+ </button>
</nz-button-group>
<ng-template #utilities>
<nz-button-group>
diff --git a/frontend/src/app/workspace/component/menu/menu.component.ts
b/frontend/src/app/workspace/component/menu/menu.component.ts
index 8ee4cf622d..2a13a28613 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.ts
+++ b/frontend/src/app/workspace/component/menu/menu.component.ts
@@ -57,6 +57,7 @@ import { ComputingUnitSelectionComponent } from
"../power-button/computing-unit-
import { GuiConfigService } from "../../../common/service/gui-config.service";
import { DashboardWorkflowComputingUnit } from
"../../types/workflow-computing-unit";
import { Privilege } from "../../../dashboard/type/share-access.interface";
+import { MarkdownDescriptionComponent } from
"../../../dashboard/component/user/markdown-description/markdown-description.component";
/**
* MenuComponent is the top level menu bar that shows
@@ -607,6 +608,44 @@ export class MenuComponent implements OnInit, OnDestroy {
saveAs(new Blob([workflowContentJson], { type: "text/plain;charset=utf-8"
}), fileName);
}
+ /**
+ * Calls Markdown Description Component
+ */
+ public onClickEditDescription(): void {
+ const currentWorkflow = this.workflowActionService.getWorkflow();
+ const currentDescription = currentWorkflow.description ?? "";
+
+ const modalRef = this.modalService.create<MarkdownDescriptionComponent>({
+ nzTitle: "Edit Workflow Description",
+ nzContent: MarkdownDescriptionComponent,
+ nzData: {
+ description: currentDescription,
+ },
+ nzWidth: "900px",
+ nzMaskClosable: true,
+ nzKeyboard: true,
+ nzClosable: true,
+ nzFooter: null,
+ });
+
+ const comp: MarkdownDescriptionComponent = modalRef.getContentComponent();
+
+
comp.descriptionChange.pipe(untilDestroyed(this)).subscribe((updatedDescription:
string) => {
+ const updatedWorkflow: Workflow = {
+ ...currentWorkflow,
+ description: updatedDescription,
+ };
+
+ this.workflowActionService.setWorkflowMetadata(updatedWorkflow);
+
+ if (this.userService.isLogin()) {
+ this.persistWorkflow();
+ }
+
+ modalRef.close();
+ });
+ }
+
/**
* Returns true if there's any operator on the graph; false otherwise
*/