Repository navigation
Added operator grouping feature - #754
Merged
Merged
Conversation
zuozhiw
reviewed
May 1, 2020
| * Returns true if there're at least two highlighted operators | ||
| * and none of them is already embedded in a group. | ||
| */ | ||
| public operatorsGroupable(): boolean { |
Contributor
There was a problem hiding this comment.
the same logic is in Group Serivce groupOperators, move this function to group service
| * position according to the relative offset, so that operators are in the | ||
| * right position when the moved group is expanded. | ||
| */ | ||
| private handleGroupPositionChange(): void { |
Contributor
There was a problem hiding this comment.
add comment why we only handle collapsed case - in expand case, jointjs will automatically do that
MysteriousChallenger
force-pushed
the
abigail-group-operators
branch
from
November 17, 2020 19:43
f67602d to
4c4f25b
Compare
when deleting a 2-group and an operator in said group simultaneously, the internal operator is deleted first, breaking the group (because it is now a group-of-one). Because the 2-group no longer exists, it cant be deleted, raising an error.
groups can now be copied and pasted. If an operator and its group are highlighted to be copied, the operator is not copied (since it will be copied with the group)
when a group is collapsed, operator joint-graph-cells are deleted, therefore operator statistics (processed: x, output: y), which are attributes of graph cells, cannot be applied to nonexistent cells. Now groups keep operator statistics in OperatorInfo, and workflow-service listens for group expanding event to applies operator statistics tooltip.
when typing in operator property editor, the selected operator gets un-highlighted, closing the property editor. This was due to improper use of Array.splice. Normal behavior is to unhighlight all other operators except the one being edited. However, the operator being edited was not properly spliced out of the list to be unhighlighed
added comments fixed formatting minor refactoring of names of variables
MysteriousChallenger
force-pushed
the
abigail-group-operators
branch
from
November 26, 2020 22:58
8f5d32b to
b41976d
Compare
filters out operators in collapsed groups from consideration for the translate limit
zuozhiw
approved these changes
Dec 11, 2020
zuozhiw
left a comment
Contributor
There was a problem hiding this comment.
Looks very good. We'll be merging this very complex and useful feature to master now :)
Thanks a lot for the efforts and contributions @Mescetina @MysteriousChallenger
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
Added operator grouping feature apache#754 Authored-by: Abigail (Yingyu) Yang <[email protected]> Co-authored-by: Albert Liu <[email protected]> Co-authored-by: Zuozhi Wang<[email protected]> ## **Couple rules that restrict grouping:** 1. In-links of a group are links whose source operators are outside of the group, and target operators are inside of the group. 2. Out-links of a group are links whose target operators are outside of the group, and source operators are inside of the group. 3. There are always at least two operators in a group. 4. Groups can't be overlapping: no group can be created inside of another group. 5. When a group is expanded, user can delete operators in the group, and add & delete links, in-links & out-links of the group. 6. When a group is collapsed, user can only delete in-links and out-links of the group, and add those links back with undo (undo is not yet implemented). 7. Once a group is created, user can't add new operators to the group (plan to change this later) ## **Group operators:** User can group multiple operators together by selecting them and clicking on the group button in nav bar. All selected operators are considered as part of the group. Links whose source and target operators are both in the group are also considered as part of the group. A newly added group and its in-links & out-links are placed in front of everything else on the graph. ## **Ungroup operators:** When there are less than two operators in a group, the group will be automatically ungrouped and remaining operator and links will be freed. ## **Collapse group:** User can collapse a group by clicking on the minus sign on the top-right corner of a group. When a group is collapsed, all operators and links in the group are hidden (temporarily deleted from joint graph, but still exist in texera graph). The group's in-links & out-links will be redirected to connect to the group element instead. ## **Expand group:** User can expand a group by clicking on the plus sign button on the top-right corner of a collapsed group. When a group is expanded, operators and links that are hidden will be re-shown on the graph. In-links & out-links will be directed back to their original operators. ## **Moving group & operators:** When an operator inside a group moves, the group will be repositioned and resized based on where the operator is moved to. So the group will follow its operators as they move. When a group is moved, all operators inside it moves as well, regardless of whether is expanded or collapsed. ## **Delete operators from group:** User can only delete an operator embedded in a group when the group is expanded. When the operator is deleted, the group will be resized to fit remaining operators. ## **Add & delete links/in-links/out-links in groups:** User can only add & delete a link, in-link, or out-link of a group when the group is expanded. When the group is collapsed, user can only delete in-links and out-links. ## **Groups in drag-drop:** The drag drop service will ignore operators that are in collapsed groups. So when a new operator is dragged to the graph, it will not try to make suggestions for operators that are not on the joint graph. ## **Groups in delete all feature:** When user tries to delete all operators/elements on the graph using the delete all button on nav bar, operators and links in both collapsed groups and expanded groups will be deleted as well. ## **Groups in save-workflow:** Groups are saved to the local storage exactly as how they last appeared on the graph. When the browser is refreshed, expanded groups are still expanded, and collapsed groups are still collapsed.
This was referenced Sep 26, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Sep 27, 2026
) ### What changes were proposed in this PR? Deletes the group-highlight streams from `JointGraphWrapper`: the two subjects and the `getJointGroupHighlightStream()` / `getJointGroupUnhighlightStream()` getters. It also drops those streams from the four `merge(...)` calls that subscribe to them: one in the property editor, two in the workflow editor, and one in the operator menu. There is no behaviour change: **+6/−54 lines**. ### History | | | | --- | --- | | **Introduced by** | apache#754 (2020-12-11), "Added operator grouping feature", for selecting operator groups on the canvas | | **Usage removed by** | apache#3033 (2024-11-13), "Remove Operator Group". It deleted the feature and every `.next()` on these subjects, but kept the subjects, the getters and the subscribers | It has been dead for nearly two years. Each dropped `merge(...)` operand was a stream that never emits, so removing it changes nothing the subscribers can observe. No production code calls `.next()` or `.complete()` on either subject. > Reviewer note: the other streams in those `merge(...)` calls are live and unchanged. The only other edits are comments that still mentioned groups. `joint-graph-wrapper.spec.ts` loses its one case, which asserted that these streams stay silent when operators are highlighted. ### Any related issues, documentation, discussions? Closes apache#8685 ### How was this PR tested? No new tests. The one removed case only covered the deleted getters. From `frontend/`: - `npx ng test --watch=false --include='**/joint-graph-wrapper.spec.ts' --include='**/property-editor.component.spec.ts' --include='**/workflow-editor.component.spec.ts' --include='**/operator-menu.service.spec.ts'`: 4 files, 250 tests, all pass. - `yarn format:ci`: clean. - `npx ng build`: success. To re-check: ``` git grep -n -i "JointGroup" # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Sep 27, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Sep 28, 2026
) ### What changes were proposed in this PR? Deletes four unused members of `WorkflowUtilService`, plus the rxjs import and the three spec cases that existed only for them. **+1/−85 lines.** There is no behaviour change. The constructor still fills `operatorSchemaList` from the metadata subscription; only the `.next(true)` to a Subject with no subscriber goes. ### History | | | | --- | --- | | **Introduced by** | apache#712 (2019-06-06): `operatorSchemaListCreatedSubject` + getter. apache#754 (2020-12-11), "Added operator grouping feature": `getGroupRandomUUID`. apache#1309 (2021-08-28), "Re-enabling breakpoints": `getBreakpointRandomUUID`. apache#4020 (2025-11-25), "feat: introduce the LLM-based workflow copilot": `getOperatorTypeList` | | **Usage removed by** | apache#1674 (2022-10-05), the Yjs shared-editing frontend, removed the last live path to `getGroupRandomUUID` (apache#3033 later deleted its last textual call, inside a dead `getNewGroup`). apache#4495 (2026-04-27) removed the copilot tool that called `getOperatorTypeList`. The stream and `getBreakpointRandomUUID` were **never used** | The oldest of these has been dead for seven years, and the newest for five months. ### Any related issues, documentation, discussions? Closes apache#8716 ### How was this PR tested? No new tests. The 15 remaining service cases cover what is left. From `frontend/`: - `npx ng test --watch=false`, with one `--include` per spec that imports `workflow-util.service` (20 files): 724 tests, all pass. - `yarn format:ci`: clean. - `npx ng build`: success. To re-check: ``` git grep -n -E "getOperatorTypeList|getGroupRandomUUID|getBreakpointRandomUUID|OperatorSchemaListCreated" -- frontend # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Nov 26, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 27, 2026
### What changes were proposed in this PR? Remove code that nothing uses from the dataset service, the dataset file uploader, the Hub component and service, and the canvas glyph service (**+154/−578 lines**). There is no behavior change. - **`DatasetService`:** four dead pieces go. - Six forwarders: `multipartUpload`, `listMultipartUploads`, `findExistingUploadFiles` and `finalizeMultipartUpload` only call `MultipartUploadService`, and `resetDatasetFileDiff` and `getDatasetDiff` only call `StagedFileService`. apache#8078 moved every caller to those services and kept the forwarders "so existing callers are untouched"; only specs still called or stubbed them. - The `GuiConfigService` and `MultipartUploadService` constructor dependencies that the forwarders and nothing else used. - The re-exported `MultipartUploadProgress` type, which nothing imports from here. - URL constants that nothing outside the service imports. The base paths become file-local, and the ones used once are written at their call site. - **Specs:** - The dataset spec's 15 cases that tested the upload and staging services through the forwarders go. `multipart-upload.service.spec.ts` and `staged-file.service.spec.ts` already cover 12 of them. - The other three move to `multipart-upload.service.spec.ts`: progress smoothing, the ETA clamp, and the 0% failure for an empty file. They account for 84 of the added lines. - The clamp case now stalls at 10 of 100 bytes. At 50, the clamped and unclamped ETAs both rounded to 3 s, so it passed with any bound. - The dataset spec's HTTP cases state the URLs they expect, and the dataset-detail spec drops its stubs of the removed forwarders. - **`FilesUploaderComponent`:** the `newUploadFileTreeNodes` field and its import, unused since apache#3296. - **Hub:** `HubComponent`'s `isLogin` input and `GuiConfigService` injection are never read. The dashboard stops passing `isLogin`, and keeps its own login state. `ActionType.Unlike` has no user; `postUnlike` keeps its literal endpoint. - **`JointUIService`:** - Sixteen constants that nothing imports become file-local: eleven glyph constants and five CSS class names. Their values are unchanged. - The `DEFAULT_GROUP_MARGIN` and `DEFAULT_GROUP_MARGIN_BOTTOM` statics go. apache#3033 removed operator groups, their last reader. - The attribute blocks for the abbreviated, processed and output count labels go. apache#3558 removed those labels from the markup. | Event | PR / Commit | | --- | --- | | Introduced by | Forwarders and the re-exported type: apache#8078 (2026-08-31); uploader field: apache#2719 (2024-07-23); `HubComponent.isLogin`: apache#2725 (2024-09-24); `ActionType.Unlike`: apache#3442 (2025-06-28); group margins: apache#754 (2020-12-11); count-label attributes: apache#1374 (2021-11-23) and apache#3477 (2025-07-08) | | Usage removed by | Uploader field: apache#3296 (2025-03-11). Group margins: apache#3033 (2024-11-13). Count-label attributes: apache#3558 (2025-07-11). Everything else: unused since introduction. | As of 2026-11-26: - `HubComponent.isLogin` and the group margins have gone unread for over 2 years. - The uploader field has been unused for over a year and a half, and the count-label attributes for over a year. - `ActionType.Unlike` has been unused for almost a year and a half. - The forwarders have had no caller in the almost 3 months they have existed. ### Any related issues, documentation, discussions? Closes apache#9719. ### How was this PR tested? Ran on this branch and on `main` at `927379aa28` (Windows 11; Node 24 with Yarn 4.14.1): ```bash cd frontend npx ng test --watch=false --include='**/dataset.service.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/files-uploader.component.spec.ts' --include='**/hub.component.spec.ts' --include='**/dashboard.component.spec.ts' --include='**/hub.service.spec.ts' --include='**/joint-ui.service.spec.ts' --include='**/multipart-upload.service.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json npx ngc -p src/tsconfig.app.json --noEmit yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$') ``` - **Specs:** the eight specs run 357 tests on this branch and 371 on `main`, all passing. - The branch drops the dataset spec's 15 forwarder cases and runs 3 of them in the multipart spec. - It also drops the Hub component's `isLogin` and `GuiConfigService` checks, and renames one Hub case for the dropped input. - Every other test keeps its name and outcome. - **Controls:** widening or narrowing the engine's 30% ETA bound fails the moved clamp case (27 s or 20 s instead of 23 s). At 50 bytes, as on `main`, the widened bound passed. Dropping the empty-file guard fails the 0% case. - **Checks:** both typechecks, the AOT compile (the dashboard template changes), prettier-eslint and ESLint pass. To re-check, this returns no hits on this branch and 19 on `main`: ```bash git grep -nE "public (multipartUpload|listMultipartUploads|findExistingUploadFiles|finalizeMultipartUpload|resetDatasetFileDiff|getDatasetDiff)\(|newUploadFileTreeNodes|Unlike = |texera-operator-(abbreviated|processed|output)-count|private config: GuiConfigService|DEFAULT_GROUP_MARGIN|export const operator(ReuseCacheText|ReuseCacheIcon|ViewResultIcon|Icon|FriendlyName)Class" -- frontend/src/app/dashboard/service/user/dataset frontend/src/app/dashboard/component/user/files-uploader frontend/src/app/hub frontend/src/app/workspace/service/joint-ui ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Couple rules that restrict grouping:
Group operators:
User can group multiple operators together by selecting them and clicking on the group button in nav bar. All selected operators are considered as part of the group. Links whose source and target operators are both in the group are also considered as part of the group. A newly added group and its in-links & out-links are placed in front of everything else on the graph.

Ungroup operators:
When there are less than two operators in a group, the group will be automatically ungrouped and remaining operator and links will be freed.

Collapse group:
User can collapse a group by clicking on the minus sign on the top-right corner of a group. When a group is collapsed, all operators and links in the group are hidden (temporarily deleted from joint graph, but still exist in texera graph). The group's in-links & out-links will be redirected to connect to the group element instead.

Expand group:
User can expand a group by clicking on the plus sign button on the top-right corner of a collapsed group. When a group is expanded, operators and links that are hidden will be re-shown on the graph. In-links & out-links will be directed back to their original operators.

Moving group & operators:
When an operator inside a group moves, the group will be repositioned and resized based on where the operator is moved to. So the group will follow its operators as they move. When a group is moved, all operators inside it moves as well, regardless of whether is expanded or collapsed.

Delete operators from group:
User can only delete an operator embedded in a group when the group is expanded. When the operator is deleted, the group will be resized to fit remaining operators.

Add & delete links/in-links/out-links in groups:
User can only add & delete a link, in-link, or out-link of a group when the group is expanded. When the group is collapsed, user can only delete in-links and out-links.

Groups in drag-drop:
The drag drop service will ignore operators that are in collapsed groups. So when a new operator is dragged to the graph, it will not try to make suggestions for operators that are not on the joint graph.

Groups in delete all feature:
When user tries to delete all operators/elements on the graph using the delete all button on nav bar, operators and links in both collapsed groups and expanded groups will be deleted as well.

Groups in save-workflow:
Groups are saved to the local storage exactly as how they last appeared on the graph. When the browser is refreshed, expanded groups are still expanded, and collapsed groups are still collapsed.

To-do things: