forked from KaotoIO/kaoto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DataMapper): XPath Editor: Fix unexpected modal resize and scrollbar
Fixes: KaotoIO#49 Fixes: KaotoIO#52 fix(DataMapper): XPath Editor: More space for parameter name Fixes: KaotoIO#51 chore(DataMapper): Rename ExpressionEditor to XPathEditor Fixes: KaotoIO#60
- Loading branch information
1 parent
deabf47
commit 90ca7d9
Showing
19 changed files
with
158 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
packages/ui/src/components/Document/actions/ExpressionEditorAction.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/ui/src/components/Document/actions/XPathEditorAction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { TargetNodeData } from '../../../models/datamapper/visualization'; | ||
import { ExpressionItem } from '../../../models/datamapper/mapping'; | ||
import { FunctionComponent, useCallback, useState } from 'react'; | ||
import { ActionListItem, Button } from '@patternfly/react-core'; | ||
import { PencilAltIcon } from '@patternfly/react-icons'; | ||
import { XPathEditorModal } from '../../XPath/XPathEditorModal'; | ||
|
||
type XPathEditorProps = { | ||
nodeData: TargetNodeData; | ||
mapping: ExpressionItem; | ||
onUpdate: () => void; | ||
}; | ||
export const XPathEditorAction: FunctionComponent<XPathEditorProps> = ({ nodeData, mapping, onUpdate }) => { | ||
const [isEditorOpen, setIsEditorOpen] = useState<boolean>(false); | ||
const launchXPathEditor = useCallback(() => setIsEditorOpen(true), []); | ||
const closeXPathEditor = useCallback(() => setIsEditorOpen(false), []); | ||
|
||
return ( | ||
<ActionListItem key="xpath-editor"> | ||
<Button | ||
size="sm" | ||
variant="plain" | ||
component="small" | ||
aria-label="XPath Editor" | ||
data-testid={`edit-xpath-button-${nodeData.id}`} | ||
onClick={launchXPathEditor} | ||
className="document-field__button" | ||
icon={<PencilAltIcon />} | ||
/> | ||
<XPathEditorModal | ||
title={nodeData.title} | ||
isOpen={isEditorOpen} | ||
onClose={closeXPathEditor} | ||
mapping={mapping} | ||
onUpdate={onUpdate} | ||
/> | ||
</ActionListItem> | ||
); | ||
}; |
10 changes: 5 additions & 5 deletions
10
...nt/actions/ExpressionInputAction.test.tsx → ...ocument/actions/XPathInputAction.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...rc/components/Expression/FunctionIcon.tsx → .../ui/src/components/XPath/FunctionIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.xpath-editor-layout-grid { | ||
height: 90%; | ||
} | ||
|
||
.xpath-editor-layout-tab-content { | ||
height: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.xpath-editor-modal { | ||
height: 90%; | ||
} |
Oops, something went wrong.