Realign MessageActionBar to Figma designs (#32722)
* Realign MessageActionBar to Figma designs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate style based on review Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Move tooltips to above MAB Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update event bubble tile style Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update apps/web/res/css/views/messages/_MessageActionBar.pcss Co-authored-by: Florian Duros <florianduros@element.io> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Florian Duros <florianduros@element.io>
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
|
|
||||||
.mx_MessageActionBar {
|
.mx_MessageActionBar {
|
||||||
--MessageActionBar-size-button: 28px;
|
--MessageActionBar-size-button: 28px;
|
||||||
--MessageActionBar-size-box: 32px; /* 28px + 2px (margin) * 2 */
|
--MessageActionBar-size-margin: 3px;
|
||||||
--MessageActionBar-item-hover-background: var(--cpd-color-bg-subtle-secondary);
|
--MessageActionBar-item-hover-background: var(--cpd-color-bg-subtle-secondary);
|
||||||
--MessageActionBar-item-hover-borderRadius: 6px;
|
--MessageActionBar-item-hover-borderRadius: 6px;
|
||||||
--MessageActionBar-item-hover-zIndex: 1;
|
--MessageActionBar-item-hover-zIndex: 1;
|
||||||
@@ -17,12 +17,18 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: var(--MessageActionBar-size-box);
|
gap: var(--cpd-space-0-5x);
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: $background;
|
background: $background;
|
||||||
border: var(--cpd-border-width-1) solid var(--cpd-color-border-disabled);
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-disabled);
|
||||||
top: -32px;
|
top: calc(
|
||||||
|
-1 *
|
||||||
|
(
|
||||||
|
var(--MessageActionBar-size-button) + 2 *
|
||||||
|
(var(--MessageActionBar-size-margin) + var(--cpd-border-width-1))
|
||||||
|
)
|
||||||
|
);
|
||||||
right: 8px;
|
right: 8px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
/* Ensure the action bar appears above other things like the read marker */
|
/* Ensure the action bar appears above other things like the read marker */
|
||||||
@@ -74,7 +80,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 2px;
|
margin: var(--MessageActionBar-size-margin);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--MessageActionBar-item-hover-background);
|
background: var(--MessageActionBar-item-hover-background);
|
||||||
@@ -84,7 +90,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageActionBar_iconButton {
|
.mx_MessageActionBar_iconButton {
|
||||||
--MessageActionBar-icon-size: 18px;
|
--MessageActionBar-icon-size: 20px;
|
||||||
width: var(--MessageActionBar-size-button);
|
width: var(--MessageActionBar-size-button);
|
||||||
height: var(--MessageActionBar-size-button);
|
height: var(--MessageActionBar-size-button);
|
||||||
color: var(--cpd-color-icon-secondary);
|
color: var(--cpd-color-icon-secondary);
|
||||||
@@ -108,30 +114,12 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
color: var(--cpd-color-icon-primary);
|
color: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_MessageActionBar_threadButton {
|
|
||||||
--MessageActionBar-icon-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.mx_MessageActionBar_retryButton {
|
|
||||||
--MessageActionBar-icon-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.mx_MessageActionBar_downloadButton {
|
&.mx_MessageActionBar_downloadButton {
|
||||||
--MessageActionBar-icon-size: 20px;
|
|
||||||
|
|
||||||
&.mx_MessageActionBar_downloadSpinnerButton {
|
&.mx_MessageActionBar_downloadSpinnerButton {
|
||||||
svg {
|
svg {
|
||||||
display: none; /* hide the download icon */
|
display: none; /* hide the download icon */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_MessageActionBar_expandCollapseMessageButton {
|
|
||||||
--MessageActionBar-icon-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageActionBar_optionsButton {
|
|
||||||
--MessageActionBar-icon-size: 22px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,9 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageActionBar {
|
.mx_MessageActionBar {
|
||||||
inset-inline-start: calc(100% - var(--MessageActionBar-size-box));
|
inset-inline-start: calc(
|
||||||
|
100% - var(--MessageActionBar-size-button) - 2 * var(--MessageActionBar-size-margin)
|
||||||
|
);
|
||||||
right: initial; /* Reset the default value */
|
right: initial; /* Reset the default value */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ const OptionsButton: React.FC<IOptionsButtonProps> = ({
|
|||||||
ref={buttonRefCallback}
|
ref={buttonRefCallback}
|
||||||
onFocus={onFocus}
|
onFocus={onFocus}
|
||||||
tabIndex={isActive ? 0 : -1}
|
tabIndex={isActive ? 0 : -1}
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<OverflowHorizontalIcon />
|
<OverflowHorizontalIcon />
|
||||||
</ContextMenuTooltipButton>
|
</ContextMenuTooltipButton>
|
||||||
@@ -188,7 +188,7 @@ const ReactButton: React.FC<IReactButtonProps> = ({ mxEvent, reactions, onFocusC
|
|||||||
ref={buttonRefCallback}
|
ref={buttonRefCallback}
|
||||||
onFocus={onFocus}
|
onFocus={onFocus}
|
||||||
tabIndex={isActive ? 0 : -1}
|
tabIndex={isActive ? 0 : -1}
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<ReactionAddIcon />
|
<ReactionAddIcon />
|
||||||
</ContextMenuTooltipButton>
|
</ContextMenuTooltipButton>
|
||||||
@@ -241,7 +241,7 @@ const ReplyInThreadButton: React.FC<IReplyInThreadButton> = ({ mxEvent }) => {
|
|||||||
title={title}
|
title={title}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onContextMenu={onClick}
|
onContextMenu={onClick}
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<ThreadsIcon />
|
<ThreadsIcon />
|
||||||
</RovingAccessibleButton>
|
</RovingAccessibleButton>
|
||||||
@@ -420,7 +420,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
onClick={this.onEditClick}
|
onClick={this.onEditClick}
|
||||||
onContextMenu={this.onEditClick}
|
onContextMenu={this.onEditClick}
|
||||||
key="edit"
|
key="edit"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</RovingAccessibleButton>,
|
</RovingAccessibleButton>,
|
||||||
@@ -439,7 +439,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
onClick={(e: ButtonEvent) => this.onPinClick(e, isPinned)}
|
onClick={(e: ButtonEvent) => this.onPinClick(e, isPinned)}
|
||||||
onContextMenu={(e: ButtonEvent) => this.onPinClick(e, isPinned)}
|
onContextMenu={(e: ButtonEvent) => this.onPinClick(e, isPinned)}
|
||||||
key="pin"
|
key="pin"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
{isPinned ? <UnpinIcon /> : <PinIcon />}
|
{isPinned ? <UnpinIcon /> : <PinIcon />}
|
||||||
</RovingAccessibleButton>,
|
</RovingAccessibleButton>,
|
||||||
@@ -453,7 +453,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
onClick={this.onCancelClick}
|
onClick={this.onCancelClick}
|
||||||
onContextMenu={this.onCancelClick}
|
onContextMenu={this.onCancelClick}
|
||||||
key="cancel"
|
key="cancel"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</RovingAccessibleButton>
|
</RovingAccessibleButton>
|
||||||
@@ -479,7 +479,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
onClick={this.onResendClick}
|
onClick={this.onResendClick}
|
||||||
onContextMenu={this.onResendClick}
|
onContextMenu={this.onResendClick}
|
||||||
key="resend"
|
key="resend"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<RestartIcon />
|
<RestartIcon />
|
||||||
</RovingAccessibleButton>,
|
</RovingAccessibleButton>,
|
||||||
@@ -506,7 +506,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
onClick={this.onReplyClick}
|
onClick={this.onReplyClick}
|
||||||
onContextMenu={this.onReplyClick}
|
onContextMenu={this.onReplyClick}
|
||||||
key="reply"
|
key="reply"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
<ReplyIcon />
|
<ReplyIcon />
|
||||||
</RovingAccessibleButton>,
|
</RovingAccessibleButton>,
|
||||||
@@ -570,7 +570,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||||||
caption={_t(ALTERNATE_KEY_NAME[Key.SHIFT]) + " + " + _t("action|click")}
|
caption={_t(ALTERNATE_KEY_NAME[Key.SHIFT]) + " + " + _t("action|click")}
|
||||||
onClick={this.props.toggleThreadExpanded}
|
onClick={this.props.toggleThreadExpanded}
|
||||||
key="expand"
|
key="expand"
|
||||||
placement="left"
|
placement="top"
|
||||||
>
|
>
|
||||||
{this.props.isQuoteExpanded ? <CollapseIcon /> : <ExpandIcon />}
|
{this.props.isQuoteExpanded ? <CollapseIcon /> : <ExpandIcon />}
|
||||||
</RovingAccessibleButton>,
|
</RovingAccessibleButton>,
|
||||||
|
|||||||