Remove zoom and fullscreen features from the executive meetings page
Revert changes related to zoom and fullscreen functionality on the executive meetings page, including associated UI elements and state management. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: a15369a0-9324-4530-b49b-f74f690fb3f3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/w8MxrEs Replit-Helium-Checkpoint-Created: true
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@@ -43,10 +43,6 @@ import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Search,
|
||||
Maximize,
|
||||
Minimize2,
|
||||
ZoomIn,
|
||||
ZoomOut,
|
||||
} from "lucide-react";
|
||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ui/collapsible";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -1149,14 +1145,6 @@ function ScheduleSection({
|
||||
// matched against title, attendee names/titles, location, notes, and
|
||||
// any merge text on the row. Empty needle → pass-through.
|
||||
const [searchQuery, setSearchQuery] = useState("");
|
||||
const [tableZoom, setTableZoom] = useState(90);
|
||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!isFullscreen) return;
|
||||
const onKey = (e: KeyboardEvent) => { if (e.key === "Escape") setIsFullscreen(false); };
|
||||
window.addEventListener("keydown", onKey);
|
||||
return () => window.removeEventListener("keydown", onKey);
|
||||
}, [isFullscreen]);
|
||||
// Reset whenever the active day changes — a search is "scoped to the
|
||||
// currently visible date" per the spec, so jumping days clears it.
|
||||
useEffect(() => {
|
||||
@@ -2363,7 +2351,6 @@ function ScheduleSection({
|
||||
[reorderRows],
|
||||
);
|
||||
|
||||
const headingRef = useRef<HTMLDivElement | null>(null);
|
||||
useEffect(() => {
|
||||
const root = document.querySelector<HTMLElement>("[data-em-root]");
|
||||
if (root) root.style.setProperty("--em-heading-h", "0px");
|
||||
@@ -2474,35 +2461,6 @@ function ScheduleSection({
|
||||
clearLabel={t("executiveMeetings.schedule.searchClear")}
|
||||
isRtl={isRtl}
|
||||
/>
|
||||
<div className="flex items-center gap-0.5 border border-gray-300 rounded-md bg-white">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setTableZoom((z) => Math.max(50, z - 10))}
|
||||
disabled={tableZoom <= 50}
|
||||
className="inline-flex items-center justify-center w-7 h-7 text-[#0B1E3F] hover:bg-gray-100 rounded-s-md disabled:opacity-30 transition-colors"
|
||||
title={`${tableZoom - 10}%`}
|
||||
>
|
||||
<ZoomOut className="w-3.5 h-3.5" />
|
||||
</button>
|
||||
<span className="text-[11px] font-medium text-[#0B1E3F] w-9 text-center tabular-nums select-none">{tableZoom}%</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setTableZoom((z) => Math.min(150, z + 10))}
|
||||
disabled={tableZoom >= 150}
|
||||
className="inline-flex items-center justify-center w-7 h-7 text-[#0B1E3F] hover:bg-gray-100 rounded-e-md disabled:opacity-30 transition-colors"
|
||||
title={`${tableZoom + 10}%`}
|
||||
>
|
||||
<ZoomIn className="w-3.5 h-3.5" />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsFullscreen((f) => !f)}
|
||||
className="inline-flex items-center justify-center rounded-md border border-gray-300 bg-white text-[#0B1E3F] w-8 h-8 hover:bg-gray-50 transition-colors focus:outline-none focus:ring-2 focus:ring-[#0B1E3F]/40"
|
||||
title={isFullscreen ? "Exit fullscreen" : "Fullscreen"}
|
||||
>
|
||||
{isFullscreen ? <Minimize2 className="w-4 h-4" /> : <Maximize className="w-4 h-4" />}
|
||||
</button>
|
||||
<label className="flex items-center gap-2 text-sm">
|
||||
<span className="text-muted-foreground">{t("executiveMeetings.date")}</span>
|
||||
<input
|
||||
@@ -2516,27 +2474,9 @@ function ScheduleSection({
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={
|
||||
isFullscreen
|
||||
? "fixed inset-0 z-[9999] bg-[#f4f6fb] overflow-auto p-4 print:static print:p-0 print:overflow-visible"
|
||||
: "space-y-4 print:space-y-2"
|
||||
}>
|
||||
<div className="space-y-4 print:space-y-2">
|
||||
{portalTarget && createPortal(toolbarControls, portalTarget)}
|
||||
|
||||
{isFullscreen && (
|
||||
<div className="flex items-center justify-between mb-3 print:hidden">
|
||||
<h2 className="text-lg font-bold text-[#0B1E3F]">{t("executiveMeetings.scheduleHeading")} — {date}</h2>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsFullscreen(false)}
|
||||
className="inline-flex items-center gap-1.5 rounded-md border border-gray-300 bg-white text-[#0B1E3F] px-3 py-1.5 text-sm hover:bg-gray-50 transition-colors"
|
||||
>
|
||||
<Minimize2 className="w-4 h-4" />
|
||||
ESC
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="hidden print:block text-center mb-2">
|
||||
<div className="font-bold text-lg">{t("executiveMeetings.title")}</div>
|
||||
<div className="text-sm">{date}</div>
|
||||
@@ -2703,7 +2643,6 @@ function ScheduleSection({
|
||||
ref={tableWrapperRef}
|
||||
className="bg-white border-2 border-[#0B1E3F] rounded-md overflow-x-auto shadow-sm print:shadow-none print:border-black print:overflow-hidden"
|
||||
id="executive-schedule-printable"
|
||||
style={{ transform: `scale(${tableZoom / 100})`, transformOrigin: isRtl ? "top right" : "top left" }}
|
||||
>
|
||||
<table
|
||||
className="border-collapse text-sm md:text-[15px] w-full table-auto xl:table-fixed print:table-fixed"
|
||||
|
||||
Reference in New Issue
Block a user