Skip to content
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

Merged
merged 2 commits into from Dec 30, 2021
Merged

load and apply patch changes #748

merged 2 commits into from Dec 30, 2021

Conversation

MauricioUyaguari
Copy link
Member

@MauricioUyaguari MauricioUyaguari commented Dec 23, 2021

Summary

Ability to apply patches (no Conflict resolution).
Ability to revert local changes

How did you test this change?

  • Test(s) added
  • Manual testing (please provide screenshots/recordings)
  • No testing (please provide an explanation)
    patchoveride
Legend.Studio.Mozilla.Firefox.2021-12-28.12-10-33.mp4

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2021

🦋 Changeset detected

Latest commit: 6cd7f76

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@finos/legend-server-sdlc Patch
@finos/legend-shared Patch
@finos/legend-studio Minor
@finos/legend-extension-external-language-morphir Patch
@finos/legend-studio-extension-management-toolkit Patch
@finos/legend-application Patch
@finos/legend-art Patch
@finos/legend-extension-dsl-data-space Patch
@finos/legend-extension-dsl-diagram Patch
@finos/legend-extension-dsl-serializer Patch
@finos/legend-extension-dsl-text Patch
@finos/legend-extension-external-format-json-schema Patch
@finos/legend-extension-external-store-service Patch
@finos/legend-graph-extension-collection Patch
@finos/legend-graph Patch
@finos/legend-manual-tests Patch
@finos/legend-model-storage Patch
@finos/legend-query-app Patch
@finos/legend-query Patch
@finos/legend-server-depot Patch
@finos/legend-studio-app Patch
@finos/legend-studio-extension-query-builder Patch
@finos/legend-taxonomy-app Patch
@finos/legend-taxonomy Patch
@finos/legend-tracer-extension-zipkin Patch
@finos/legend-query-deployment Patch
@finos/legend-studio-deployment Patch
@finos/legend-taxonomy-deployment Patch

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

@finos-cla-bot finos-cla-bot bot added the cla-present CLA Signed label Dec 23, 2021
@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #748 (6cd7f76) into master (1bc5f69) will increase coverage by 0.02%.
The diff coverage is 41.12%.

@@            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              
Impacted Files Coverage Δ
...gend-server-sdlc/src/models/entity/EntityChange.ts 0.00% <0.00%> (ø)
...ages/legend-shared/src/application/BrowserUtils.ts 10.00% <10.00%> (ø)
...io/src/components/editor/side-bar/LocalChanges.tsx 9.25% <15.38%> (+5.68%) ⬆️
...udio/src/stores/sidebar-state/LocalChangesState.ts 30.38% <50.63%> (+15.68%) ⬆️
...kages/legend-studio/src/stores/EditorGraphState.ts 40.51% <75.00%> (+4.12%) ⬆️
packages/legend-graph/src/helpers/DomainHelper.ts 100.00% <0.00%> (ø)
packages/legend-shared/src/network/NetworkUtils.ts 15.00% <0.00%> (ø)
...ackages/legend-server-sdlc/src/SDLCServerClient.ts 0.57% <0.00%> (ø)
...kages/legend-server-depot/src/DepotServerClient.ts 0.00% <0.00%> (ø)
...end-taxonomy/src/components/TaxonomyNodeViewer.tsx 1.69% <0.00%> (ø)
... and 5 more

@MauricioUyaguari MauricioUyaguari changed the title temp load and apply patch changes Dec 28, 2021
@MauricioUyaguari MauricioUyaguari marked this pull request as ready for review December 28, 2021 16:34
Copy link
Contributor

@akphi akphi left a 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?

.changeset/swift-gifts-shake.md Outdated Show resolved Hide resolved
packages/legend-shared/src/network/NetworkUtils.ts Outdated Show resolved Hide resolved
packages/legend-shared/src/network/NetworkUtils.ts 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(() => {
Copy link
Contributor

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?

Copy link
Contributor

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

this.setModal(false);
}

setModal(val: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

--> setShowModal

}
}

applyEntityChanges(
Copy link
Contributor

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.

@akphi akphi merged commit f493059 into finos:master Dec 30, 2021
@akphi akphi added this to the 3.0.0 milestone Dec 30, 2021
@akphi akphi mentioned this pull request Dec 30, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants