Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/copy-build-to-d2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: 'lts/*'

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 'lts/*'

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
token: ${{env.GH_TOKEN}}
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 'lts/*'

- name: Install
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 'lts/*'

- name: Install
run: yarn install --frozen-lockfile
Expand Down
3 changes: 2 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const makeBabelConfig = require('@dhis2/cli-app-scripts/config/makeBabelConfig.js')
// Direct path required because the package exports field doesn't expose this subpath
const makeBabelConfig = require('../node_modules/@dhis2/cli-app-scripts/config/makeBabelConfig.js')

module.exports = {
addons: ['@storybook/preset-create-react-app'],
Expand Down
6 changes: 6 additions & 0 deletions config/setupJest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable no-undef */
if (globalThis.CSS === undefined) {
globalThis.CSS = { supports: () => true }
} else if (typeof globalThis.CSS.supports !== 'function') {
globalThis.CSS.supports = () => true
}
4 changes: 2 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2026-03-04T14:56:39.522Z\n"
"PO-Revision-Date: 2026-03-04T14:56:39.522Z\n"
"POT-Creation-Date: 2026-03-23T09:34:56.311Z\n"
"PO-Revision-Date: 2026-03-23T09:34:56.312Z\n"

msgid "view only"
msgstr "view only"
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/build/'],
setupFiles: ['<rootDir>/config/setupJest.js'],
setupFilesAfterEnv: ['<rootDir>/config/setupTestingLibrary.js'],
}
13 changes: 7 additions & 6 deletions src/components/DataDimension/Info/ProgramIndicatorInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,13 @@ export const ProgramIndicatorInfo = ({ type, id, displayNameProp }) => {
<th>{i18n.t('Aggregation type')}</th>
<td>{data?.programIndicator.aggregationType}</td>
</tr>
{data?.programIndicator && 'decimals' in data.programIndicator && (
<tr>
<th>{i18n.t('Decimals in output')}</th>
<td>{data.programIndicator.decimals}</td>
</tr>
)}
{data?.programIndicator &&
'decimals' in data.programIndicator && (
<tr>
<th>{i18n.t('Decimals in output')}</th>
<td>{data.programIndicator.decimals}</td>
</tr>
)}
{Boolean(data?.programIndicator.legendSets.length) && (
<tr>
<th>{i18n.t('Legend set(s)')}</th>
Expand Down
2 changes: 1 addition & 1 deletion src/components/FileMenu/DeleteDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getMutation = (type) => ({
})

export const DeleteDialog = ({ type, id, onClose, onDelete, onError }) => {
const mutation = useMemo(() => getMutation(type), [])
const mutation = useMemo(() => getMutation(type), [type])
const [mutate] = useDataMutation(mutation, {
variables: { id },
onError: (error) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const TranslationForm = ({
fetchFieldsTranslations(fieldsToTranslate)

fetchTranslations()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [fieldsToTranslate])

useEffect(() => setNewTranslations(translations), [translations])
Expand Down
4 changes: 2 additions & 2 deletions src/components/UserMention/useUserSearchResults.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useDataQuery } from '@dhis2/app-runtime'
import debounce from 'lodash/debounce'
import { useCallback, useEffect, useState } from 'react'
import { useEffect, useMemo, useState } from 'react'

const usersQuery = {
users: {
Expand All @@ -21,7 +21,7 @@ export const useUserSearchResults = ({ searchText }) => {
lazy: true,
})

const debouncedRefetch = useCallback(debounce(refetch, 250), [refetch])
const debouncedRefetch = useMemo(() => debounce(refetch, 250), [refetch])

useEffect(() => {
if (searchText.length) {
Expand Down
20 changes: 11 additions & 9 deletions src/modules/pivotTable/useScrollPosition.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import debounce from 'lodash/debounce'
import { useState, useCallback, useEffect } from 'react'
import { useState, useMemo, useEffect } from 'react'

export const useScrollPosition = (containerRef, debounceWait = 10) => {
const [scrollPosition, setScrollPosition] = useState({ x: 0, y: 0 })

const onScroll = useCallback(
debounce(() => {
const scroll = {
x: containerRef.current.scrollLeft,
y: containerRef.current.scrollTop,
}
setScrollPosition(scroll)
}, debounceWait)
const onScroll = useMemo(
() =>
debounce(() => {
const scroll = {
x: containerRef.current.scrollLeft,
y: containerRef.current.scrollTop,
}
setScrollPosition(scroll)
}, debounceWait),
[containerRef, debounceWait]
)

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions src/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const useDidUpdateEffect = (fn, inputs) => {
} else {
didMountRef.current = true
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, inputs)
}

Expand Down
Loading
Loading