Skip to content

Conversation

@SeanCassiere
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 2e95306
🔍 Latest deploy log https://app.netlify.com/sites/tanstack/deploys/67ddb8787dedf20008413f42
😎 Deploy Preview https://deploy-preview-371--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 28 (🔴 down 27 from production)
Accessibility: 95 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 77 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@SeanCassiere SeanCassiere changed the title feat: add inline explorer for the examples feat: add code explorer for the examples Mar 18, 2025
@KevinVandy KevinVandy marked this pull request as ready for review March 21, 2025 14:55
@tannerlinsley tannerlinsley merged commit ca471d7 into main Mar 21, 2025
2 checks passed
@tannerlinsley tannerlinsley deleted the feat-examples-code branch March 21, 2025 19:05
Comment on lines +105 to +138
const [expandedFolders, setExpandedFolders] = React.useState<Set<string>>(
() => {
const expanded = new Set<string>()
if (githubContents) {
const flattened = recursiveFlattenGithubContents(githubContents)
if (flattened.every((f) => f.depth === 0)) {
return expanded
}

// if the currentPath matches, then open
for (const file of flattened) {
if (file.path === currentPath) {
// Open all ancestors directories
const dirs = flattedOnlyToDirs(githubContents)
const ancestors = file.path.split('/').slice(0, -1)

while (ancestors.length > 0) {
const ancestor = ancestors.join('/')

if (dirs.some((d) => d.path === ancestor)) {
expanded.add(ancestor)
ancestors.pop()
} else {
break
}
}

break
}
}
}
return expanded
}
)

Choose a reason for hiding this comment

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

This is awesome! very well thought!

Choose a reason for hiding this comment

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

I am amazed by the simplicity and effectiveness of this PR! Thank's for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants