Skip to content
Draft
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion apps/site/components/Common/Partners/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const getPartners = async (

const renderSmallPartner = (partner: Partner) => {
const Logo = PartnerLogos[partner.id];
const PartnerIcon = 'Favicon' in Logo ? Logo.Favicon : null;

if (!PartnerIcon) {
return null;
}
Comment on lines 35 to +40
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renderSmallPartner now returns null when a partner logo module doesn’t export Favicon, but getPartners() still slices to the requested length before rendering. This can lead to fewer than length partners being shown (e.g., when a new partner like ORAMA has only Logo). Prefer ensuring every partner logo exports a Favicon, or add a fallback (e.g., render Logo.Logo with small sizing) / filter partners with a favicon before slicing so the UI consistently renders the requested count.

Copilot uses AI. Check for mistakes.

return (
<PartnerButton
Expand All @@ -42,7 +47,7 @@ const renderSmallPartner = (partner: Partner) => {
href={partner.href}
data-tooltip={partner.name}
>
<Logo.Favicon />
<PartnerIcon />
</PartnerButton>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@
justify-end
lg:ml-8;
}

.oramaLogo {
@apply h-3
w-auto
text-neutral-900
dark:text-neutral-100;
}
13 changes: 2 additions & 11 deletions apps/site/components/Common/Searchbox/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ import {
ArrowDownIcon,
ArrowUpIcon,
} from '@heroicons/react/24/solid';
import Image from 'next/image';
import OramaLogo from '@node-core/ui-components/Icons/PartnerLogos/Orama/Logo';
import { useTranslations } from 'next-intl';
Comment on lines +8 to 9
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This footer is a client component, and importing the Orama logo as a React SVG component inlines a very large <path> into the client JS bundle. Consider serving the logo as a static asset (local /public SVG or remote) and rendering it via <img>/next/image, or otherwise ensuring it doesn’t inflate the client bundle for the search modal UI.

Copilot uses AI. Check for mistakes.
import { useTheme } from 'next-themes';

import styles from './index.module.css';

export const Footer = () => {
const t = useTranslations();
const { resolvedTheme } = useTheme();

const oramaLogo = `https://website-assets.oramasearch.com/orama-when-${resolvedTheme}.svg`;

return (
<div className={styles.footer}>
Expand Down Expand Up @@ -54,12 +50,7 @@ export const Footer = () => {
className={styles.poweredByLink}
>
<small>{t('components.search.poweredBy')}</small>
<Image
src={oramaLogo}
alt={t('components.search.poweredBy')}
width="62"
height="12"
/>
<OramaLogo className={styles.oramaLogo} />
</a>
</div>
</div>
Expand Down
21 changes: 21 additions & 0 deletions packages/ui-components/src/Icons/PartnerLogos/Orama/Logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import classNames from 'classnames';

import type { FC, SVGProps } from 'react';

const Orama: FC<SVGProps<SVGSVGElement>> = ({ className, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="1580 680 2900 460"
fill="none"
aria-hidden="true"
{...props}
className={classNames('h-3 w-auto', className)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded size classes reduce Logo component reusability

Low Severity

The Orama Logo component hardcodes 'h-3 w-auto' in its classNames, which is inconsistent with every other partner logo component (e.g., Cloudflare, Sentry) that only include color theming — never sizing. This also duplicates the same h-3 w-auto already applied by the oramaLogo CSS module class in the Footer consumer. If the Logo is rendered via renderLargePartner (which passes no className), it would be locked to 12px height instead of sizing naturally.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 90b1258. Configure here.

Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Orama logo component hard-codes sizing (h-3 w-auto) in its own className, while consumers (e.g. the Searchbox footer and PartnerButton styles) also set SVG sizing. To avoid conflicting/duplicated sizing rules and keep this logo consistent with other partner logo components, consider removing the default size classes from the SVG and letting the caller control size via className/container CSS.

Suggested change
className={classNames('h-3 w-auto', className)}
className={classNames(className)}

Copilot uses AI. Check for mistakes.
>
<path
fill="currentColor"
d="M4188.21 1128.75c73.6 0 142.18-30.11 153.05-76.94 3.35 30.11 20.07 52.69 44.33 64.39 21.74 10.88 48.51 12.55 74.43 2.51v-75.27c-10.87 2.51-22.58 3.35-31.78-4.18s-15.89-24.25-15.89-55.196V836.032c0-91.161-68.58-148.032-188.17-148.032-103.71 0-182.33 42.653-192.36 107.051l80.29 23.418c6.69-32.617 45.99-55.199 107.05-55.199 58.54 0 104.54 19.236 104.54 51.017 0 30.108-41.82 44.326-145.52 51.853-98.69 7.527-158.91 55.198-158.91 132.141 0 76.109 59.38 130.469 168.94 130.469m0-74.43c-49.34 0-79.45-20.91-79.45-55.202 0-32.618 28.44-55.199 74.43-58.544 77.78-5.018 125.46-14.218 141.35-32.617 0 88.652-56.88 146.363-136.33 146.363M3766.14 690.79c-64.86 0-123.48 30.584-152.39 77.637-22.67-49.405-74.25-76.853-129.74-77.637-55.48 0-102.37 28.232-127.38 72.932v-61.169h-84.41v415.327h85.97V890.764c0-72.147 43.77-119.2 106.29-119.2 59.39 0 96.9 43.916 96.9 116.848v229.468h85.97V889.196c0-71.363 42.99-117.632 105.51-117.632 58.61 0 96.12 40.779 96.12 115.279v231.037h85.97V872.727c0-55.679-15.63-100.379-46.89-132.532-30.48-32.937-71.12-49.405-121.92-49.405M1828.97 1128.75c133.82 0 224.14-90.32 224.14-223.302 0-132.142-88.65-216.612-224.14-216.612-135.48 0-224.97 85.307-224.97 216.612 0 132.982 92 223.302 224.97 223.302m0-80.29c-80.28 0-135.48-59.378-135.48-143.012 0-82.798 53.52-136.323 135.48-136.323 82.8 0 134.66 53.525 134.66 136.323 0 84.47-54.37 143.012-134.66 143.012M2448.54 688c-69.41 0-128.79 28.435-165.59 76.107v-70.253h-127.12v72.762h125.45c-25.09 33.453-39.31 76.106-39.31 125.45v153.054h-83.63v72.76h282.68v-72.76h-108.73V889.557c0-66.907 51.02-117.087 116.25-117.087 52.69 0 86.98 34.29 97.02 76.943l81.96-29.272C2609.96 740.689 2543.05 688 2448.54 688M2892.85 1128.75c73.6 0 142.18-30.11 153.05-76.94 3.34 30.11 20.07 52.69 44.32 64.39 21.75 10.88 48.51 12.55 74.44 2.51v-75.27c-10.87 2.51-22.58 3.35-31.78-4.18s-15.89-24.25-15.89-55.196V836.032c0-91.161-68.58-148.032-188.18-148.032-103.7 0-182.32 42.653-192.36 107.051l80.29 23.418c6.69-32.617 46-55.199 107.05-55.199 58.55 0 104.55 19.236 104.55 51.017 0 30.108-41.82 44.326-145.53 51.853-98.69 7.527-158.9 55.198-158.9 132.141 0 76.109 59.38 130.469 168.94 130.469m0-74.43c-49.35 0-79.45-20.91-79.45-55.202 0-32.618 28.43-55.199 74.43-58.544 77.78-5.018 125.45-14.218 141.34-32.617 0 88.652-56.87 146.363-136.32 146.363"
/>
</svg>
);

export default Orama;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Logo from './Logo';

export { Logo };
Comment on lines +1 to +3
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other partner logo modules export both Favicon and Logo, but ORAMA only exports Logo. This forces call sites to add special-casing (as in Partners/index.tsx) and can cause ORAMA to be omitted from small partner lists. Add an Orama/Favicon component and export { Favicon, Logo } here to match the established PartnerLogos module shape.

Suggested change
import Logo from './Logo';
export { Logo };
import Favicon from './Favicon';
import Logo from './Logo';
export { Favicon, Logo };

Copilot uses AI. Check for mistakes.
2 changes: 2 additions & 0 deletions packages/ui-components/src/Icons/PartnerLogos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as MACSTADIUM from './MacStadium';
import * as MICROSOFT from './Microsoft';
import * as NODESOURCE from './NodeSource';
import * as OPENSSF from './OpenSSF';
import * as ORAMA from './Orama';
import * as RACKSPACE from './Rackspace';
import * as SCALEWAY from './Scaleway';
import * as SENTRY from './Sentry';
Expand All @@ -31,6 +32,7 @@ export {
MICROSOFT,
NODESOURCE,
OPENSSF,
ORAMA,
RACKSPACE,
SCALEWAY,
SENTRY,
Expand Down
Loading