Skip to content

Conversation

ilsea
Copy link
Member

@ilsea ilsea commented Oct 2, 2026

Closes #34, Closes #33

Adds new components:

  • AppShell
  • Button
  • StarRatingInput

AppShell

AppShell is the frame around every page: header (logo, search, nav), the main area, and the footer. It wraps all pages via Outlet. On mobile, the nav is a fixed tab bar at the bottom.

Routes: AppShell is a layout route, so every page goes in as a child of it in App.tsx (/, /shelf, /book/:id). The current App.tsx has temporary placeholder pages you can swap out.

Documentation: See ´docs/styles-and-components.md´ for more information about how AppShell, Search and other design components work. Changes to design and behavior have been added to relevant docs to ensure that they are up to date.

Button

Includes two variants (default: primary):

  • Primary = transparent background with dark purple border and text.
  • Secondary = borderless rose background with white text.

Two types (default: button, to avoid accidental form submits):

  • button
  • submit (built-in submit function for connected forms)

Two flexible sizes (default: narrow):

  • narrow: less horizontal padding
  • wide: more horizontal padding

Example: "Load more books"
Primary, type=button, wide
A wider, transparent button with dark purple outline.

Example: "Save note"
Secondary, type=submit, narrow
A smaller, rose colored button with white text. Wrap text field and button in form to use submit

Icons

Icons are created as separate files in /src/icons. All components that use icons have been updated to reference icon files instead of using their own svg.

  • Star (rating)
  • Chevron (back)
  • Filter
  • Logo (book with sparkle)
  • Ribbon (bookmark, save to shelf)
  • Search (looking glass)
  • Shelf (bookmark, navigation button)
  • Sparkle (decoration)
  • Browse (book, navigation button)

StarRatingInput: Wraps star icons into a single component that will be used on the detail page to let the user set rating. Stars can be set to on/off with different colors depending on rating.

ilsea added 7 commits October 1, 2026 14:24
Apparently this got left out in an earlier session. Now references the correct index.css.
Includes two variants (default: primary):
- Primary = transparent background with dark purple border and text.
- Secondary = borderless rose background with white text.

Two types (default: button, to avoid accidental form submits):
- button
- submit

Two flexible sizes (default: narrow):
- narrow: less horizontal padding
- wide: more horizontal padding

Example: "Load more books"
Primary, type=button, wide
A wider, transparent button with dark purple outline.

Example: "Save note"
Secondary, type=submit, narrow
A smaller, rose colored button with white text. Wrap text field and button in <form> to use submit.
- AppShell wraps all pages via Outlet; owns constant page width
- Header: logo, SearchField (writes q to URL), main nav
- Mobile-first CSS: nav is a fixed bottom tab bar, desktop media query at 48rem
- Temporary placeholder pages in App.tsx for testing
Also delete unused Bookmark.tsx icon file
Clean up forgotten TODO comment in AppShell.tsx
Icons now available:
- Star (rating)
- Chevron (back)
- Filter
- Logo (book with sparkle)
- Ribbon (bookmark, save to shelf)
- Search (looking glass)
- Shelf (bookmark, navigation button)
- Sparkle (decoration)
- Browse (book, navigation button)
New component that will be used on detail page to let user set rating. Stars can be set to on/off with different colors depending on rating.
@ilsea ilsea requested a review from a team as a code owner October 2, 2026 08:51
@ilsea ilsea linked an issue Oct 2, 2026 that may be closed by this pull request
Copy link
Member

@linesf linesf left a comment

Choose a reason for hiding this comment

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

Good job on implementing the components and icons:)

@ilsea ilsea merged commit 9ed67ea into main Oct 2, 2026
@ilsea ilsea deleted the 34-shared-components-primitives branch October 2, 2026 08:57
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shared components: primitives Create layout shell
2 participants