Skip to content

Commit

Permalink
Merge branch 'main' into Action-Image-Align
Browse files Browse the repository at this point in the history
  • Loading branch information
srikant-ch5 committed Jan 17, 2025
2 parents c87918d + 86eca20 commit 51aaefd
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 14 deletions.

This file was deleted.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,6 @@ export default class CanvasController {

} else if (!this.mouseInContextToolbar && !this.mouseInObject) {
this.objectModel.closeContextMenu();
this.setFocusOnCanvas();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ class CanvasContents extends React.Component {
onMouseDown={this.onMouseDown} onMouseLeave={this.onMouseLeave}
onBlur={this.onBlur}
onKeyDown={this.onKeyDown} onKeyUp={this.onKeyUp}
role="application" aria-label="canvas-keyboard-navigation" // Resolve Accessibility Violation of role and label
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ export default class SVGCanvasRenderer {
}
})
.on("mouseenter", (d3Event, d) => {
if (this.isDragging()) {
if (this.isDragging() || this.svgCanvasTextArea.isEditingText()) {
return;
}

Expand Down Expand Up @@ -2505,7 +2505,11 @@ export default class SVGCanvasRenderer {
that.mouseOverLabelEditIcon = false;
that.hideEditIcon(this);
})
.on("mousedown mouseup", function(d3Event) {
CanvasUtils.stopPropagationAndPreventDefault(d3Event);
})
.on("click", function(d3Event, d) {
CanvasUtils.stopPropagationAndPreventDefault(d3Event);
displayTextArea(d3Event, d);
that.mouseOverLabelEditIcon = false;
that.hideEditIcon(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ export default class SvgCanvasTextArea {
this.logger.log("Text area - focus");
data.autoSizeCallback(d3Event.target, data);
})
.on("mousedown click dblclick contextmenu", (d3Event, d) => {
.on("mousedown mouseenter mouseleave click dblclick contextmenu", (d3Event, d) => {
d3Event.stopPropagation(); // Allow default behavior to show system contenxt menu
});
}
Expand Down
2 changes: 1 addition & 1 deletion canvas_modules/common-canvas/src/icons/icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class Icon extends React.Component {
icon = this.getCanvasIcon(this.props.type);
if (typeof icon !== "undefined") {
const className = classNames("canvas-icon", iconClassName, this.props.className);
icon = <SVG src={icon} className={className} disabled={this.props.disabled} />;
icon = <SVG src={icon} className={className} disabled={this.props.disabled} aria-label={this.props.type} />;
} else {
icon = <div />;
}
Expand Down
10 changes: 3 additions & 7 deletions canvas_modules/common-canvas/src/toolbar/toolbar-button-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import React from "react";
import PropTypes from "prop-types";

import Tooltip from "../tooltip/tooltip.jsx";
import ArrangeHorizontally from "./../../assets/images/arrange_horizontally.svg";
import ArrangeVertically from "./../../assets/images/arrange_vertically.svg";
import ToggleNotificationPanel from "./../../assets/images/notification_counter_icon.svg";

import { Button } from "@carbon/react";
Expand All @@ -29,7 +27,7 @@ import { StopFilledAlt, Play, Undo, Redo, Chat, ChatOff, Result,
Cut, Copy, Paste, Edit, ColorPalette, Maximize, Minimize,
Launch, AddComment, TrashCan, ZoomIn, ZoomOut,
Checkmark, ChevronRight, ChevronDown, ChevronUp,
CenterToFit, OpenPanelFilledLeft } from "@carbon/react/icons";
CenterToFit, OpenPanelFilledLeft, ArrangeVertical, ArrangeHorizontal } from "@carbon/react/icons";
import { TOOLBAR_STOP, TOOLBAR_RUN, TOOLBAR_UNDO, TOOLBAR_REDO,
TOOLBAR_CUT, TOOLBAR_COPY, TOOLBAR_PASTE, TOOLBAR_CLIPBOARD,
TOOLBAR_CREATE_COMMENT, TOOLBAR_CREATE_AUTO_COMMENT,
Expand Down Expand Up @@ -123,12 +121,10 @@ class ToolbarButtonItem extends React.Component {
return <OpenPanelFilledLeft disabled={disabled} />;
case (TOOLBAR_TOGGLE_PALETTE):
return <OpenPanelFilledLeft disabled={disabled} />;

// Non-carbon icons
case (TOOLBAR_ARRANGE_HORIZONALLY):
return <SVG src={ArrangeHorizontally} disabled={disabled} />;
return <ArrangeHorizontal disabled={disabled} />;
case (TOOLBAR_ARRANGE_VERTICALLY):
return <SVG src={ArrangeVertically} disabled={disabled} />;
return <ArrangeVertical disabled={disabled} />;
case (TOOLBAR_TOGGLE_NOTIFICATION_PANEL):
return <SVG src={ToggleNotificationPanel} disabled={disabled} />;

Expand Down

0 comments on commit 51aaefd

Please sign in to comment.