feat(danisman): soru formunda tek seçim sıradaki soruya geçirir, geçişteki kayma düzeldi; sürüm notları ağacı, bildirimde geri al oku, üst şerit ve mobil menü düzenlemeleri (→ 2.1.4)
All checks were successful
Deploy / deploy (push) Successful in 14m11s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bilalgursen
2026-10-12 21:10:23 +03:00
parent e6cbf7a782
commit ea3ebbeb44
13 changed files with 555 additions and 256 deletions

View File

@@ -1,9 +1,10 @@
"use client";
// Telefon menüsü (DESIGN.md §4.36): üst çubuk tek satır kalsın diye sıralama
// ve arama dışındaki her şey bu baloncuğun içinde. Açılınca önce tam ekran perde
// gelir, perde oturunca baloncuklar tek tek "pop" eder: biri yerine oturmadan
// sıradaki başlamaz. Kapanış hızlı ve sekmesiz.
// ve arama dışındaki her şey bu baloncuğun içinde. Açılınca perde logodan bir
// halka gibi büyür (tema geçişinin halkası), baloncuklar halkanın ardından
// yukarıdan aşağı sırayla "pop" eder. Tek hareket gibi okunur: ilk baloncuk
// ~0,1 sn'de, hepsi 0,8 sn içinde yerinde. Kapanış hızlı ve sekmesiz.
//
// Esin: React Bits "Bubble Menu" (reactbits.dev, MIT + Commons Clause). Kod
// KolayTercih diline çevrildi: GSAP yerine `motion`, zamanlama
@@ -35,13 +36,19 @@ import {
} from "@/features/liste/liste-store";
import { preloadListeCekmecesi } from "@/features/liste/components/liste-cekmecesi-lazy";
import { EGRI, SURE, YAY } from "@/lib/hareket";
import { logoHalkasi } from "@/lib/tema-gecisi";
import { cn } from "@/lib/utils";
/** Perdenin gelişi; ilk baloncuk bu süre dolmadan fırlamaz. */
const PERDE_SURESI = SURE.hizli;
/** Tek baloncuğun pop süresi. Sıradaki, önceki bu süreyi doldurunca başlar
* (üst üste binme yok); dokuz baloncukta toplam ~1,2 sn olduğu için kısa. */
const HAP_SURESI = 0.12;
/** Halka: tüylü kenarlı bir daire, yalnız `transform` ile büyür (maske ya da
* yarıçap değişkeni her karede boyama ister; telefonda takılır). Güçlü
* yavaşlama eğrisiyle ekranı ilk ~0,15 sn'de kaplar, kalanı süzülmedir. */
const HALKA_CAPI = 400;
const HALKA_SURESI = 0.4;
/** Tam opak çekirdeğin yarıçapa oranı (tema-gecisi.ts `CEKIRDEK` ile aynı). */
const HALKA_CEKIRDEK = 55;
/** İlk baloncuk halka üstünden geçince başlar, gerisi bu aralıkla izler. */
const HAP_GECIKMESI = 0.1;
const HAP_ADIMI = 0.06;
const GEZINME: { href: string; etiket: string; ikon: LucideIcon }[] = [
{ href: "/bolumler", etiket: "Bölümler", ikon: GraduationCap },
@@ -68,6 +75,9 @@ export function MobilMenu({
// Kapatma düğmesi ve logo, üst çubuktaki yerlerinde durur: çubuğun o anki
// konumu (üst bant görünürken daha aşağıda) açılırken ölçülür.
const [ust, setUst] = useState(16);
const [halka, setHalka] = useState({ x: 24, y: 24, son: 2000 });
// Halka durunca perde düz zemine geçer: pencere dönse de boşluk kalmaz.
const [oturdu, setOturdu] = useState(false);
const tetikRef = useRef<HTMLButtonElement>(null);
const azalt = useReducedMotion();
const liste = useManuelListe();
@@ -76,6 +86,8 @@ export function MobilMenu({
if (yeni) {
const r = tetikRef.current?.getBoundingClientRect();
if (r) setUst(Math.max(8, r.top));
setHalka(logoHalkasi());
setOturdu(false);
}
setAcik(yeni);
}
@@ -91,15 +103,12 @@ export function MobilMenu({
: {
// `scale` kısaltması değil tam `transform` dizgisi: Motion bunu
// WAAPI'ye verir, pencere kurulurken / sayfa değişirken takılmaz.
initial: { opacity: 0, transform: "scale(0.8)" },
// 0'dan değil 0.9'dan: hiçbir şey yoktan var olmaz.
initial: { opacity: 0, transform: "scale(0.9)" },
animate: {
opacity: 1,
transform: "scale(1)",
transition: {
...YAY.birakma,
visualDuration: HAP_SURESI,
delay: PERDE_SURESI + i * HAP_SURESI,
},
transition: { ...YAY.birakma, delay: HAP_GECIKMESI + i * HAP_ADIMI },
},
exit: {
opacity: 0,
@@ -141,11 +150,36 @@ export function MobilMenu({
<DialogPrimitive.Portal forceMount>
<DialogPrimitive.Overlay forceMount asChild>
<motion.div
className="fixed inset-0 z-50 bg-slate-50/90 supports-backdrop-filter:backdrop-blur-md"
className={cn(
"fixed inset-0 z-50 overflow-hidden supports-backdrop-filter:backdrop-blur-md",
(azalt || oturdu) && "bg-slate-50/90",
)}
// Bulanıklık solarak gelir; rengi halka taşır.
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { duration: PERDE_SURESI, ease: EGRI.standart } }}
animate={{ opacity: 1, transition: { duration: SURE.hizli, ease: EGRI.standart } }}
exit={{ opacity: 0, transition: { duration: SURE.cikis, ease: EGRI.standart } }}
/>
>
{azalt || oturdu ? null : (
<motion.span
aria-hidden
className="absolute rounded-full"
style={{
left: halka.x - HALKA_CAPI / 2,
top: halka.y - HALKA_CAPI / 2,
width: HALKA_CAPI,
height: HALKA_CAPI,
background: `radial-gradient(circle closest-side, color-mix(in oklab, var(--color-slate-50) 90%, transparent) ${HALKA_CEKIRDEK}%, transparent)`,
}}
// Logonun boyundan başlar, çekirdek en uzak köşeyi örtene dek büyür.
initial={{ transform: `scale(${32 / HALKA_CAPI})` }}
animate={{
transform: `scale(${(halka.son * 2) / HALKA_CAPI})`,
transition: { duration: HALKA_SURESI, ease: EGRI.gucluCikis },
}}
onAnimationComplete={() => setOturdu(true)}
/>
)}
</motion.div>
</DialogPrimitive.Overlay>
<DialogPrimitive.Content
forceMount