fix: Bag 'o fixes

Remove menu hover styles on mobile
Fixed duplicate hover+active behavior on editor menus
Fixed editor menus visibly scroll to the top when reopened
Fixed some minor editor spacing issues
Renamed shred routeHelpers -> urlHelpers
This commit is contained in:
Tom Moor
2022-01-25 23:43:11 -08:00
parent 13b8ed58fd
commit 175857753e
21 changed files with 103 additions and 64 deletions

View File

@@ -3,6 +3,7 @@ import * as React from "react";
import { MenuItem as BaseMenuItem } from "reakit/Menu";
import styled, { css } from "styled-components";
import breakpoint from "styled-components-breakpoint";
import { hover } from "~/styles";
import MenuIconWrapper from "../MenuIconWrapper";
type Props = {
@@ -123,7 +124,7 @@ export const MenuAnchorCSS = css<{ level?: number; disabled?: boolean }>`
? "pointer-events: none;"
: `
&:hover,
&:${hover},
&:focus,
&.focus-visible {
color: ${props.theme.white};

View File

@@ -19,6 +19,7 @@ import useCurrentTeam from "~/hooks/useCurrentTeam";
import useCurrentUser from "~/hooks/useCurrentUser";
import useStores from "~/hooks/useStores";
import DocumentMenu from "~/menus/DocumentMenu";
import { hover } from "~/styles";
import { newDocumentPath } from "~/utils/routeHelpers";
type Props = {
@@ -200,7 +201,7 @@ const DocumentLink = styled(Link)<{
opacity: ${(props) => (props.$isStarred ? "1 !important" : 0)};
}
&:hover,
&:${hover},
&:active,
&:focus,
&:focus-within {

View File

@@ -4,7 +4,7 @@ import { observer } from "mobx-react";
import * as React from "react";
import { withTranslation, Trans, WithTranslation } from "react-i18next";
import styled from "styled-components";
import { githubIssuesUrl } from "@shared/utils/routeHelpers";
import { githubIssuesUrl } from "@shared/utils/urlHelpers";
import Button from "~/components/Button";
import CenteredContent from "~/components/CenteredContent";
import HelpText from "~/components/HelpText";

View File

@@ -3,6 +3,7 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import styled, { useTheme } from "styled-components";
import Document from "~/models/Document";
import { hover } from "~/styles";
import NudeButton from "./NudeButton";
type Props = {
@@ -56,7 +57,7 @@ export const AnimatedStar = styled(StarredIcon)`
flex-shrink: 0;
transition: all 100ms ease-in-out;
&:hover {
&: ${hover} {
transform: scale(1.1);
}
&:active {