Skip to content

Conversation

diegopinate
Copy link
Collaborator

@diegopinate diegopinate commented Jul 16, 2025

This PR aims to enhance changed elements react for:

Frontend Enhancements:

  1. Provide consumers a way to inject their own changes and skip using the changed elements service altogether
  2. Provide colorization overrides for any special customization logic
  3. Provide a callback when changed instances are selected in the UI

Backend Enhancements:

  1. Initial ChangesRpcInterface and ChangesRpcImpl which aim to allow using the Partial EC Change Unifier in a simplified way
  2. The Rpc interface allows the app to provide relationships that they care about and marks any related changed ec instance with what relationships were affected that may drive the element for changes

Test App Changes:

  1. The ChangesRpcInterface is used to supply changes to provide an example of usage for an app that may want specific relationships to be highlighted
  2. Showcases how they could colorize changed instances based on the relationships that have changes

The Rpc is being implemented temporarily as part of the test-app-backend, but we will aim to move it to a separate package (potentially imodel-sync) to be consumable by other applications.

CalebGerman and others added 30 commits January 17, 2025 13:43
…l version of processing to use. Update view creation to use default view with all models.
…ation for UI purposes. Maintain visibility of driven elements when looking at models that contain changes for those driven elements.
… caused driven changes. Make relationships definable by frontend application instead of hard-coding it in the backend.
@CalebGerman CalebGerman requested a review from Copilot July 16, 2025 19:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a “direct comparison” workflow to both the test app and the changed-elements-react library by wiring in a new changes‐provider RPC path, custom styling overrides, and a selection callback.

  • Introduce useDirectComparison flag and register ChangesRpcInterface/ChangesRpcImpl on frontend and backend
  • Extend VersionCompare options to accept changesProvider, colorOverrideProvider, and onInstancesSelected
  • Update widgets and visualization handlers to highlight driven elements and invoke custom callbacks

Reviewed Changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/test-app-frontend/src/environment.ts Add useDirectComparison flag from environment variables
packages/test-app-frontend/src/App/ITwinJsApp/ITwinJsApp.tsx Register ChangesRpcInterface, pass custom providers into VersionCompare.initialize
packages/test-app-backend/src/RPC/ChangesRpcInterface.ts Define new RPC interface for fetching changed instances
packages/test-app-backend/src/RPC/ChangesRpcImpl.ts Implement the RPC using ChangedInstancesProcessor
packages/changed-elements-react/src/api/VersionCompare.ts Expand VersionCompareOptions to include changesProvider, colorOverrideProvider, and onInstancesSelected
packages/changed-elements-react/src/widgets/EnhancedElementsInspector.tsx Invoke onInstancesSelected and inject driven-element highlighting
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@CalebGerman
Copy link
Collaborator

Looks like the lock file is not correct

@diegopinate
Copy link
Collaborator Author

diegopinate commented Jul 17, 2025

Looks like the lock file is not correct

Yes, I resolved that as well, had to update the pnpm version in the pipeline and fix some of the linting.

See:

@diegopinate diegopinate enabled auto-merge (squash) July 18, 2025 14:31
@diegopinate diegopinate merged commit 7799b27 into master Jul 21, 2025
4 checks passed
@diegopinate diegopinate deleted the cgerman/secret-frontend-poc branch July 21, 2025 12:30
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.

2 participants