Skip to content

Commit

Permalink
disable unfunctioning expand on metrics canvas
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Oct 18, 2024
1 parent 5c052ea commit d90aecf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,48 +94,6 @@ exports[`Visualization Container Component renders add visualization container 1
</EuiText>
</div>
</EuiFlexItem>
<EuiFlexItem
className="visualization-action-button"
grow={false}
>
<div
className="euiFlexItem euiFlexItem--flexGrowZero visualization-action-button"
>
<EuiIcon
data-test-subj="removeVisualizationButton"
onClick={[Function]}
type="crossInACircleFilled"
>
<EuiIconBeaker
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon-isLoading"
data-test-subj="removeVisualizationButton"
focusable="false"
onClick={[Function]}
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon-isLoading"
data-test-subj="removeVisualizationButton"
focusable="false"
height={16}
onClick={[Function]}
role="img"
style={null}
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
</EuiIconBeaker>
</EuiIcon>
</div>
</EuiFlexItem>
</div>
</EuiFlexGroup>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

import {
EuiSmallButton,
EuiSmallButtonIcon,
EuiCodeBlock,
EuiContextMenuItem,
EuiContextMenuPanel,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
Expand All @@ -19,7 +17,6 @@ import {
EuiModalHeader,
EuiModalHeaderTitle,
EuiPanel,
EuiPopover,
EuiSpacer,
EuiText,
EuiToolTip,
Expand Down Expand Up @@ -103,7 +100,6 @@ export const VisualizationContainer = ({
onEditClick,
cloneVisualization,
showFlyout,
removeVisualization,
catalogVisualization,
inlineEditor,
actionMenuType,
Expand All @@ -116,7 +112,6 @@ export const VisualizationContainer = ({
const [visualizationData, setVisualizationData] = useState<Plotly.Data[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [isError, setIsError] = useState({} as VizContainerError);
const onActionsMenuClick = () => setIsPopoverOpen((currPopoverOpen) => !currPopoverOpen);
const closeActionsMenu = () => setIsPopoverOpen(false);
const { http, pplService } = coreRefs;
const { setToast } = useToast();
Expand Down Expand Up @@ -373,37 +368,6 @@ export const VisualizationContainer = ({
</EuiToolTip>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false} className="visualization-action-button">
{editMode ? (
<EuiIcon
data-test-subj="removeVisualizationButton"
type="crossInACircleFilled"
onClick={() => {
removeVisualization(visualizationId);
}}
/>
) : (
<EuiPopover
button={
<EuiSmallButtonIcon
aria-label="actionMenuButton"
iconType="boxesHorizontal"
onClick={onActionsMenuClick}
/>
}
isOpen={isPopoverOpen}
closePopover={closeActionsMenu}
anchorPosition="downLeft"
panelPaddingSize="none"
>
<EuiContextMenuPanel
items={popoverPanel}
data-test-subj="panelViz__popoverPanel"
size="s"
/>
</EuiPopover>
)}
</EuiFlexItem>
</EuiFlexGroup>
{inlineEditor}
</div>
Expand Down

0 comments on commit d90aecf

Please sign in to comment.