Collapse the Recent section in the left sidebar

Open
#299 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in app/src/renderer/project/Sidebar/Sidebar.tsx and trace how the sidebar renders Recent and stores its collapsed state in ProjectView. Check how the floating sidebar shares that state and how Recent handles an empty list. Done means the section toggles with an accessible button and chevron, starts expanded, persists per project across restarts, and retains pages while collapsed.

Written by the indexing model from the issue text.

Description

Let the Recent section in the left sidebar (#184) collapse to its heading, so a long list of recent pages can be put away.

Why

Recent grows with every page opened. Someone who mostly uses Journal and All pages, or who just wants a quieter sidebar, has no way to hide it today.

What

  • Clicking the "Recent" heading collapses or expands the list. The heading stays; the list (or the "Pages you open show up here." hint) hides under it.
  • A chevron beside the heading shows which way it is: pointing right when collapsed, down when expanded.
  • Expanded by default.
  • Kept across restarts, per project, like the sidebar's own collapsed state (Kept<{ collapsed: boolean }> in ProjectView).
  • The floating sidebar (shown while pointing at the toggle) follows the same state.
  • Collapsing hides, it doesn't forget. Pages opened while collapsed still go into Recent and show when it is expanded again.
  • Keyboard and screen readers: the heading is a button with aria-expanded and aria-controls on the list.

Not in this

  • Collapsing Journal and All pages, or any other section that may come later.
  • Changing how many pages Recent holds.

Code: app/src/renderer/project/Sidebar/Sidebar.tsx.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
16m
Merged PRs (30d)
107

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.