fix: remove connect more link

This commit is contained in:
Alex committed 2026-09-29 23:59:11 +01:00
1 parent ffacf5fbb9
commit 411ac91bfd
11 files changed
+21 -46

No files matched your search

@@ -53,11 +53,10 @@ describe('SourcesPopoverFooter', () => {
it('renders the sources link as an inline link Button', async () => {
await renderFooter();
const [link, connect] = Array.from(container.querySelectorAll('a'));
const links = container.querySelectorAll('a');
expect(links).toHaveLength(1);
const [link] = Array.from(links);
expect(link.getAttribute('href')).toBe('/settings/knowledge');
expect(connect.getAttribute('href')).toBe(
'/settings/connectors?capability=sync',
);
expect(link.dataset.slot).toBe('button');
expect(link.className).toContain('text-primary');
expect(link.className).toContain('text-sm');
@@ -11,8 +11,8 @@ type SourcesPopoverFooterProps = {
};
/**
* Shared footer for source pickers: links to the sources page and to the
* connectors that can sync content, and an upload shortcut.
* Shared footer for source pickers: a link to the sources page and an upload
* shortcut.
*/
export default function SourcesPopoverFooter({
onNavigate,
@@ -24,20 +24,12 @@ export default function SourcesPopoverFooter({
// One row when it fits (link left, upload right); on a narrow sheet or a
// long locale the button wraps under the link.
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="flex flex-wrap items-center gap-x-4 gap-y-2">
<Button variant="link" size="inline" asChild>
<Link to="/settings/knowledge" onClick={onNavigate}>
{t('settings.sources.goToSources')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
<Button variant="link" size="inline" asChild>
<Link to="/settings/connectors?capability=sync" onClick={onNavigate}>
{t('conversation.sources.connectMore')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
</div>
<Button variant="link" size="inline" asChild>
<Link to="/settings/knowledge" onClick={onNavigate}>
{t('settings.sources.goToSources')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
<Button
type="button"
variant="outline-primary"
@@ -16,7 +16,7 @@ type ToolsTriggerProps = {
selectedIds: string[];
onToggle: (id: string) => void;
loading: boolean;
/** Shown above the links, e.g. connections that need signing in again. */
/** Shown above the link, e.g. connections that need signing in again. */
notice?: ReactNode;
};
@@ -45,20 +45,12 @@ export default function ToolsTrigger({
footer={
<div className="flex flex-col gap-3">
{notice}
<div className="flex flex-wrap items-center gap-x-4 gap-y-2">
<Button variant="link" size="inline" asChild>
<Link to="/settings/tools">
{t('settings.tools.manageTools')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
<Button variant="link" size="inline" asChild>
<Link to="/settings/connectors?capability=tools">
{t('conversation.sources.connectMore')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
</div>
<Button variant="link" size="inline" asChild>
<Link to="/settings/tools">
{t('settings.tools.manageTools')}
<ArrowRight aria-hidden="true" className="size-3" />
</Link>
</Button>
</div>
}
trigger={
-1
View File
@@ -2019,7 +2019,6 @@
"selectedCount": "{{count}} ausgewählt",
"groupOwn": "Deine",
"groupTeam": "Mit dem Team geteilt",
"connectMore": "Weitere verbinden",
"fromConnector": "Aus {{name}}",
"fromConnectorTitle": "Aus {{name}}: {{title}}",
"knowledge": "Wissen"
-1
View File
@@ -2025,7 +2025,6 @@
"selectedCount": "{{count}} selected",
"groupOwn": "Yours",
"groupTeam": "Shared with team",
"connectMore": "Connect more",
"fromConnector": "From {{name}}",
"fromConnectorTitle": "From {{name}}: {{title}}",
"knowledge": "Knowledge"
-1
View File
@@ -2019,7 +2019,6 @@
"selectedCount": "{{count}} seleccionados",
"groupOwn": "Tuyos",
"groupTeam": "Compartidas con el equipo",
"connectMore": "Conectar más",
"fromConnector": "De {{name}}",
"fromConnectorTitle": "De {{name}}: {{title}}",
"knowledge": "Conocimiento"
-1
View File
@@ -2006,7 +2006,6 @@
"selectedCount": "{{count}} 件選択中",
"groupOwn": "あなたのもの",
"groupTeam": "チームと共有",
"connectMore": "さらに接続",
"fromConnector": "{{name}} から",
"fromConnectorTitle": "{{name}} から: {{title}}",
"knowledge": "ナレッジ"
-1
View File
@@ -2111,7 +2111,6 @@
"selectedCount": "Выбрано: {{count}}",
"groupOwn": "Ваши",
"groupTeam": "Общие с командой",
"connectMore": "Подключить ещё",
"fromConnector": "Из {{name}}",
"fromConnectorTitle": "Из {{name}}: {{title}}",
"knowledge": "Знания"
-1
View File
@@ -2006,7 +2006,6 @@
"selectedCount": "已選 {{count}} 個",
"groupOwn": "你的",
"groupTeam": "團隊共享",
"connectMore": "連線更多",
"fromConnector": "來自 {{name}}",
"fromConnectorTitle": "來自 {{name}}:{{title}}",
"knowledge": "知識庫"
-1
View File
@@ -2004,7 +2004,6 @@
"selectedCount": "已选 {{count}} 个",
"groupOwn": "你的",
"groupTeam": "团队共享",
"connectMore": "连接更多",
"fromConnector": "来自 {{name}}",
"fromConnectorTitle": "来自 {{name}}:{{title}}",
"knowledge": "知识库"
+3 -4
View File
@@ -103,16 +103,15 @@ export default function Connectors() {
const partsOf = (key: string) => partsOfCatalog(catalog, key);
// "Connect more" in the composer opens the connectors that can do what the
// picker is for: sync content, or give tools.
// `?capability=` narrows the list to connectors that can sync content, or
// give tools.
const capability = searchParams.get('capability');
const clearCapability = () => {
searchParams.delete('capability');
setSearchParams(searchParams, { replace: true });
};
// Listed for syncing (Knowledge's Connect a service, Add knowledge's Browse
// all connectors, the sources picker's Connect more): a connect starts with
// Sync into Knowledge on.
// all connectors): a connect starts with Sync into Knowledge on.
const withPurpose = (options: LaunchOptions = {}): LaunchOptions =>
capability === 'sync' ? { ...options, purpose: 'knowledge' } : options;