Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Breadcrumbs): replace navigate with custom item component #2054

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
chore: update screenshots
ValeraS committed Jan 27, 2025
commit dce0335831caf49d563810f7229a4cbef10e7d93
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Unchanged files with check annotations Beta

const [{theme}] = useGlobals();
React.useEffect(() => {
api.setOptions({theme: themes[getThemeType(theme)]});
}, [theme]);

Check warning on line 26 in .storybook/theme-addon/register.tsx

GitHub Actions / Verify Files

React Hook React.useEffect has a missing dependency: 'api'. Either include it or remove the dependency array
return null;
}
React.Children.forEach(props.children, (child, index) => {
if (React.isValidElement(child)) {
if (child.key === undefined || child.key === null) {
child = React.cloneElement(child, {key: index});

Check warning on line 42 in src/components/Breadcrumbs/Breadcrumbs.tsx

GitHub Actions / Verify Files

Assignment to function parameter 'child'
}
items.push(child);
}
});
it('should handle forward ref', function () {
let ref: React.RefObject<any> | undefined;

Check warning on line 42 in src/components/Breadcrumbs/__tests__/Breadcrumbs.test.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
const Component = () => {
ref = React.useRef();
return (
} = props;
const handleClickCapture = React.useCallback(
(event: React.MouseEvent<any>) => {

Check warning on line 110 in src/components/Button/Button.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
eventBroker.publish({
componentId: 'Button',
eventId: 'click',
props.onClickCapture(event);
}
},
[view, props.onClickCapture],

Check warning on line 125 in src/components/Button/Button.tsx

GitHub Actions / Verify Files

React Hook React.useCallback has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside React.useCallback
);
const commonProps = {
React.useEffect(() => window.clearTimeout(timerIdRef.current), []);
const handleCopy: OnCopyHandler = React.useCallback(
(text, result) => {

Check warning on line 114 in src/components/ClipboardButton/ClipboardButton.tsx

GitHub Actions / Verify Files

'text' is already declared in the upper scope on line 97 column 9
onCopy?.(text, result);
setTooltipDisabled(false);
setTooltipCloseDelay(timeout);
expect(() =>
render(
<CopyToClipboard text="Text to copy" onCopy={onCopy}>
{(() => 123) as any as CopyToClipboardContent}

Check warning on line 11 in src/components/CopyToClipboard/__tests__/CopyToClipboard.test.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
</CopyToClipboard>,
),
).toThrow('Content must be a valid react element');
}
function getKeyId(defs: PlatformDefs, val: string): string {
val = val.toLowerCase();

Check warning on line 34 in src/components/Hotkey/parse.ts

GitHub Actions / Verify Files

Assignment to function parameter 'val'
return defs.NormalizeMap[val] ?? val;
}
export const isMac = (): boolean =>
typeof navigator !== 'undefined' ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;

Check warning on line 2 in src/components/Hotkey/utils.ts

GitHub Actions / Verify Files

Unexpected negated condition
export function split(val: string, separator: string | RegExp): string[] {
return val.trim().split(separator).filter(Boolean);

Check warning on line 52 in src/components/Link/Link.tsx

GitHub Actions / Verify Files

React Hook React.useCallback has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside React.useCallback