Skip to content

feat(layout): add page tabs and a header page title - #51

Merged
SeijDeLeon merged 9 commits into
bluesky:stagingfrom
CammilleCC:feat/page-tabs
Jul 31, 2026
Merged

feat(layout): add page tabs and a header page title#51
SeijDeLeon merged 9 commits into
bluesky:stagingfrom
CammilleCC:feat/page-tabs

Conversation

@CammilleCC

Copy link
Copy Markdown

A route can now split its page into tabs instead of rendering a single element and show the page title.

Each tab gets its own URL, so it can be linked, bookmarked, and restored after a refresh. Visiting the base route redirects to the first tab.

chrome_Sq40ZU8vrp.mp4

The header now shows the current page after the app title. For the root route (`/`), the page title is hidden by default. chrome_ZDagTzUlsO




The route now looks like as follows:

{ path: '/explorer', label: 'Explorer', tabs: [
  { path: 'live', label: 'Live', element: <LiveTab /> },        // -> /explorer/live
  { path: 'replay', label: 'Replay', element: <ReplayTab /> },  // -> /explorer/replay
]}

@alisonscheng alisonscheng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great!

@SeijDeLeon

Copy link
Copy Markdown
Collaborator
  • The main routes prop accepts a leading slash '/' in front of the string used in the initial path key. This pattern does not match how path works in the tabs. Path in tabs does not work when you add a leading slash. Please gracefully handle this so a user could either use myPath or /myPath in the tabs path.
        {
            path: '/test',
            label: 'Test',
            tabs: [
                {
                    label: 'Test Page',
                    element: <TestPage />,
                    path: '/testing', //this one breaks

                },
                {
                    label: 'Docs',
                    element: <Documentation />,
                    path: 'docs', //this one works fine
                }
            ],
            icon: <TestTube size={32} />,
            isBackgroundTransparent: true,
        },

Comment thread src/components/FinchAppLayout/FinchHeader.tsx
Comment thread src/components/FinchPageTabs.tsx Outdated
return (
<nav
className={cn(
'flex gap-1 px-7 h-[52px] items-stretch shrink-0 bg-black/[0.14] border-b border-white/10',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please use rems for the h-[52px] here since this contains text, h-[##rem]. Similar comment for the padding

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Whoops, I was hoping to be as close to the mockup as possible, hence the hardcoded pixels. Thanks for pointing this out, used rems as much as possible. There's a slight difference now though, hopefully it is still acceptable.

Before:

page-tabs-before-detail

After:

page-tabs-after-detail




FYI @alisonscheng

Comment thread src/components/FinchPageTabs.tsx Outdated
@SeijDeLeon

Copy link
Copy Markdown
Collaborator

Something that I should have done earlier, but can we please create a FinchAppLayout folder in components and throw into it all these layout components like the finch layout, header, sidebar, tabs, and main content.

@CammilleCC

Copy link
Copy Markdown
Author

Please gracefully handle this so a user could either use myPath or /myPath in the tabs path.

Nice catch, I made the route normalization a bit more robust in 14edc00

Something that I should have done earlier, but can we please create a FinchAppLayout folder in components and throw into it all these layout components like the finch layout, header, sidebar, tabs, and main content.

Sure, added in 0783e1c

@SeijDeLeon SeijDeLeon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for making these changes and adding this, look good

@SeijDeLeon
SeijDeLeon merged commit eabb542 into bluesky:staging Jul 31, 2026
1 of 2 checks passed
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.

3 participants