-
Notifications
You must be signed in to change notification settings - Fork 44
Conversation
(integrationId: string, newStep: IStepProps, options: { mode: 'replace', index: number }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'replace', path: string[] | undefined }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'append' | 'insert' | 'replace'; index: number, path: string[] | undefined }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'insert'; index: number }): 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.
WebStorm did this behind me, replaced a comma with a semicolon... is this valid?
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.
Yes, it is 😄
WebStorm
please stop messing around with my formatting 👀
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.
LGTM I just think that we need to add the missing metadata
property and we're good to go.
PS: WebStorm
💔
src/components/SettingsModal.tsx
Outdated
@@ -43,7 +39,15 @@ export const SettingsModal = ({ handleCloseModal, isModalOpen }: ISettingsModal) | |||
const [availableDSLs, setAvailableDSLs] = useState<string[]>([]); | |||
const { settings, setSettings } = useSettingsStore((state) => state); | |||
const [localSettings, setLocalSettings] = useState<ISettings>(settings); | |||
const { flows, properties, setFlows } = useFlowsStore(({ flows, properties, setFlowsWrapper: setFlows }) => ({ flows, properties, setFlows }), shallow); | |||
const { flows, properties, metadata, setFlows } = useFlowsStore( | |||
({ flows, properties, metadata, setFlowsWrapper: setFlows }) => ({ |
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.
Argh, this is a leftover from my last pull request, that line should read as:
({ flows, properties, metadata, setFlowsWrapper }) => ({
I'll update it in another pull request. Unless you wanna do it in this one in which case I would be more than happy 👀 😄
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.
done!
setFlowsWrapper, | ||
}), | ||
shallow | ||
); | ||
const previousFlows = usePrevious(flows); | ||
|
||
const schemaUri = settings.dsl.validationSchema |
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.
[nothing-to-action-here]: This logic is somewhat similar to the logic from the source code editor and we talked about moving it to a service, now I think that the right place for this should be a custom hook.
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.
@lordrip No real opinion here, just curious why a custom hook over a service?
|
||
// The history is used to keep a log of every change to the content. Then, this log is used to undo and redo content. | ||
const { undo, redo, pastStates } = useIntegrationJsonStore.temporal.getState(); | ||
|
||
const previousFlowWrapper = useRef<IFlowsWrapper>(JSON.parse(JSON.stringify({ flows, properties }))); | ||
const previousFlowWrapper = useRef<IFlowsWrapper>( | ||
JSON.parse(JSON.stringify({ flows, properties })) |
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.
I think that we should add here the new metadata
property as well.
JSON.parse(JSON.stringify({ flows, properties })) | |
JSON.parse(JSON.stringify({ flows, metadata, properties })) |
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.
done!
(integrationId: string, newStep: IStepProps, options: { mode: 'replace', index: number }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'replace', path: string[] | undefined }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'append' | 'insert' | 'replace'; index: number, path: string[] | undefined }): void; | ||
(integrationId: string, newStep: IStepProps, options: { mode: 'insert'; index: number }): 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.
Yes, it is 😄
WebStorm
please stop messing around with my formatting 👀
With kaoto-archive/kaoto-backend#659, now the `beans` definition pasted in YAML code editor will be preserved. Fixes: kaoto-archive#1721
Kudos, SonarCloud Quality Gate passed!
|
}; | ||
|
||
setFlows(updatedFlowWrapper); | ||
setFlowsWrapper(updatedFlowWrapper); |
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.
Thanks for taking care of this 💪
With kaoto-archive/kaoto-backend#659, now the
beans
definition pasted in YAML code editor will be preserved.Fixes: #1721