Iterate design and fix post-merge conflict

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-10-07 10:36:45 +01:00
parent c784039cf6
commit 29e3881fb3
5 changed files with 25 additions and 10 deletions

View file

@ -129,6 +129,13 @@ limitations under the License.
mask-size: 20px; mask-size: 20px;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
} }
&.mx_AccessibleButton_disabled {
padding: 10px 12px;
&::after {
content: unset;
}
}
} }
} }

View file

@ -116,9 +116,9 @@ limitations under the License.
.mx_RoomSummaryCard_app_pinToggle, .mx_RoomSummaryCard_app_pinToggle,
.mx_RoomSummaryCard_app_options { .mx_RoomSummaryCard_app_options {
position: relative; position: relative;
height: 20px; height: 16px;
width: 20px; width: 16px;
padding: 10px; padding: 8px;
border-radius: 8px; border-radius: 8px;
&:hover { &:hover {
@ -128,8 +128,8 @@ limitations under the License.
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
height: 20px; height: 16px;
width: 20px; width: 16px;
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-position: center; mask-position: center;
mask-size: 16px; mask-size: 16px;
@ -158,6 +158,8 @@ limitations under the License.
.mx_RoomSummaryCard_Button { .mx_RoomSummaryCard_Button {
padding-left: 12px; padding-left: 12px;
padding-top: 6px;
padding-bottom: 6px;
color: $tertiary-fg-color; color: $tertiary-fg-color;
flex: 1; flex: 1;
@ -174,6 +176,10 @@ limitations under the License.
&::before { &::before {
content: unset; content: unset;
} }
&::after {
top: 6px; // re-align based on the height change
}
} }
} }

View file

@ -15,6 +15,7 @@ limitations under the License.
*/ */
import React, {useContext} from "react"; import React, {useContext} from "react";
import {MatrixCapabilities} from "matrix-widget-api";
import IconizedContextMenu, {IconizedContextMenuOption, IconizedContextMenuOptionList} from "./IconizedContextMenu"; import IconizedContextMenu, {IconizedContextMenuOption, IconizedContextMenuOptionList} from "./IconizedContextMenu";
import {ChevronFace} from "../../structures/ContextMenu"; import {ChevronFace} from "../../structures/ContextMenu";
@ -23,9 +24,8 @@ import {IApp} from "../../../stores/WidgetStore";
import defaultDispatcher from "../../../dispatcher/dispatcher"; import defaultDispatcher from "../../../dispatcher/dispatcher";
import {AppTileActionPayload} from "../../../dispatcher/payloads/AppTileActionPayload"; import {AppTileActionPayload} from "../../../dispatcher/payloads/AppTileActionPayload";
import {Action} from "../../../dispatcher/actions"; import {Action} from "../../../dispatcher/actions";
import {Capability} from "../../../widgets/WidgetApi";
import WidgetUtils from "../../../utils/WidgetUtils"; import WidgetUtils from "../../../utils/WidgetUtils";
import ActiveWidgetStore from "../../../stores/ActiveWidgetStore"; import {WidgetMessagingStore} from "../../../stores/widgets/WidgetMessagingStore";
import RoomContext from "../../../contexts/RoomContext"; import RoomContext from "../../../contexts/RoomContext";
interface IProps extends React.ComponentProps<typeof IconizedContextMenu> { interface IProps extends React.ComponentProps<typeof IconizedContextMenu> {
@ -35,8 +35,10 @@ interface IProps extends React.ComponentProps<typeof IconizedContextMenu> {
const RoomWidgetContextMenu: React.FC<IProps> = ({ onFinished, app, ...props}) => { const RoomWidgetContextMenu: React.FC<IProps> = ({ onFinished, app, ...props}) => {
const {roomId} = useContext(RoomContext); const {roomId} = useContext(RoomContext);
const widgetMessaging = WidgetMessagingStore.instance.getMessagingForId(app.id);
let snapshotButton; let snapshotButton;
if (ActiveWidgetStore.widgetHasCapability(app.id, Capability.Screenshot)) { if (widgetMessaging?.hasCapability(MatrixCapabilities.Screenshots)) {
const onSnapshotClick = () => { const onSnapshotClick = () => {
WidgetUtils.snapshotWidget(app); WidgetUtils.snapshotWidget(app);
onFinished(); onFinished();

View file

@ -143,7 +143,7 @@ const AppRow: React.FC<IAppRowProps> = ({ app }) => {
className="mx_BaseCard_Button mx_RoomSummaryCard_Button mx_RoomSummaryCard_icon_app" className="mx_BaseCard_Button mx_RoomSummaryCard_Button mx_RoomSummaryCard_icon_app"
onClick={onOpenWidgetClick} onClick={onOpenWidgetClick}
// only show a tooltip if the widget is pinned // only show a tooltip if the widget is pinned
title={isPinned ? _t("You can't view pinned widgets in the right panel") : ""} title={isPinned ? _t("Unpin a widget to view it in this panel") : ""}
forceHide={!isPinned} forceHide={!isPinned}
disabled={isPinned} disabled={isPinned}
> >

View file

@ -1273,7 +1273,7 @@
"Yours, or the other users session": "Yours, or the other users session", "Yours, or the other users session": "Yours, or the other users session",
"Members": "Members", "Members": "Members",
"Room Info": "Room Info", "Room Info": "Room Info",
"You can't view pinned widgets in the right panel": "You can't view pinned widgets in the right panel", "Unpin a widget to view it in this panel": "Unpin a widget to view it in this panel",
"Unpin": "Unpin", "Unpin": "Unpin",
"Options": "Options", "Options": "Options",
"Widgets": "Widgets", "Widgets": "Widgets",