Skip to content

Commit

Permalink
Tweak Your Charts Page Design
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Jul 9, 2023
1 parent 63b4e08 commit 25ab425
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/src/components/InfoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function InfoHeader({
<OnlyInEnglish />
</div>
{description && (
<p className="text-blue-400 dark:text-blue-300 text-lg font-bold">
<p className="text-center text-neutral-500 dark:text-neutral-400">
{description}
</p>
)}
Expand Down
5 changes: 0 additions & 5 deletions app/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,6 @@ div[data-reach-tooltip] {
letter-spacing: -0.025em;
}

.chart-link:hover .chart-link-buttons,
.chart-link:focus-within .chart-link-buttons {
opacity: 1;
}

/** Completely Hide Editor Actions */
.monaco-editor .monaco-hover .hover-row.status-bar .actions {
display: none;
Expand Down
16 changes: 7 additions & 9 deletions app/src/pages/Charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Button2, Page } from "../ui/Shared";
import { Description, PageTitle, SectionTitle } from "../ui/Typography";
// Keep these in sync (55px)
const leftColumnGrid = "grid-cols-[55px_minmax(0,1fr)]";
const leftMargin = "sm:mx-[55px]";
const leftMargin = "sm:ml-[55px]";

export default function Charts() {
const isCustomer = useIsValidCustomer();
Expand Down Expand Up @@ -123,7 +123,7 @@ export default function Charts() {
<Loading />
</div>
) : isCustomer ? (
<div>
<div className="grid gap-1">
{persistentCharts?.map((chart) => (
<ChartLink
key={chart.id}
Expand Down Expand Up @@ -159,7 +159,7 @@ export default function Charts() {
</Trans>
}
>
<div>
<div className="grid gap-1">
{temporaryCharts.map((chart) => (
<ChartLink
key={chart}
Expand Down Expand Up @@ -194,7 +194,7 @@ const LargeFolder = memo(function LargeFolder({
const [isOpen, setIsOpen] = useState(true);
return (
<Collapsible.Root open={isOpen} onOpenChange={setIsOpen}>
<section className="grid gap-4">
<section className="grid gap-4 md:-ml-[55px]">
<Collapsible.Trigger asChild>
<button
className={`grid grid-auto-cols items-start text-left w-full ${leftColumnGrid} focus:shadow-none`}
Expand Down Expand Up @@ -254,10 +254,8 @@ const ChartLink = memo(function ChartLink({
}) {
return (
<div
className={`chart-link rounded grid grid-flow-col grid-cols-[minmax(0,1fr)_auto] items-center ${
isCurrent
? "bg-blue-50 hover:bg-blue-100 dark:bg-blue-900 dark:hover:bg-blue-800"
: "hover:bg-neutral-200 dark:hover:bg-neutral-900"
className={`chart-link border rounded grid grid-flow-col grid-cols-[minmax(0,1fr)_auto] items-center ${
isCurrent ? "bg-blue-50 dark:bg-blue-900" : ""
}`}
>
<Link to={href} className="py-3 px-4">
Expand All @@ -272,7 +270,7 @@ const ChartLink = memo(function ChartLink({
{children}
</div>
</Link>
<div className="p-2 pr-2 flex items-center chart-link-buttons sm:opacity-0">
<div className="p-2 pr-2 flex items-center">
<button
className="opacity-25 sm:opacity-50 hover:opacity-100 rounded transition-opacity p-1 focus:shadow-none focus:bg-neutral-300/25"
aria-label={`Copy flowchart: ${title}`}
Expand Down

0 comments on commit 25ab425

Please sign in to comment.