New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load and apply patch changes #748
Conversation
🦋 Changeset detectedLatest commit: 6cd7f76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## master #748 +/- ##
==========================================
+ Coverage 42.97% 42.99% +0.02%
==========================================
Files 931 933 +2
Lines 41221 41350 +129
Branches 9470 9498 +28
==========================================
+ Hits 17713 17780 +67
- Misses 23438 23500 +62
Partials 70 70
|
d8e2ed9
to
f86c40a
Compare
5504413
to
9311543
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice change! The way it turned out to be is much more simpler than I thought :) I haven't seen the bit where if this clashes with local changes, we will warn users though. Do you think that is necessary?
packages/legend-studio/style/components/editor/side-bar/_patch-changes.scss
Outdated
Show resolved
Hide resolved
import { entityDiffSorter } from '../../../stores/EditorSDLCState'; | ||
import { useEditorStore } from '../EditorStoreProvider'; | ||
import { useApplicationStore } from '@finos/legend-application'; | ||
import { Dialog } from '@material-ui/core'; | ||
|
||
const PatchModalEditor = observer(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use something like react-dropzone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also let's rename this to PatchLoader
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
e65f79a
to
99840ee
Compare
99840ee
to
e46bb61
Compare
packages/legend-studio/src/components/editor/side-bar/LocalChanges.tsx
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/components/editor/side-bar/LocalChanges.tsx
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
packages/legend-studio/src/stores/sidebar-state/LocalChangesState.ts
Outdated
Show resolved
Hide resolved
this.setModal(false); | ||
} | ||
|
||
setModal(val: boolean): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--> setShowModal
} | ||
} | ||
|
||
applyEntityChanges( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an utility method, we can move it outside of the class, in fact, let's move this out to EntityChangeUtils
or something like that.
Summary
Ability to apply patches (no Conflict resolution).
Ability to revert local changes
How did you test this change?
Legend.Studio.Mozilla.Firefox.2021-12-28.12-10-33.mp4