Skip to content

Add Workflow Comments - #1417

Merged
Yicong-Huang merged 50 commits into
masterfrom
jiyang-comment-backend
Mar 2, 2022
Merged

Yicong-Huang merged 50 commits into
masterfrom
jiyang-comment-backend

Conversation

@Jiyang-Wu

@Jiyang-Wu Jiyang-Wu commented Jan 26, 2022 •

Copy link
Copy Markdown
Contributor

Original PR #1293
-Updating Comments related stuff to the latest master configs and environment

Introduction

This PR includes the basic features of the Workflow Commenting feature of Texera--a feature implemented to support communication between contributors of a workflow and comprehension of people reading a workflow.

Early Stage :

  • Now can add commentBox objects onto the canvas
  • a pop-up window will be displayed when double-clicking the comment icon
  • delete button on the top right corner which allows you to delete the commentBox
  • after opening the pop-up window, you can edit comments by typing in the input box.
  • the input box stores newly added comments and previous comments in a list.
    Comments-Front-End

Lifecycle of Comments

A comment (the little dialog icon on canvas) consists of two components: a CommentBox and a list of Comments.
CommentBox is generated when the dialog icon pops up, it is a container object with information of an id as identifier and a point representing its position on the canvas, and an empty list of Comments.
Comment is generated and added to the list in CommentBox when someone types a comment and hits the send button. it contains information related to its creator, its content, and its creation time.
Refer to workflow-common.interface.ts for more details.
When the Delete button on the top-right corner of the icon is clicked, the commentBox gets deleted as well as all its corresponding comments.

Storage of Comments

Currently, CommentBoxes are components of a workflow (parallel with Links and Operators), it is persisted into the backend database as an attribute in the JSON object with every information embedded in -- position, ID, and all the comments inside. @Yicong-Huang, @zuozhiw and I have been discussing whether we should seperate comments from commentBoxes since the current method lacks the ability to handle detailed requests related to specific comments.

2022/02/26 Update

  • Updated to work with the share-editing feature.
  • Optimized front-end CommentBox UI for user-friendly purposes.

# Conflicts:
#	core/new-gui/src/app/app.module.ts
#	core/new-gui/src/app/dashboard/component/feature-container/user-file-section/user-file-section.component.html
#	core/new-gui/src/app/workspace/component/navigation/navigation.component.html
#	core/new-gui/src/app/workspace/component/navigation/navigation.component.ts
# Conflicts:
#	core/new-gui/src/app/app.module.ts
#	core/new-gui/src/app/common/type/workflow.ts
#	core/new-gui/src/app/dashboard/component/feature-container/user-file-section/user-file-section.component.html
#	core/new-gui/src/app/workspace/component/navigation/navigation.component.ts
#	core/new-gui/src/app/workspace/component/property-editor/property-editor.component.ts
#	core/new-gui/src/app/workspace/component/workflow-editor/workflow-editor.component.ts
#	core/new-gui/src/app/workspace/service/joint-ui/joint-ui.service.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/model/workflow-graph.ts
#	core/new-gui/src/app/workspace/service/workflow-graph/util/workflow-util.service.ts
#	core/new-gui/src/app/workspace/types/workflow-common.interface.ts
@Jiyang-Wu Jiyang-Wu changed the title Jiyang comment backend Implementing the Comments Feature Jan 26, 2022
@Yicong-Huang Yicong-Huang changed the title Implementing the Comments Feature Add Workflow Comments Jan 26, 2022
Comment thread core/scripts/sql/texera_ddl.sql Resolved

@Yicong-Huang Yicong-Huang left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR. Left some comments.

Also some general comments:

  1. please fix the format, then check for merge error. you can "review" your changes on GitHub yourself first to see if any changes are necessary. only include necessary changes, be careful that you might alter logic by others.
  2. please remove console logs, and whenever appropriate, use NotificationService to alert the user.
  3. please consider making CommentService to manage some logic in one place for the frontend. right now the logic of adding comments seems embedded in different components and services.
  4. use ng-zorro components to replace ngbootstrap.
  5. Use user-id to uniquely identify a user/creator of a comment. user-name is not unique.

Please address the comments and request for another round of review.

Comment thread core/scripts/sql/texera_ddl.sql Resolved
@Jiyang-Wu

Copy link
Copy Markdown
Contributor Author

Front-End Unit Tests updated, a GIF with new UI added to description

@Yicong-Huang Yicong-Huang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved with some fix.

@Yicong-Huang
Yicong-Huang merged commit 0edbbda into master Mar 2, 2022
@Yicong-Huang
Yicong-Huang deleted the jiyang-comment-backend branch March 2, 2022 08:49
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
Original PR apache#1293
-Updating Comments related stuff to the latest master configs and environment

## Introduction

This PR includes the basic features of the Workflow Commenting feature of Texera--a feature implemented to support communication between contributors of a workflow and comprehension of people reading a workflow.

Early Stage :
- Now can add `commentBox` objects onto the canvas
- a pop-up window will be displayed when double-clicking the comment icon
- delete button on the top right corner which allows you to delete the commentBox
- after opening the pop-up window, you can edit comments by typing in the input box.
- the input box stores newly added comments and previous comments in a list.
![Comments-Front-End](https://user-images.githubusercontent.com/72828385/156052516-c626c8c1-efb1-49c6-a2a1-9a9da3437f16.gif)

## Lifecycle of Comments
A comment (the little dialog icon on canvas) consists of two components: a **CommentBox** and **a list of Comments**. 
**CommentBox** is generated when the dialog icon pops up, it is a container object with information of an id as identifier and a point representing its position on the canvas, and an empty list of **Comments**.
**Comment** is generated and added to the list in **CommentBox** when someone types a comment and hits the send button. it contains information related to its creator, its content, and its creation time.
Refer to `workflow-common.interface.ts` for more details.
When the **Delete** button on the top-right corner of the icon is clicked, the commentBox gets deleted as well as all its corresponding comments.

## Storage of Comments
Currently, CommentBoxes are components of a workflow (parallel with Links and Operators), it is persisted into the backend database as an attribute in the JSON object with every information embedded in -- position, ID, and all the comments inside. @Yicong-Huang, @zuozhiw and I have been discussing whether we should seperate comments from commentBoxes since  the current method lacks the ability to handle detailed requests related to specific comments.

## 2022/02/26 Update
- Updated to work with the share-editing feature.
- Optimized front-end CommentBox UI for user-friendly purposes.

Co-authored-by: Yicong Huang <[email protected]>
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.

4 participants