Skip to content

Comments

Bringing deep groups children data to the front-end#1520

Open
S0nbr4ndonz wants to merge 72 commits intoOpenEnergyDashboard:developmentfrom
S0nbr4ndonz:bEndTofEnd
Open

Bringing deep groups children data to the front-end#1520
S0nbr4ndonz wants to merge 72 commits intoOpenEnergyDashboard:developmentfrom
S0nbr4ndonz:bEndTofEnd

Conversation

@S0nbr4ndonz
Copy link

Description

@asherdrake and I worked on this change together. This change touches on issue #1509 , where deep groups data must be sent to the front to be used in the solution for issue #1496, group visualization. The changes include an added property deepGroups to the frontend redux state GroupData located at src/client/app/types/redux/groups.ts, tweaking the root GET route '/' to populate the deepGroups property along with the deepMeters property, and including the newly populated deepGroups array into formatGroupForResponse located at src/server/routes/groups.js.
Fixes #1509

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

None.

S0nbr4ndonz and others added 30 commits July 22, 2025 20:40
… our new group visual feature will be and added "CreateVisualGroupComponent" to create the graph that will display all relationships between all meters and groups. Added the link to the "pages" dropdown linked to the group visual page.Added a new path to "RouteComponent.tsx" to properly load in components for the new page.
…eclaration for data we do not need from VisualGroupDetailComponent.tsx
…f what the graph will look like with all groups and meters from the sample data. Also added a new local translations for legend.graph.text.group to data.ts. Although the code runs and the legend renders, the actual nodes and links do not yet render.
Sorted meters to minimize distance between meters that share groups
added allGroups and allMeters to useEffect dependencies, and added cl…
…s by columns. Added logic to create columns and place respective groups in the columns. Finally, set the group nodes to a fixed position, allowed them to be dragged, and added an animation for when the dragging ends and they return to their fixed position.
…minimize intercepting edges and provide a clearner visual
…hen not selected. Updated legend to match the elements and styles we have now.
…oup and ensured all subsequent references to the type group were handled and changed accordingly as to not break any logic or functionality. Additionally, translations were added to data.ts that apply to unselectedGroups and selectedGroups for the group visual legend.
…to keep working on trying to handle link length to ensure that it starts/ends from the borders of the elements instead of from the center of them for better visuals.
…e of the source element and end at the edge of the target element. Made the arrow marker more visually perceivable for a cleaner visual
@S0nbr4ndonz S0nbr4ndonz requested a review from huss August 18, 2025 17:26
@S0nbr4ndonz
Copy link
Author

Good Morning Steven!

I have re-requested a review from you for our fork as I have made a few changes based off of your feedback.

First, I have tweaked the root GET route '/' to only return deepMeters to the users and not deepGroups, as I had made it do before.

Now, the deep groups data is fetched and returned from the GET route '/deep/groups' and will only currently be used as an endpoint by the groups visual page and only accessible by admins, to decrease payload for all users.

Second, I have fixed the issue in /usr/src/app/src/client/app/components/groups/EditGroupModalComponent.tsx by omitting the deepMeters and deeGroups data to fit the server schema. I have checked around the codebase and have not caught any other errors.

Third, I believe I have left each file formatted correctly, but please feel free to point out any formatting issues where present!

Thank you!

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @S0nbr4ndonz & @asherdrake for addressing my comments. This now seems fine. I'm not going to approve since I want this held until the visualization page is submitted so there is a use for this new code. It will also be a chance to test it with a real use just to be sure. Please let me know if this is an issue or you have any thoughts.

@huss
Copy link
Member

huss commented Aug 20, 2025

Note the failed tests are not a result of this PR but a general issue that is yet to be resolved.

S0nbr4ndonz and others added 17 commits August 22, 2025 13:21
…x caching. Updated VisualGroupDetailComponent for PR. In CreateVisualGroupComponent, I updated it for PR, added deepGroups data fetching, merged it with existing GroupData state in order to access all data effectively and much more simpler, added logic to highlight all deepGroups and deepMeters.
…nslating features to the visual. Additionally, I have added buttons tp reset to the original state of the visual and to manually zoom in and out.
…nt, removed empty paragraph, and extra blank lines in VisualGroupDetailComponent
@asherdrake
Copy link

Thanks to @S0nbr4ndonz & @asherdrake for addressing my comments. This now seems fine. I'm not going to approve since I want this held until the visualization page is submitted so there is a use for this new code. It will also be a chance to test it with a real use just to be sure. Please let me know if this is an issue or you have any thoughts.

Thanks you for the feedback, @huss! I completely understand wanting to ensure the code has a practical use before merging.

However, we're running into a problem: the Group Visualization Feature (#1531) specifically relies on the deepGroups property and the Redux state changes introduced in this PR to function. Without these changes, we can't fully test the visualization or verify that the data flows correctly to the frontend.

Below is the result of trying to access the Group Visualization page without the deepGroups property.
image

Would you be open to merging this first so we can finalize the feature, or would you prefer I merge the changes from this PR into the branch for #1531 so you can see them working together in a single review?

@huss
Copy link
Member

huss commented Jan 25, 2026

@S0nbr4ndonz & @asherdrake I'm sorry that I did not make my thinking clear. I assumed that you would merge the current PR code/branch into the graphic visualization work so you could make it work. When the PR comes in for the visualization work (including this work), it can be reviewed. Once the previous PR is merged, those changes will disappear from the new PR so it would only show the newer changes so that review will only do the newer changes. Once the visualization PR is in it will make sense to merge the other PR. Does this make sense? Does it seem okay to you?

@asherdrake
Copy link

Thank you for the respone, @huss.

This is my understanding of the timeline. Do I have this correct?

First, we merge this Deep Groups PR (#1520) into the Group Visualization PR (#1531), so #1531 can be reviewed and tested.
Once #1531 is ready and reviewed, #1520 will be merged, and the changes from #1520 will automatically disappear from #1531 since they are no longer new.
After #1520 is merged, #1531 is merged.

@huss
Copy link
Member

huss commented Jan 26, 2026

@asherdrake Yes, you have the right idea of the plan. It is possible (likely) I will merge PR #1520 soon after PR #1531 is ready so the review will clearly know what changes are only part of the second PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Deep Groups Data on Front-end

3 participants