Tabs: several places in one window, each with its own aside

Closed
#298 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
desktop

Research direction

Start by reading ProjectView and how App remounts it when the project changes; the issue names these as the existing state boundary and project-switch entry point. Then trace the trail, aside stack, sidebar state, Recent, and navigation flows to see what is window or tab state. Done means tabs can open, switch, and close, with independent trails and asides, a shared sidebar, and one journal tab after a project switch.

Written by the indexing model from the issue text.

Description

enhancement

A window holds one place at a time today. Tabs let it hold several, each with its own place and its own aside.

Today everything about where the window is lives in ProjectView, once per window: the trail, the aside stack (aside, its width and what each card shows), the sidebar's collapsed state and Recent. Tabs split that state in two: what belongs to a tab, and what stays with the window.

Per tab

  • The trail. Each tab has its own trail, so Back in a tab steps back through that tab only. A new tab starts at the journal.
  • The aside. Each tab has its own stack of cards on the right. Putting a page aside in one tab doesn't show it in another, and switching tabs swaps the aside with it.

Per window (per project)

  • The left sidebar stays with the window: its collapsed state and Recent are shared by every tab, and switching tabs doesn't change it.
  • Navigating from the sidebar navigates the active tab. It doesn't open a new one.

Tabs belong to the open project

  • Every tab is on the project the window has open. No tab shows another project.
  • Switching projects closes every tab. The new project opens with one tab, at the journal. App already remounts ProjectView by project, so this should mostly come for free.

Still to decide

  • Shortcuts: new tab, close tab, next and previous tab.
  • Whether some gesture (Cmd/Ctrl+click on a link, say) opens a link in a new tab.
  • What closing the last tab does: likely leaves one tab at the journal rather than an empty window.
  • Where the tab strip goes in the title bar, next to the sidebar toggle and the page title.

Out of scope

  • Tab persistence. Tabs are not kept across restarts or project switches. Reopening the app starts with one tab.

Done when

  • A window can open, switch and close tabs on the open project.
  • Each tab keeps its own trail and its own aside.
  • The left sidebar is the same across tabs, and clicking in it navigates the active tab.
  • Switching projects closes every tab and starts the new project with one.
Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
46m
Merged PRs (30d)
117

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shovon/pbnotes

All issues in shovon/pbnotes

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.