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:
xandyprops 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
- Formula:
Desktop Layout (src/components/Desktop.tsx)
-
Removed hardcoded positions: All 8 app windows no longer have explicit
x={...}andy={...}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); }
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.