Skip to content

Commit d78b090

Browse files
committed
Delist TanStack Ranger
1 parent 17ea178 commit d78b090

7 files changed

Lines changed: 23 additions & 17 deletions

File tree

src/components/Navbar.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,12 @@ type LibraryMenuColumn = {
370370
* taxonomy. Iterating `libraryCategories` preserves the intended per-category
371371
* order; only public, navigable libraries are shown.
372372
*/
373-
// Public libraries intentionally omitted from the Libraries mega-menu (still
374-
// reachable via the full-screen "Browse all libraries" overlay).
375-
const LIBRARY_MENU_EXCLUDED_IDS = new Set(['ranger'])
376-
377373
function getLibraryCategoryColumns(): LibraryMenuColumn[] {
378374
const byCategory = new Map<LibraryCategory, LibraryMenuEntry[]>(
379375
categoryOrder.map((category) => [category, []]),
380376
)
381377

382378
for (const [id, category] of Object.entries(libraryCategories)) {
383-
if (LIBRARY_MENU_EXCLUDED_IDS.has(id)) continue
384379
const library = publicLibraries.find((lib) => lib.id === id)
385380
if (!library || !library.to) continue
386381
byCategory.get(category)?.push({

src/components/ShowcaseSubmitForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import { FormEvent, useMemo, useState } from 'react'
2020
// Filter to only show libraries with proper configuration
2121
const selectableLibraries = libraries.filter(
2222
(lib) =>
23-
lib.name && lib.id !== 'react-charts' && lib.id !== 'create-tsrouter-app',
23+
lib.name &&
24+
lib.visible !== false &&
25+
lib.id !== 'react-charts' &&
26+
lib.id !== 'create-tsrouter-app',
2427
)
2528

2629
interface ShowcaseSubmitFormProps {

src/components/game/engine/GameEngine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
} from '../utils/islandGenerator'
3030
import { generateRockColliders } from '../utils/collision'
3131
import { generateCoins, generateExpandedCoins } from '../utils/coinGenerator'
32-
import { libraries } from '~/libraries'
32+
import { publicLibraries } from '~/libraries'
3333
import { partners } from '~/utils/partners'
3434
import { fetchGameShowcases } from '../utils/showcases'
3535

@@ -338,7 +338,7 @@ export class GameEngine {
338338

339339
if (state.islands.length === 0) {
340340
// Generate islands
341-
const generatedIslands = generateIslands(libraries)
341+
const generatedIslands = generateIslands(publicLibraries)
342342
state.setIslands(generatedIslands)
343343

344344
// Generate rock colliders

src/components/game/scene/GameScene.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from '../utils/islandGenerator'
2323
import { generateRockColliders } from '../utils/collision'
2424
import { generateCoins } from '../utils/coinGenerator'
25-
import { libraries } from '~/libraries'
25+
import { publicLibraries } from '~/libraries'
2626
import { partners } from '~/utils/partners'
2727

2828
// Filter to only active partners and convert to slim format for the game
@@ -162,7 +162,7 @@ function SceneContent() {
162162
}
163163

164164
// Generate islands
165-
const generatedIslands = generateIslands(libraries)
165+
const generatedIslands = generateIslands(publicLibraries)
166166
state.setIslands(generatedIslands)
167167
const rockColliders = generateRockColliders(generatedIslands, 30, 140)
168168
state.setRockColliders(rockColliders)

src/libraries/browse-utils.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,20 @@ export function orderLibrariesForBrowse<TLibrary extends LibrarySlim>(
88
allLibraries: Array<TLibrary>,
99
) {
1010
const others = allLibraries.filter(
11-
(library) =>
12-
library.id !== 'ranger' &&
13-
library.id !== 'config' &&
14-
library.id !== 'react-charts',
11+
(library) => library.id !== 'config' && library.id !== 'react-charts',
1512
)
16-
const ranger = allLibraries.filter((library) => library.id === 'ranger')
1713
const config = allLibraries.filter((library) => library.id === 'config')
1814

1915
const devtoolsIndex = others.findIndex((library) => library.id === 'devtools')
2016

2117
if (devtoolsIndex === -1) {
22-
return [...others, ...config, ...ranger]
18+
return [...others, ...config]
2319
}
2420

2521
return [
2622
...others.slice(0, devtoolsIndex + 1),
2723
...config,
2824
...others.slice(devtoolsIndex + 1),
29-
...ranger,
3025
]
3126
}
3227

src/libraries/libraries.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export const ranger: LibrarySlim = {
457457
latestBranch: 'main',
458458
availableVersions: ['v0'],
459459
scarfId: 'dd278e06-bb3f-420c-85c6-6e42d14d8f61',
460+
visible: false,
460461
sitemap: {
461462
includeLandingPage: true,
462463
includeDocsPages: true,

tests/static-data-contracts.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import assert from 'node:assert/strict'
22
import { allMaintainers } from '../src/libraries/maintainers'
33
import {
4+
findLibrary,
45
isPublicLibrary,
56
libraries,
67
publicLibraries,
@@ -15,6 +16,17 @@ assert.deepEqual(
1516
'publicLibraries stays in sync with the public-library selector',
1617
)
1718

19+
assert.equal(
20+
publicLibraries.some((library) => library.id === 'ranger'),
21+
false,
22+
'Ranger stays delisted from public library discovery',
23+
)
24+
assert.equal(
25+
findLibrary('ranger')?.to,
26+
'/ranger',
27+
'Ranger keeps its permalink while delisted',
28+
)
29+
1830
for (const library of publicLibraries) {
1931
assert.equal(
2032
library.to.startsWith('/'),

0 commit comments

Comments
 (0)