Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(dashboard): remove spaces list viewport max-height hack
Richie McIlroy00891c5042c6
diff --git a/apps/web/app/(org)/dashboard/_components/Navbar/SpacesList.tsx b/apps/web/app/(org)/dashboard/_components/Navbar/SpacesList.tsxindex 9b7639468..7dd3bb2b2 100644--- a/apps/web/app/(org)/dashboard/_components/Navbar/SpacesList.tsx+++ b/apps/web/app/(org)/dashboard/_components/Navbar/SpacesList.tsx@@ -205,124 +205,110 @@ const SpacesList = ({ toggleMobileNav }: { toggleMobileNav?: () => void }) => {</Link></Tooltip>- <div className="overflow-hidden">- <div- className={clsx(- "transition-all duration-300",- showAllSpaces && !sidebarCollapsed- ? "max-h-[calc(100vh-450px)] overflow-y-auto"- : "max-h-max overflow-hidden",- )}- style={{- scrollbarWidth: "none",- msOverflowStyle: "none",- WebkitOverflowScrolling: "touch",- }}- >- {displayedSpaces.map((space: Spaces) => {- return (- <Tooltip- position="right"- disable={!sidebarCollapsed}- content={space.name}- key={space.id}+ <div>+ {displayedSpaces.map((space: Spaces) => {+ return (+ <Tooltip+ position="right"+ disable={!sidebarCollapsed}+ content={space.name}+ key={space.id}+ >+ <li+ className={clsx(+ "relative transition-colors border border-transparent overflow-visible duration-150 rounded-xl mb-1.5",+ activeSpaceParams(space.id)+ ? "hover:bg-gray-3 cursor-default"+ : "cursor-pointer",+ )}+ onDragOver={(e) => handleDragOver(e, space.id)}+ onDragLeave={handleDragLeave}+ onDrop={(e) => handleDrop(e, space.id)}>- <li+ {activeSpaceParams(space.id) && (+ <motion.div+ layoutId="navlinks"+ className={clsx(+ "absolute rounded-xl bg-gray-3",+ sidebarCollapsed+ ? "inset-0 right-0 left-0 mx-auto"+ : "inset-0",+ )}+ style={{ willChange: "transform" }}+ transition={{+ layout: {+ type: "tween",+ duration: 0.1,+ },+ }}+ />+ )}+ <AnimatePresence>+ {activeDropTarget === space.id && (+ <motion.div+ className="absolute inset-0 z-10 rounded-xl border transition-all duration-200 pointer-events-none border-blue-10 bg-gray-4"+ initial={{ opacity: 0 }}+ animate={{ opacity: 1 }}+ exit={{ opacity: 0 }}+ transition={{ duration: 0.2 }}+ />+ )}+ </AnimatePresence>+ <Link+ href={`/dashboard/spaces/${space.id}`}className={clsx(- "relative transition-colors border border-transparent overflow-visible duration-150 rounded-xl mb-1.5",+ "flex relative z-10 items-center px-2 py-2 truncate rounded-xl transition-colors group",+ sidebarCollapsed ? "justify-center" : "",activeSpaceParams(space.id)- ? "hover:bg-gray-3 cursor-default"- : "cursor-pointer",+ ? "hover:bg-gray-3"+ : "hover:bg-gray-2",+ space.primary ? "h-10" : "h-fit",)}- onDragOver={(e) => handleDragOver(e, space.id)}- onDragLeave={handleDragLeave}- onDrop={(e) => handleDrop(e, space.id)}>- {activeSpaceParams(space.id) && (- <motion.div- layoutId="navlinks"- className={clsx(- "absolute rounded-xl bg-gray-3",- sidebarCollapsed- ? "inset-0 right-0 left-0 mx-auto"- : "inset-0",- )}- style={{ willChange: "transform" }}- transition={{- layout: {- type: "tween",- duration: 0.1,- },- }}- />- )}- <AnimatePresence>- {activeDropTarget === space.id && (- <motion.div- className="absolute inset-0 z-10 rounded-xl border transition-all duration-200 pointer-events-none border-blue-10 bg-gray-4"- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- exit={{ opacity: 0 }}- transition={{ duration: 0.2 }}- />+ <SignedImageUrl+ image={space.iconUrl}+ name={space.name}+ letterClass={clsx(+ sidebarCollapsed ? "text-sm" : "text-[11px]",)}- </AnimatePresence>- <Link- href={`/dashboard/spaces/${space.id}`}className={clsx(- "flex relative z-10 items-center px-2 py-2 truncate rounded-xl transition-colors group",- sidebarCollapsed ? "justify-center" : "",- activeSpaceParams(space.id)- ? "hover:bg-gray-3"- : "hover:bg-gray-2",- space.primary ? "h-10" : "h-fit",+ "relative flex-shrink-0",+ sidebarCollapsed ? "size-6" : "size-5",)}- >- <SignedImageUrl- image={space.iconUrl}- name={space.name}- letterClass={clsx(- sidebarCollapsed ? "text-sm" : "text-[11px]",- )}- className={clsx(- "relative flex-shrink-0",- sidebarCollapsed ? "size-6" : "size-5",+ />+ {!sidebarCollapsed && (+ <>+ <span className="ml-2.5 text-sm truncate transition-colors text-gray-11 group-hover:text-gray-12">+ {space.name}+ </span>+ {space.hasPassword && (+ <FontAwesomeIcon+ icon={faLock}+ className="ml-1.5 size-2.5 text-amber-600"+ />)}- />- {!sidebarCollapsed && (- <>- <span className="ml-2.5 text-sm truncate transition-colors text-gray-11 group-hover:text-gray-12">- {space.name}- </span>- {space.hasPassword && (+ {!space.primary && space.currentUserCanManage && (+ <button+ type="button"+ onClick={(e) => handleDeleteSpace(e, space)}+ className={+ "flex justify-center items-center ml-auto rounded-full opacity-0 transition-all group size-6 group-hover:opacity-100 hover:bg-gray-4"+ }+ aria-label={`Delete ${space.name} space`}+ ><FontAwesomeIcon- icon={faLock}- className="ml-1.5 size-2.5 text-amber-600"+ icon={faXmark}+ className="size-3.5 text-gray-12"/>- )}- {!space.primary && space.currentUserCanManage && (- <button- type="button"- onClick={(e) => handleDeleteSpace(e, space)}- className={- "flex justify-center items-center ml-auto rounded-full opacity-0 transition-all group size-6 group-hover:opacity-100 hover:bg-gray-4"- }- aria-label={`Delete ${space.name} space`}- >- <FontAwesomeIcon- icon={faXmark}- className="size-3.5 text-gray-12"- />- </button>- )}- </>- )}- </Link>- </li>- </Tooltip>- );- })}- </div>+ </button>+ )}+ </>+ )}+ </Link>+ </li>+ </Tooltip>+ );+ })}</div><SpaceToggleControl