@samitouri / QOSami-HFS / commits / 9f100cdc

dx: steadier tests (plugins version change)

Massimo Melina committed Feb 21, 2026 at 19:27 UTC 9f100cdc23ac0545ee27abbdbdbce5619a40af58
5 files changed +9 -8
admin/src/DataTable.ts
+2 -1
@@ -17,6 +17,7 @@ export type DataTableColumn<R extends GridValidRowModel=any> = GridColDef<R> & {
17 sx?: SxProps | Callback<GridRenderCellParams, SxProps>
18 mergeRender?: { [other: string]: false | { override?: Partial<GridColDef<R>> } & BoxProps }
19 mergeRenderSx?: SxProps
20 + cellInnerProps?: BoxProps
21 }
22 export interface DataTableProps<R extends GridValidRowModel=any> extends Omit<DataGridProps<R>, 'columns'> {
23 columns: Array<DataTableColumn<R> | Falsy>
@@ -65,7 +66,7 @@ export function DataTable({ columns, initialState={}, actions, actionsProps, ini
66 originalRenderCell: col.renderCell || true,
67 renderCell(params: any) {
68 const { columns } = params.api.store.getSnapshot()
68 - return h(Box, { maxHeight: '100%', sx: { textWrap: 'wrap', ...callable(sx as any, params) } }, // wrap if necessary, but stay within the row
69 + return h(Box, { maxHeight: '100%', ...col.cellInnerProps, sx: { textWrap: 'wrap', ...callable(sx as any, params) } }, // wrap if necessary, but stay within the row
70 col.renderCell ? col.renderCell(params) : params.formattedValue,
71 col.mergeRender && h(Flex, { fontSize: 'smaller', flexWrap: 'wrap', mt: '2px', rowGap: 0, ...col.mergeRenderSx }, // wrap, normally causing overflow/hiding, if it doesn't fit
72 ...onlyTruthy(_.map(col.mergeRender, (props, other) => {
admin/src/FileForm.ts
+3 -4
@@ -9,9 +9,8 @@ import {
9 import { apiCall, UseApi } from './api'
10 import {
11 basename, defaultPerms, formatBytes, formatTimestamp, isWhoObject, newDialog, objSameKeys,
12 - onlyTruthy, prefix, VfsPerms, wantArray, Who, WhoObject, matches, xlate, md, Callback,
13 - useRequestRender, splitAt, IMAGE_FILEMASK, copyTextToClipboard, normalizeHost, CFG, try_,
14 - WHO_ANY_ACCOUNT
12 + onlyTruthy, prefix, VfsPerms, wantArray, Who, WhoObject, matches, xlate, md, Callback, MASK_IN_TESTS,
13 + useRequestRender, splitAt, IMAGE_FILEMASK, copyTextToClipboard, normalizeHost, CFG, try_, WHO_ANY_ACCOUNT,
14 } from './misc'
15 import { isModifiedConfig } from './AccountForm'
16 import { Btn, Flex, IconBtn, LinkBtn, propsForModifiedValues, useBreakpoint, wikiLink } from './mui'
@@ -385,7 +384,7 @@ function LinkField({ value, statusApi }: LinkFieldProps) {
384 !baseHost ? "Invalid baseUrl" : !urls ? 'error' : // check data is ok
385 h(DisplayField, {
386 label: "Link",
388 - className: 'maskInTests',
387 + className: MASK_IN_TESTS,
388 value: link || `outside of configured main address (${baseHost})`,
389 error,
390 InputProps: link ? { inputComponent: RenderLink } : undefined,
admin/src/InstalledPlugins.ts
+2 -1
@@ -9,7 +9,7 @@ import {
9 } from '@mui/icons-material'
10 import {
11 CFG, Html, HTTP_FAILED_DEPENDENCY, md, newObj, prefix, with_, xlate, formatTime, formatDate, replaceStringToReact,
12 - callable, tryJson, useAutoScroll, NBSP, isPrimitive
12 + callable, tryJson, useAutoScroll, NBSP, isPrimitive, HIDE_IN_TESTS
13 } from './misc'
14 import { alertDialog, confirmDialog, formDialog, toast } from './dialog'
15 import _ from 'lodash'
@@ -63,6 +63,7 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
63 field: 'version',
64 width: 70,
65 hideUnder: 'sm',
66 + cellInnerProps: { className: HIDE_IN_TESTS },
67 mergeRender: { installedVersion: { fontSize: 'x-small' } }
68 },
69 themeField,
admin/src/misc.ts
-1
@@ -1,6 +1,5 @@
1 // This file is part of HFS - Copyright 2021-2023, Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt
2
3 -import { apiCall } from './api'
3 import { HTTP_MESSAGES, MD_TAGS } from '@hfs/shared'
4 import { Link } from '@mui/material'
5 import httpCodes from './httpCodes'
src/cross-const.ts
+2 -1
@@ -13,7 +13,8 @@ export const MTIME_CHECK = 'x-mtime-check'
13 export const PREVIOUS_TAG = 'previous'
14 export const ALLOW_SESSION_IP_CHANGE = 'allow_session_ip_change'
15 export const HIDE_IN_TESTS = 'hideInTests' // elements that have variable size, where masking would produce changes, must be hidden
16 -export const EMBEDDED_LANGUAGE = 'en' // frontend includes this language in the code, and not need to import the translation json
16 +export const MASK_IN_TESTS = 'maskInTests'
17 +export const EMBEDDED_LANGUAGE = 'en' // frontend includes this language in the code, and not need to import the translation-json
18
19 export const HTTP_OK = 200
20 export const HTTP_CREATED = 201