You are browsing as a guest. Sign up (or log in) to start making projects!

3h 56m 28s logged

Devlog: New Features for Ship #2

Overview

Migrated OceanOS window layout from hardcoded positioning to a z-index-window layout system. This removes the need for manual position management across individual apps. Also added a notes app with suggestions and changed app positional settings.

Changes

Window Component (src/components/Window.tsx)

  • Added Optional Positioning: x and y props are now optional with fallback defaults
  • Added dynamic offset calculation: Windows now cascade based on their z-index value
    • Formula: baseOffset = (zIndex - 100) * 50px
    • Easy to Use Layout Management

Desktop Layout (src/components/Desktop.tsx)

  • Removed hardcoded positions: All 8 app windows no longer have explicit x={...} and y={...} coordinates
  • Made Prop Passing Easier: Windows now only define z-index, width, and height
  • Windows automatically position themselves based on their stacking order

Notes App and Suggestions Configuration (src/apps/Notes.tsx)

  • Created a Notes application with a suggestion box where users can give their opinion on OceanOS
  • Configured the suggestion box to use JSON:
    export async function GET() {
      const suggestions = await readSuggestions();
      return NextResponse.json(suggestions);
    }
0
12

Comments 0

No comments yet. Be the first!