Skip to content

Commit 8999bfb

Browse files
committed
minor(docs): disable primitive tooltips from final build
1 parent 4cbc2ca commit 8999bfb

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

apps/docs/app/components/Announcer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Announcement } from '~~/shared/models/announcements';
2121
2222
const fetcher = async () => {
2323
try {
24-
const res = await $fetch<Announcements>(endpoints.announcements);
24+
const res = await $fetch<Announcements>(endpoints.announcements, { "baseURL": "/" });
2525
return res.map((item) => new Announcement(item));
2626
} catch {
2727
return [];

apps/docs/app/components/ClientNavbar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</NavbarAction>
3737

3838
<NavbarAction
39-
href="/NetLogo_User_Manual.pdf"
39+
:href="`/${productVersion}/NetLogo_User_Manual.pdf`"
4040
aria-label="Download NetLogo User Manual as PDF"
4141
:no-nuxt-link="true"
4242
>
@@ -59,7 +59,7 @@ import { onVersionChange, pullVersionsFromSource } from '~~/shared/versions';
5959
6060
const {
6161
public: {
62-
website: { productWebsite, productVersion, versionsSrc },
62+
website: { productWebsite, productVersion, versionsSrc },
6363
},
6464
} = useRuntimeConfig();
6565
@@ -83,6 +83,7 @@ const navbarRef = useTemplateRef<InstanceType<typeof _Navbar>>('navbar');
8383
const brand = computed(() => (isMobileScreen.value ? TurtlesLogo : NetLogoUserManualLogo));
8484
const brandAttrs = computed(() => (isMobileScreen.value ? { style: { width: '2rem' } } : { width: 'auto' }));
8585
86+
8687
const handleMediaQueryChange = (): void => {
8788
if (import.meta.client) {
8889
const mediaQuery = useMediaQuery('(max-width: 768px)');

apps/docs/app/pages/[...slug].vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ const {
1212
1313
const route = useRoute();
1414
const path = decodeURIComponent(route.path).replace(/\?/, '');
15+
16+
// Disabled until feature is rolled out.
17+
// --Omar I. (05-10-2026)
18+
provide('prim-tooltip-disabled', true);
19+
1520
const { data: page } = await useAsyncData(path, () => {
1621
return queryCollection('content').path(path).first();
1722
});
1823
19-
// Special case due to the large number of
20-
// primitives on the dictionary page, which causes too many
21-
// tooltips to be rendered and results in degraded performance.
22-
// --Omar I. (05-10-2026)
23-
if (['/dictionary', '/3d'].includes(path)) {
24-
provide('prim-tooltip-disabled', true);
25-
}
2624
2725
const { data: surround } = await useAsyncData(`${path}-surround`, () => {
2826
return queryCollectionItemSurroundings('content', path, {

apps/docs/shared/versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const pullVersionsFromSource = async (
2525
url: string,
2626
): Promise<Record<string, VersionProps>> => {
2727
try {
28-
const data = await $fetch<Array<LiveVersionData>>(url);
28+
const data = await $fetch<Array<LiveVersionData>>(url, { "baseURL": "/" });
2929

3030
const normalizeLiveVersionsToProps = (version: LiveVersionData): VersionProps => ({
3131
displayName: version.name,

0 commit comments

Comments
 (0)