Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
857a619
chore(deps): update dependency eslint-plugin-react-hooks to v7
renovate[bot] Oct 20, 2025
3964e98
Update eslint.config.mjs
MarcusNotheis Oct 20, 2025
f80916c
Update eslint.config.mjs
MarcusNotheis Oct 20, 2025
c5282b8
Update eslint.config.mjs
MarcusNotheis Oct 20, 2025
b843c2c
Update MessageView.cy.tsx
Lukas742 Oct 29, 2025
fbdaed7
Update ProjectTemplate.tsx
Lukas742 Oct 29, 2025
280ab3f
fix lint errors
Lukas742 Nov 4, 2025
1b2723a
AT: scrollToRef
Lukas742 Nov 4, 2025
f207e26
AT: cleanup & fix more lint errors
Lukas742 Nov 5, 2025
2934283
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Nov 10, 2025
8e13ec6
AT: fix lint errors
Lukas742 Nov 11, 2025
bedf764
Update VerticalScrollbar.tsx
Lukas742 Nov 11, 2025
e4812f9
Update VerticalScrollbar.tsx
Lukas742 Nov 11, 2025
d85e290
Update index.tsx
Lukas742 Nov 11, 2025
441f67c
OP: fix eslint errors
Lukas742 Nov 12, 2025
ae3727e
suppress invalid lint errors
Lukas742 Nov 12, 2025
2142436
OP: fix eslint errors & warnings
Lukas742 Nov 12, 2025
2b75884
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Nov 14, 2025
c589cb6
Merge remote-tracking branch 'origin/main' into renovate/major-react-…
Lukas742 Dec 22, 2025
a31aa61
op: selection event
Lukas742 Dec 22, 2025
fc6d14e
lint auto fix, delete temp files
Lukas742 Dec 22, 2025
a0d4169
MessageView: fix lint errors
Lukas742 Dec 22, 2025
c4e7ce7
Update index.tsx
Lukas742 Dec 22, 2025
7c71bb0
SplitterLayout: fix lint errors
Lukas742 Dec 23, 2025
bbf9bb4
FilterBar: fix lint errors
Lukas742 Dec 23, 2025
0496a75
Update index.tsx
Lukas742 Dec 23, 2025
5979f55
ObjectPage: fix eslint errors
Lukas742 Dec 23, 2025
220bb9b
suppress remaining errors
Lukas742 Dec 23, 2025
e872326
update lockfiles diverged by merge
Lukas742 Dec 23, 2025
6a5acf5
eslint errors
Lukas742 Dec 23, 2025
2c461ea
lint: explicitly mark `@ui5/webcomponents-react` imports as internal
Lukas742 Dec 23, 2025
9fddb9b
lint: import order
Lukas742 Dec 23, 2025
b153c0b
SplitterLayout: fix reset behavior
Lukas742 Dec 23, 2025
42b4c95
Update useObserveHeights.ts
Lukas742 Dec 23, 2025
d75b06f
wip: lint conf
Lukas742 Jan 8, 2026
3791afb
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Jan 8, 2026
e8a79db
Update UXCIntegration.tsx
Lukas742 Jan 9, 2026
5ab611f
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Jan 16, 2026
ac274f7
Revert "Update UXCIntegration.tsx"
Lukas742 Jan 16, 2026
59c389d
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Feb 2, 2026
4a0b842
eslint-plugin-react-hooks 7.0.1
Lukas742 Feb 2, 2026
cc49cc6
Update AppShell.tsx
Lukas742 Feb 2, 2026
38297b6
Update UXCIntegration.tsx
Lukas742 Feb 2, 2026
7d2bb32
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Feb 2, 2026
0264010
Update UXCIntegration.tsx
Lukas742 Feb 2, 2026
0b0527d
temp: ci test
Lukas742 Feb 2, 2026
2f834dc
temp: ci test
Lukas742 Feb 2, 2026
bda262f
Revert "temp: ci test"
Lukas742 Feb 2, 2026
8c3992c
Revert "temp: ci test"
Lukas742 Feb 2, 2026
1c324a8
fix unstable test
Lukas742 Feb 2, 2026
b137da5
build before linting
Lukas742 Feb 2, 2026
4f4d4c7
temp
Lukas742 Feb 3, 2026
4a63aca
temp
Lukas742 Feb 3, 2026
2fff2d1
temp
Lukas742 Feb 3, 2026
581f16d
temp
Lukas742 Feb 3, 2026
5c21850
revert test changes
Lukas742 Feb 3, 2026
421ba1f
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Feb 4, 2026
4ed4789
SplitterLayout: stabilize test
Lukas742 Feb 4, 2026
e6cce31
Merge branch 'main' into renovate/major-react-monorepo
Lukas742 Feb 4, 2026
ce07936
lint
Lukas742 Feb 4, 2026
a278823
cleanup
Lukas742 Feb 4, 2026
3561529
FilterGroupItem: prevent side effect
Lukas742 Feb 4, 2026
1c5fb71
SelectDialog: fix test
Lukas742 Feb 4, 2026
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Created by .ignore support plugin (hsz.mobi)
node_modules
*.iml
yarn-error.log
Expand Down
2 changes: 0 additions & 2 deletions .storybook/components/DocsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export const InfoTable = ({
<Button
design={ButtonDesign.Transparent}
className={clsx('ui5-content-density-compact', classes.copyBtn)}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
onClick={handleCopy}
icon={copyIcon}
tooltip="copy"
Expand Down Expand Up @@ -153,7 +152,6 @@ export const InfoTable = ({
<Button
design={ButtonDesign.Transparent}
className={clsx('ui5-content-density-compact', classes.copyBtn)}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
onClick={handleCopy}
icon={copyIcon}
tooltip="copy"
Expand Down
2 changes: 1 addition & 1 deletion .storybook/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
import WrappingType from '@ui5/webcomponents/dist/types/WrappingType.js';
import type { ButtonPropTypes, PopoverDomRef } from '@ui5/webcomponents-react';
import {
Button,
FlexBox,
Expand All @@ -13,6 +12,7 @@ import {
Popover,
Text,
} from '@ui5/webcomponents-react';
import type { ButtonPropTypes, PopoverDomRef } from '@ui5/webcomponents-react';
import type { CommonProps } from '@ui5/webcomponents-react-base';
import { clsx } from 'clsx';
import { useRef, useState } from 'react';
Expand Down
8 changes: 4 additions & 4 deletions .storybook/components/ProjectTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { addCustomCSSWithScoping } from '@ui5/webcomponents-react-base/internal/utils';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import { useRef, useState } from 'react';
import { useId, useState } from 'react';
import classes from './ProjectTemplate.module.css';

interface ProjectTemplatePropTypes {
Expand Down Expand Up @@ -57,7 +57,7 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
note,
} = props;
const [popoverOpen, setPopoverOpen] = useState(false);
const linkRef = useRef(null);
const linkId = useId() + '-link';

return (
<ThemeProvider>
Expand All @@ -67,7 +67,7 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
<MessageStrip hideCloseButton design={MessageStripDesign.Critical} className={classes.unssupportedMessage}>
Currently not supported by V2.{' '}
<Link
ref={linkRef}
id={linkId}
accessibleRole="Button"
onClick={() => {
setPopoverOpen(true);
Expand All @@ -78,7 +78,7 @@ export function ProjectTemplate(props: ProjectTemplatePropTypes) {
</MessageStrip>
<Popover
className={classes.popover}
opener={linkRef.current}
opener={linkId}
open={popoverOpen}
onClose={() => {
setPopoverOpen(false);
Expand Down
2 changes: 2 additions & 0 deletions .storybook/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ export function useFakeStream(initialValue = '', typingDelay = 10, startingDelay

export function useStopStreamByESC(loading: boolean, stopStream: () => void, onStop?: () => void) {
const loadingRef = useRef(loading);
// Ref update during render doesn't trigger re-renders and is only read in event handler
// eslint-disable-next-line react-hooks/refs
loadingRef.current = loading;

useEffect(() => {
Expand Down
84 changes: 51 additions & 33 deletions cypress/support/commands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,20 @@ declare global {
/**
* Asserts that the element never gains the given attribute.
*
* __Note:__ An error is thrown if the attribute is not found, therefore it does not block the test if the subject
* __Note:__ An error is thrown if the attribute is found, therefore it does not block the test if the subject
* never includes the given attribute.
*
*
* @param attributeName - The name of the attribute which must not appear.
* @param observerTime - How long (in ms) to watch for mutations (default: 500).
* @param options
* @param options.observerTime - How long (in ms) to watch for mutations (default: 500).
* @param options.delayed - How long (in ms) to wait before starting observation (default: 0).
* @example
* cy.get('button').shouldNeverHaveAttribute('disabled', 1000);
* cy.get('button').shouldNeverHaveAttribute('disabled', { observerTime: 500, delayed: 100 });
*/
shouldNeverHaveAttribute(attributeName: string, observerTime?: number): Chainable<JQuery<HTMLElement>>;
shouldNeverHaveAttribute(
attributeName: string,
options?: { observerTime?: number; delayed?: number },
): Chainable<JQuery<HTMLElement>>;
}
}
}
Expand Down Expand Up @@ -80,35 +84,49 @@ Cypress.Commands.add(
},
);

Cypress.Commands.add(
'shouldNeverHaveAttribute',
{ prevSubject: 'element' },
(subject, attributeName, observerTime = 500) => {
cy.wrap(subject).then(($el) => {
const el = $el[0];
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
if (mutation.attributeName === attributeName) {
Cypress.log({
name: 'shouldNeverHaveAttribute',
message: `${attributeName} was found!`,
consoleProps: () => ({
attributeName,
element: el,
}),
});
const activeObservers: MutationObserver[] = [];

observer.disconnect();
throw new Error(`${attributeName} was found!`);
}
}
});
Cypress.Commands.add('shouldNeverHaveAttribute', { prevSubject: 'element' }, (subject, attributeName, options = {}) => {
const { observerTime = 500, delayed = 0 } = options;
// Disconnect all previous observers when a new assertion starts
while (activeObservers.length > 0) {
activeObservers.pop()?.disconnect();
}

cy.wait(delayed);

observer.observe(el, { attributes: true });
cy.wrap(subject).then(($el) => {
const el = $el[0];
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
if (mutation.attributeName === attributeName) {
Cypress.log({
name: 'shouldNeverHaveAttribute',
message: `${attributeName} was found!`,
consoleProps: () => ({
attributeName,
element: el,
}),
});

setTimeout(() => {
observer.disconnect();
}, observerTime);
observer.disconnect();
const index = activeObservers.indexOf(observer);
if (index > -1) {
activeObservers.splice(index, 1);
}
throw new Error(`${attributeName} was found!`);
}
}
});
},
);
observer.observe(el, { attributes: true });
activeObservers.push(observer);

setTimeout(() => {
observer.disconnect();
const index = activeObservers.indexOf(observer);
if (index > -1) {
activeObservers.splice(index, 1);
}
}, observerTime);
});
});
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const config = tseslint.config(
reactPlugin.configs.flat.recommended, // This is not a plugin object, but a shareable config object
reactPlugin.configs.flat['jsx-runtime'], // Add this if you are using React 17+
// eslint-plugin-react-hooks
...reactHooksPlugin.configs.recommended,
reactHooksPlugin.configs.flat.recommended,
{
languageOptions: {
globals: {
Expand Down
26 changes: 22 additions & 4 deletions examples/react-router-ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/react-router-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "6.1.1",
"eslint-plugin-react-hooks": "7.0.0",
"globals": "17.3.0",
"typescript": "5.8.3",
"typescript-eslint": "8.54.0",
Expand Down
2 changes: 0 additions & 2 deletions examples/vite-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ export default tseslint.config(
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
},
Expand Down
26 changes: 22 additions & 4 deletions examples/vite-ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/vite-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@vitejs/plugin-react": "5.1.2",
"cypress": "15.9.0",
"eslint": "9.39.2",
"eslint-plugin-react-hooks": "6.1.1",
"eslint-plugin-react-hooks": "7.0.0",
"eslint-plugin-react-refresh": "0.5.0",
"globals": "17.3.0",
"typescript-eslint": "8.54.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"eslint-plugin-no-only-tests": "3.3.0",
"eslint-plugin-prettier": "5.5.5",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "6.1.1",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-storybook": "10.2.3",
"glob": "13.0.0",
"globals": "17.3.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/base/src/internal/hooks/useSyncRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export function useSyncRef<RefType = never>(
ref(node);
}
if ({}.hasOwnProperty.call(ref, 'current')) {
// React Refs are mutable
// eslint-disable-next-line react-hooks/immutability
(ref as MutableRefObject<RefType>).current = node;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ describe('withWebComponent', () => {
</Button>
<Popover
open={open}
// eslint-disable-next-line react-hooks/refs
opener={btnRef.current}
onClose={() => {
setOpen(false);
Expand Down
Loading
Loading