From d28a58922153a7fb1c04ea7db8506e4a4ac4de5a Mon Sep 17 00:00:00 2001 From: Rich Moore Date: Thu, 19 Nov 2026 11:53:24 +0000 Subject: [PATCH 01/14] fix(mods-table): leave out a zero time in the Properties panel (LAZ-1755) A mod that was never enabled showed Enabled as 56 years ago. --- .../hooks/use_mod_properties/useModProperties.hook.ts | 8 ++++++-- .../hooks/use_mod_properties/useModProperties.test.tsx | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts index 1ec1426e8a..ab199104d4 100644 --- a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts +++ b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts @@ -181,8 +181,12 @@ const timeProperty = ( label: string, value: string | number | Date | undefined, ): ModProperty[] => { - const timestamp = value === undefined ? Number.NaN : new Date(value).getTime(); - return Number.isNaN(timestamp) ? [] : [{ kind: "time", id, label, timestamp }]; + const timestamp = value ? new Date(value).getTime() : undefined; + if (!timestamp) { + return []; + } + + return [{ kind: "time", id, label, timestamp }]; }; /** The mod's card: its picture, status, name, summary and author. */ diff --git a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx index c93ca81524..561f0761e5 100644 --- a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx +++ b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx @@ -104,6 +104,13 @@ describe("useModProperties", () => { expect(propertyById(result, "version")).toMatchObject({ value: "5.2" }); }); + // As a mod that's never been enabled keeps it, which would otherwise read as 1970. + it("leaves out a time of zero", () => { + const neverEnabled = mod("skyui", { ...SKYUI, enabledTime: 0 }); + + expect(propertyById(renderProperties([neverEnabled]), "enabledTime")).toBeUndefined(); + }); + it("lists a Nexus mod's ID on General, to copy", () => { expect(propertyById(renderProperties([SKYUI]), "nexusModId")).toMatchObject({ tab: "general", From c35898178a0fcafe6108af3364abdd1a8148f5cb Mon Sep 17 00:00:00 2001 From: Rich Moore Date: Thu, 19 Nov 2026 11:53:24 +0000 Subject: [PATCH 02/14] feat(mods-table): open a mod's description in a modal, with placeholders for outside images (LAZ-1755) The Properties panel's card links to the mod's page, found as the Advanced tab's game section is. --- locales/en/mod_management.json | 1 - .../ModPropertiesCard.test.tsx | 39 ++++++++++++++-- .../mod_properties_card/ModPropertiesCard.tsx | 45 ++++++++++++------ .../useModAdvancedEdits.hook.ts | 39 +--------------- .../useModProperties.hook.ts | 46 +++++++++++++++++-- .../useModProperties.test.tsx | 25 ++++++++++ .../util/kept_section/keptSection.ts | 41 +++++++++++++++++ 7 files changed, 176 insertions(+), 60 deletions(-) create mode 100644 src/renderer/src/extensions/mod_management/util/kept_section/keptSection.ts diff --git a/locales/en/mod_management.json b/locales/en/mod_management.json index 8f59303b00..6513e99822 100644 --- a/locales/en/mod_management.json +++ b/locales/en/mod_management.json @@ -221,7 +221,6 @@ "byAuthor": "by {{author}}", "adult": "Adult", "showDescription": "Show description", - "hideDescription": "Hide description", "copy": "Copy {{label}}", "copied": "Copied to clipboard", "copyFailed": "Couldn't copy to the clipboard", diff --git a/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.test.tsx b/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.test.tsx index ae45faa70b..8b169d7694 100644 --- a/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.test.tsx +++ b/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.test.tsx @@ -41,18 +41,51 @@ describe("ModPropertiesCard", () => { expect(screen.getByTestId("mod-properties-card-footer")).toBeInTheDocument(); }); - it("shows its whole description a click away", async () => { + it("shows its whole description in a modal a click away", async () => { renderCard({ name: "SkyUI", isAdult: false, description: "[b]An interface[/b]" }); - expect(screen.queryByTestId("mod-properties-description")).toBeNull(); + expect(screen.queryByRole("dialog")).toBeNull(); await userEvent.click(screen.getByTestId("mod-properties-description-toggle")); - expect(screen.getByTestId("mod-properties-description")).toBeInTheDocument(); + const dialog = screen.getByRole("dialog"); + expect(dialog).toContainElement(screen.getByTestId("mod-properties-description")); expect( screen.getByTestId("mod-properties-description").querySelector("b, strong"), ).not.toBeNull(); }); + it("closes the description's modal", async () => { + renderCard({ name: "SkyUI", isAdult: false, description: "An interface" }); + await userEvent.click(screen.getByTestId("mod-properties-description-toggle")); + + await userEvent.keyboard("{Escape}"); + + expect(screen.queryByRole("dialog")).toBeNull(); + }); + + it("stands in for images from outside Nexus Mods where the mod has a page", async () => { + renderCard({ + name: "SkyUI", + isAdult: false, + description: "[img]https://i.imgur.com/a.png[/img]", + pageUrl: "https://www.nexusmods.com/skyrimspecialedition/mods/12604", + }); + await userEvent.click(screen.getByTestId("mod-properties-description-toggle")); + + expect(screen.getByTestId("external-image-placeholder")).toBeInTheDocument(); + }); + + it("leaves out images from outside Nexus Mods where the mod has no page", async () => { + renderCard({ + name: "SkyUI", + isAdult: false, + description: "[img]https://i.imgur.com/a.png[/img]", + }); + await userEvent.click(screen.getByTestId("mod-properties-description-toggle")); + + expect(screen.queryByTestId("external-image-placeholder")).toBeNull(); + }); + it("offers no description where it has none", () => { renderCard({ name: "SkyUI", isAdult: false }); diff --git a/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.tsx b/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.tsx index b178fe2ba0..27afd72c59 100644 --- a/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.tsx +++ b/src/renderer/src/extensions/mod_management/components/mod_properties_card/ModPropertiesCard.tsx @@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next"; import { Button } from "@/ui/components/button/Button"; import { AdultAwareImage } from "@/ui/components/image/AdultAwareImage"; +import { Modal } from "@/ui/components/modal/Modal"; import { BBCode } from "@/ui/components/prose/bbcode/BBCode"; import { Typography } from "@/ui/components/typography/Typography"; @@ -15,10 +16,10 @@ interface IModPropertiesCardProps { /** * The mod as Browse's mod card shows one, heading the Properties panel: its picture with its - * status tag, its name and summary, its whole description a click away, as the legacy pane has - * it, then its author and whether it's adult. Its picture blurs as the user has asked, if it's - * adult; a mod without one shows the broken picture icon, as its row's thumbnail does. The - * description shows no images from outside Nexus Mods, as there's no room to stand in for them. + * status tag, its name and summary, its whole description a click away in a modal, then its + * author and whether it's adult. Its picture blurs as the user has asked, if it's adult; a mod + * without one shows the broken picture icon, as its row's thumbnail does. The description's images + * from outside Nexus Mods show as placeholders opening its page, or not at all without one. */ export const ModPropertiesCard = ({ card }: IModPropertiesCardProps) => { const { t } = useTranslation("mod_management"); @@ -52,25 +53,39 @@ export const ModPropertiesCard = ({ card }: IModPropertiesCardProps) => { {!!card.description && ( -
+ <> - {showDescription && ( -
- + setShowDescription(false)} + > +
+
- )} -
+ + )} {(!!card.author || card.isAdult) && ( diff --git a/src/renderer/src/extensions/mod_management/hooks/use_mod_advanced_edits/useModAdvancedEdits.hook.ts b/src/renderer/src/extensions/mod_management/hooks/use_mod_advanced_edits/useModAdvancedEdits.hook.ts index 7e807018a5..44daa8f16b 100644 --- a/src/renderer/src/extensions/mod_management/hooks/use_mod_advanced_edits/useModAdvancedEdits.hook.ts +++ b/src/renderer/src/extensions/mod_management/hooks/use_mod_advanced_edits/useModAdvancedEdits.hook.ts @@ -7,12 +7,7 @@ import type { Dispatch } from "redux"; import { useMainContext } from "@/contexts"; import { gameData } from "@/extensions/gamemode_management/gameData"; -import { - convertId, - findGame, - type IGameData, - storedGameQuery, -} from "@/extensions/gamemode_management/queries"; +import { convertId, type IGameData } from "@/extensions/gamemode_management/queries"; import { currentGameDiscovery, discovered } from "@/extensions/gamemode_management/selectors"; import type { IDiscoveryResult } from "@/extensions/gamemode_management/types/IDiscoveryResult"; import { getGame } from "@/extensions/gamemode_management/util/getGame"; @@ -27,6 +22,7 @@ import { activeGameId } from "@/util/selectors"; import { setModAttribute, setModType } from "../../actions/mods"; import type { IModWithState } from "../../types/IModProps"; +import { keptDownloadGame, keptSection } from "../../util/kept_section/keptSection"; import { modsSharedValue } from "../../util/mods_shared_value/modsSharedValue"; import type { ModProperty } from "../use_mod_properties/useModProperties.hook"; @@ -52,37 +48,6 @@ const activeGamePath = (state: IState): string | undefined => currentGameDiscove /** The games found installed, by their Vortex id. */ type InstalledGames = Readonly>; -/** What a mod's game section is kept as, alone or first in a list; none if not kept. */ -const keptDownloadGame = (mod: IModWithState): string | undefined => { - const kept: unknown = mod.attributes?.downloadGame; - const first: unknown = Array.isArray(kept) ? kept[0] : kept; - return typeof first === "string" && first !== "" ? first : undefined; -}; - -/** - * The Nexus Mods game a mod's section is, from how the legacy field keeps it: the Vortex game's id, - * or, for a game Vortex has no extension for, its domain, as the games data says it is. Also the - * Vortex game it names, if it's one, to name a section the site doesn't have yet. No section where - * it's neither, or where the game has none on the site. - */ -const keptSection = ( - games: IGameData, - kept: string, -): { section?: NexusGameDomain; vortexGameName?: string } => { - const query = storedGameQuery(games, kept); - if (query === undefined) { - return {}; - } - if ("gameDomain" in query) { - return { section: query.gameDomain }; - } - - return { - section: convertId(games, query, "gameDomain"), - vortexGameName: findGame(games, query)?.name, - }; -}; - /** Where a game puts mods of a type, "" for one that doesn't deploy, none if the game's unknown. */ const deployPath = (gameId: VortexGameId, typeId: string, gamePath: string | undefined) => { const game = getGame(gameId); diff --git a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts index ab199104d4..36cd9f9a24 100644 --- a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts +++ b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.hook.ts @@ -1,17 +1,23 @@ +import type { VortexGameId } from "@vortex/shared"; import type { TFunction } from "i18next"; import { useCallback, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { useSelector } from "react-redux"; import type { IDownload } from "@/extensions/download_management/types/IDownload"; +import { gameData } from "@/extensions/gamemode_management/gameData"; +import type { IGameData } from "@/extensions/gamemode_management/queries"; +import { nexusModPageUrl } from "@/extensions/nexus_integration/util/nexus_urls/nexusUrls"; import type { IState } from "@/types/IState"; import type { ITableAttribute } from "@/types/ITableAttribute"; import { preT } from "@/util/i18n"; +import { activeGameId } from "@/util/selectors"; import { modAuthor } from "../../components/mod_author/ModAuthor"; import type { IMod } from "../../types/IMod"; import type { IModWithState } from "../../types/IModProps"; import { attributeText as textOf } from "../../util/attribute_text/attributeText"; +import { keptDownloadGame, keptSection } from "../../util/kept_section/keptSection"; import { type ModStatus, localModStatus } from "../../util/mod_status/modStatus"; import { displayName } from "../../util/mods_table_views/modsTableViews"; import type { RegisteredValues } from "../../util/registered_values/registeredValues"; @@ -31,6 +37,8 @@ export interface IModPropertiesCard { summary?: string; /** Its whole description from the site, in BBCode, if it came with one. */ description?: string; + /** Its page on the site, if it came from Nexus Mods, where its description's images show. */ + pageUrl?: string; /** Its author, or its uploader where the author isn't known. */ author?: string; /** Its picture from the site, if it came from one. */ @@ -189,11 +197,27 @@ const timeProperty = ( return [{ kind: "time", id, label, timestamp }]; }; -/** The mod's card: its picture, status, name, summary and author. */ -const cardOf = (mod: IModWithState): IModPropertiesCard => ({ +/** A Nexus Mods mod's page, in its game section, the active game's where none is kept. */ +const pageUrlOf = (mod: IModWithState, games: IGameData, gameId: VortexGameId) => { + const modId = mod.attributes?.modId; + if (mod.attributes?.source !== "nexus" || !modId) { + return undefined; + } + + const { section } = keptSection(games, keptDownloadGame(mod) ?? gameId); + return section && nexusModPageUrl(section, modId); +}; + +/** The mod's card: its picture, status, name, summary, author and page. */ +const cardOf = ( + mod: IModWithState, + games: IGameData, + gameId: VortexGameId, +): IModPropertiesCard => ({ name: displayName(mod), summary: textOf(mod.attributes?.shortDescription), description: textOf(mod.attributes?.description) || undefined, + pageUrl: pageUrlOf(mod, games, gameId), author: modAuthor(mod), pictureUrl: textOf(mod.attributes?.pictureUrl), isAdult: mod.attributes?.adultContent === true, @@ -346,6 +370,8 @@ export const useModProperties = ( const edits = useModPropertyEdits(mods); const advanced = useModAdvancedEdits(mods); const iniTweaks = useIniTweaks(mods); + const games = useSelector(gameData); + const gameId = useSelector(activeGameId); return useMemo(() => { const withContent = (sections: IModPropertySection[]) => @@ -367,7 +393,7 @@ export const useModProperties = ( return { count: 1, - card: cardOf(mod), + card: cardOf(mod, games, gameId), sections: withContent([ section("organise", "general", edits.organise), section("times", "general", timeProperties(mod, download, t), "grid"), @@ -379,5 +405,17 @@ export const useModProperties = ( section("registered", "advanced", registeredProperties(mods, registered, tCommon)), ]), }; - }, [advanced, download, edits, iniTweaks, memberships, mods, registered, t, tCommon]); + }, [ + advanced, + download, + edits, + gameId, + games, + iniTweaks, + memberships, + mods, + registered, + t, + tCommon, + ]); }; diff --git a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx index 561f0761e5..32eaa9c26c 100644 --- a/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx +++ b/src/renderer/src/extensions/mod_management/hooks/use_mod_properties/useModProperties.test.tsx @@ -8,6 +8,7 @@ vi.mock("@/contexts", async (importOriginal) => ({ useMainContext: () => ({ api: { events: { emit: vi.fn() } } }), })); +import { NEXUS_BASE_URL } from "@/extensions/nexus_integration/constants"; import { makeModsTableStore } from "@/test-utils/modsTableStore"; import type { ITableAttribute } from "@/types/ITableAttribute"; import type { TFunction } from "@/util/i18n"; @@ -41,6 +42,11 @@ const SKYUI = mod("skyui", { }, }); +const KNOWN = [ + { id: "game", name: "Test Game", nexus: { gameDomain: "testgame" } }, + { id: "skyrimse", name: "Skyrim Special Edition", nexus: { gameDomain: "skyrimspecialedition" } }, +]; + const collection = (name: string) => ({ id: name, attributes: { name } }) as unknown as IMod; const t = ((key: string) => key) as unknown as TFunction; @@ -51,6 +57,7 @@ const renderProperties = ( attributes: ITableAttribute[] = [], ): IModProperties => { const store = makeModsTableStore({ + knownGames: KNOWN, downloads: { archive: { localPath: "SkyUI_5_2_SE-12604-5-2SE.7z", fileTime: Date.now() - HOUR }, }, @@ -80,11 +87,29 @@ describe("useModProperties", () => { description: "[b]SkyUI[/b] is an interface mod.", author: "schlangster", pictureUrl: "https://example.com/skyui.png", + pageUrl: `${NEXUS_BASE_URL}/testgame/mods/12604`, isAdult: false, status: undefined, }); }); + // As its game section keeps it, which can differ from the active game. + it("links the card to the mod's page in its game section", () => { + const fromSkyrimSE = mod("skyui", { + attributes: { ...SKYUI.attributes, downloadGame: "skyrimse" }, + }); + + expect(renderProperties([fromSkyrimSE]).card?.pageUrl).toBe( + `${NEXUS_BASE_URL}/skyrimspecialedition/mods/12604`, + ); + }); + + it("has no page for a mod that isn't from Nexus Mods", () => { + const local = mod("local", { attributes: { name: "Local", source: "other", modId: 1 } }); + + expect(renderProperties([local]).card?.pageUrl).toBeUndefined(); + }); + it("tags a downloaded mod's card", () => { expect(renderProperties([mod("a", { state: "downloaded" })]).card?.status).toBe("downloaded"); }); diff --git a/src/renderer/src/extensions/mod_management/util/kept_section/keptSection.ts b/src/renderer/src/extensions/mod_management/util/kept_section/keptSection.ts new file mode 100644 index 0000000000..29094aa32b --- /dev/null +++ b/src/renderer/src/extensions/mod_management/util/kept_section/keptSection.ts @@ -0,0 +1,41 @@ +import type { NexusGameDomain } from "@vortex/shared"; + +import { + convertId, + findGame, + type IGameData, + storedGameQuery, +} from "@/extensions/gamemode_management/queries"; + +import type { IModWithState } from "../../types/IModProps"; + +/** What a mod's game section is kept as, alone or first in a list; none if not kept. */ +export const keptDownloadGame = (mod: IModWithState): string | undefined => { + const kept: unknown = mod.attributes?.downloadGame; + const first: unknown = Array.isArray(kept) ? kept[0] : kept; + return typeof first === "string" && first !== "" ? first : undefined; +}; + +/** + * The Nexus Mods game a mod's section is, from how the legacy field keeps it: the Vortex game's id, + * or, for a game Vortex has no extension for, its domain, as the games data says it is. Also the + * Vortex game it names, if it's one, to name a section the site doesn't have yet. No section where + * it's neither, or where the game has none on the site. + */ +export const keptSection = ( + games: IGameData, + kept: string, +): { section?: NexusGameDomain; vortexGameName?: string } => { + const query = storedGameQuery(games, kept); + if (query === undefined) { + return {}; + } + if ("gameDomain" in query) { + return { section: query.gameDomain }; + } + + return { + section: convertId(games, query, "gameDomain"), + vortexGameName: findGame(games, query)?.name, + }; +}; From 9026386230a2886201cd1e28f361870650441cfc Mon Sep 17 00:00:00 2001 From: Rich Moore Date: Thu, 19 Nov 2026 11:53:24 +0000 Subject: [PATCH 03/14] feat(mods-table): keep the Properties panel's tabs in place and tidy its fields (LAZ-1755) Tabs over a fading scroll area, a resizable full-width notes box, more room round the empty state, no Downloaded badge. --- .../ModPropertiesPanel.test.tsx | 24 ++++++++- .../ModPropertiesPanel.tsx | 53 ++++++++++++------- .../mod_property_notes/ModPropertyNotes.tsx | 15 +++--- .../useModProperties.hook.ts | 2 +- .../useModProperties.test.tsx | 14 ++++- .../util/compact_field/compactField.ts | 14 +++-- .../util/mod_status/modStatus.test.ts | 4 -- .../util/mod_status/modStatus.ts | 9 +--- 8 files changed, 88 insertions(+), 47 deletions(-) diff --git a/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.test.tsx b/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.test.tsx index a2bdbeca1d..b8356e463a 100644 --- a/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.test.tsx +++ b/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.test.tsx @@ -29,7 +29,7 @@ const ONE_MOD: IModProperties = { summary: "A friendlier menu.", author: "schlangster", isAdult: false, - status: "downloaded", + status: "update", }, sections: [ { @@ -158,7 +158,7 @@ describe("ModPropertiesPanel", () => { const general = screen.getByRole("tabpanel"); expect(within(general).getByTestId("mod-properties-card")).toBeInTheDocument(); - expect(within(general).getByTestId("mod-status-downloaded")).toBeInTheDocument(); + expect(within(general).getByTestId("mod-status-update")).toBeInTheDocument(); expect(within(general).getByTestId("mod-property-version")).toHaveTextContent("5.2"); expect(within(general).queryByTestId("mod-property-archiveName")).not.toBeInTheDocument(); }); @@ -175,6 +175,26 @@ describe("ModPropertiesPanel", () => { expect(screen.queryByTestId("mod-properties-card")).not.toBeInTheDocument(); }); + it("keeps its tabs and close button out of what scrolls", () => { + renderPanel(ONE_MOD); + + const scrollArea = screen.getByTestId("mod-properties-scroll-area"); + expect(scrollArea).not.toContainElement(screen.getByRole("tablist")); + expect(scrollArea).not.toContainElement(screen.getByTestId("mod-properties-close")); + expect(scrollArea).toContainElement(screen.getByTestId("mod-properties-card")); + }); + + it("keeps several mods' count out of what scrolls", () => { + renderPanel({ + count: 3, + sections: [{ id: "organise", tab: "general", layout: "list", properties: [CATEGORY] }], + }); + + const scrollArea = screen.getByTestId("mod-properties-scroll-area"); + expect(scrollArea).not.toContainElement(screen.getByTestId("mod-properties-count")); + expect(scrollArea).toContainElement(screen.getByRole("button", { name: /^Category/ })); + }); + it("has no Advanced tab with nothing on it", () => { renderPanel({ ...ONE_MOD, sections: ONE_MOD.sections.filter(({ tab }) => tab === "general") }); diff --git a/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.tsx b/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.tsx index b86d95fd6e..08d6f4a893 100644 --- a/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.tsx +++ b/src/renderer/src/extensions/mod_management/components/mod_properties_panel/ModPropertiesPanel.tsx @@ -39,6 +39,13 @@ interface IModPropertiesPanelProps { const TABS: ModPropertiesTab[] = ["general", "advanced"]; +/** Its header, which stays put, keeping the gutter its scroll area keeps so their edges line up. */ +const HEADER_CLASSES = "flex shrink-0 scrollbar-gutter-stable overflow-hidden pr-3 pb-4 pl-5"; + +/** Where its contents scroll and fade out at the foot, as Browse's mod details do. */ +const SCROLL_CLASSES = + "min-h-0 flex-1 scrollbar-gutter-stable overflow-y-auto scroll-fade pr-3 pb-9 pl-5 scroll-fade-9"; + /** The sections on a tab, ruled off from each other. */ const sectionsOn = (properties: IModProperties, tab: ModPropertiesTab) => properties.sections @@ -102,9 +109,13 @@ export const ModPropertiesPanel = ({ const body = () => { if (properties.count === 0) { return ( -
+
- +
{closeButton} @@ -116,7 +127,7 @@ export const ModPropertiesPanel = ({ if (properties.count > 1) { return ( <> -
+
{t("modsTable::properties::count", { count: properties.count })} @@ -125,9 +136,11 @@ export const ModPropertiesPanel = ({
{/* General's then Advanced's, in one run, as there are no tabs to put them on. */} -
- {sectionsOn(properties, "general")} - {sectionsOn(properties, "advanced")} +
+
+ {sectionsOn(properties, "general")} + {sectionsOn(properties, "advanced")} +
); @@ -140,7 +153,7 @@ export const ModPropertiesPanel = ({ tabType="secondary" onSetSelectedTab={(next) => setPicked(next as ModPropertiesTab)} > -
+
{tabs.map((id) => ( - {tabs.map((id) => ( - - {id === "general" && !!properties.card && ( -
- -
- )} - - {sectionsOn(properties, id)} -
- ))} +
+ {tabs.map((id) => ( + + {id === "general" && !!properties.card && ( +
+ +
+ )} + + {sectionsOn(properties, id)} +
+ ))} +
); }; @@ -174,7 +189,7 @@ export const ModPropertiesPanel = ({ return (