Skip to content

Commit 9c04acb

Browse files
authored
Merge pull request #68 from RoboFinSystems/chore/xbrlkit-footer-application
chore(footer): list xbrlkit under Applications
2 parents dfaa6fa + 92964b0 commit 9c04acb

2 files changed

Lines changed: 58 additions & 17 deletions

File tree

ui-components/layout/LandingFooter.tsx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ const headingClass =
3939

4040
/**
4141
* The shared marketing-site footer for all three apps. The brand column, social
42-
* row, the Applications cross-links, the Company column and copyright are
43-
* derived from CURRENT_APP + APP_CONFIGS so each app reskins automatically;
42+
* row, the Applications cross-links (the three apps, then xbrlkit), the Company
43+
* column and copyright are derived from CURRENT_APP + APP_CONFIGS so each app
44+
* reskins automatically;
4445
* only the tagline and Product links vary and are passed in. Contact stays
4546
* per-app via the `contactModal` prop.
4647
*/
@@ -187,6 +188,22 @@ export function LandingFooter({
187188
</li>
188189
)
189190
})}
191+
<li>
192+
{/* xbrlkit, the free report viewer with its MCP server, is an
193+
application in its own right, listed after the three apps. It
194+
is a standalone site on its own domain, not an app config, so it
195+
is always an external link (absolute URL, new tab) from every
196+
app. Named the way the site names itself: "viewer" left its
197+
wordmark when /mcp made it a second function. */}
198+
<Link
199+
href="https://xbrlkit.com"
200+
target="_blank"
201+
rel="noopener noreferrer"
202+
className={linkClass}
203+
>
204+
xbrlkit
205+
</Link>
206+
</li>
190207
</ul>
191208
</div>
192209

@@ -202,20 +219,6 @@ export function LandingFooter({
202219
Research
203220
</Link>
204221
</li>
205-
<li>
206-
{/* xbrlkit — the report viewer and its MCP connect page, a standalone
207-
public site on its own domain, always an external link (absolute
208-
URL, new tab) from every app. Named the way the site names itself:
209-
"viewer" left its wordmark when /mcp made it a second function. */}
210-
<Link
211-
href="https://xbrlkit.com"
212-
target="_blank"
213-
rel="noopener noreferrer"
214-
className={linkClass}
215-
>
216-
xbrlkit
217-
</Link>
218-
</li>
219222
<li>
220223
<Link
221224
href={resolvedBlogHref}

ui-components/layout/__tests__/LandingFooter.test.tsx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, screen } from '@testing-library/react'
1+
import { render, screen, within } from '@testing-library/react'
22
import { afterEach, describe, expect, it, vi } from 'vitest'
33
import type { LandingFooterProps } from '../LandingFooter'
44

@@ -62,3 +62,41 @@ describe('LandingFooter company links', () => {
6262
expect(link('Blog')).not.toHaveAttribute('target')
6363
})
6464
})
65+
66+
describe('LandingFooter applications', () => {
67+
afterEach(() => {
68+
vi.doUnmock('../../../auth-core/config')
69+
})
70+
71+
// A footer column is the list that follows its heading.
72+
const column = (heading: string) =>
73+
screen.getByRole('heading', { name: heading })
74+
.nextElementSibling as HTMLElement
75+
76+
it('lists xbrlkit after the three apps, as an external link', async () => {
77+
await renderAs('robosystems')
78+
const apps = within(column('Applications'))
79+
.getAllByRole('link')
80+
.map((a) => a.textContent)
81+
expect(apps).toEqual([
82+
'RoboSystems',
83+
'RoboLedger',
84+
'RoboInvestor',
85+
'xbrlkit',
86+
])
87+
88+
const xbrlkit = within(column('Applications')).getByRole('link', {
89+
name: 'xbrlkit',
90+
})
91+
expect(xbrlkit).toHaveAttribute('href', 'https://xbrlkit.com')
92+
expect(xbrlkit).toHaveAttribute('target', '_blank')
93+
expect(xbrlkit).toHaveAttribute('rel', 'noopener noreferrer')
94+
})
95+
96+
it('no longer lists xbrlkit under Company', async () => {
97+
await renderAs('roboledger')
98+
expect(
99+
within(column('Company')).queryByRole('link', { name: 'xbrlkit' })
100+
).toBeNull()
101+
})
102+
})

0 commit comments

Comments
 (0)