Lessons Learned

Documenting my understanding of API’s with a test app for Pixeled


Mobile Optimization


Cursor

Why This Happened

  1. Pattern matching bias: I applied a flexbox column pattern (modal + flex column) without fully considering the width constraint problem. I focused on vertical layout and missed the horizontal width issue.

  2. Incremental fixes: Previous attempts (e.g., overflow-wrap, max-width) were partial. I didn’t step back to question the layout model.

  3. CSS layout understanding: I’m more comfortable with:

  4. Visual reasoning: Screenshots help, but I don’t “see” layout the same way. I tend to reason from code patterns rather than visual outcomes.

Strengths & Limitations

Strengths:

Limitations:

How to Work Better Together

  1. You spot layout issues; I fix them. You’re the visual designer; I’m the implementer. When you see a problem, describe it and we’ll address it.

  2. When you suggest a direction (e.g., “try CSS Grid”), I’ll implement it and explain why it works.

  3. Flag it early: If I’m tweaking CSS without fixing the root cause, say “This feels like a structural issue—should we change the layout model?”

  4. Learn together: I can explain how Grid/Flexbox works, but you’re the one validating the visual result.

  5. Use a checklist for layout issues:

The Real Answer

You don’t need to become a CSS expert. You’re the visual designer; I’m the code implementer. When you see something wrong, describe it and suggest a direction if you have one. I’ll implement it and verify it works.


Review of a CSS fix to the modal layouts on desktop

What Went Wrong

The Original Problem:

Why It Was Tricky:

  1. Flexbox vs Grid: Flexbox expands to fit content. Grid can control column sizing, but column sizing keywords matter.
  2. Column sizing keywords:
  3. Block vs inline-grid:

The Fix That Worked

display: inline-grid; /* Inline-grid sizes to content, not full width */
grid-template-columns: min-content; /* Column width = minimum needed */

Why this works:

Why earlier attempts failed:

The key insight: Use inline-grid to size to content, and min-content to constrain the column to the image width, not the caption width.

This is a common CSS layout issue: choosing the right container display type and sizing keywords for the desired constraint behavior.


Explanation of technical terms

Client-side fetch vs server-side rendering

CORS limitations

  1. Use a small server/proxy to call the API
  2. Use server-side rendering
  3. Find if Pixelfed exposes a public, CORS-enabled endpoint

Notes on branches and deployments

Here’s how Netlify deployments work:

Netlify deployments

Preview deployments:

Main deployment:

How to clean up old preview deployments

Option 1: Delete in Netlify Dashboard

  1. Go to your Netlify site dashboard
  2. Click “Deploys” (or “Sites” → your site → “Deploys”)
  3. Find the preview deployment from your branch
  4. Click the ”…” menu → “Delete deploy”

Option 2: Auto-delete merged branch deployments

  1. In Netlify: Site settings → Build & deploy → Continuous Deployment
  2. Enable “Delete merged branch previews” or similar (varies by Netlify version)
  3. This will auto-delete preview deployments when you merge the branch into main

Option 3: Keep a limited number

Summary

For a small number of branches, manual cleanup is fine. For many branches, enable auto-deletion to keep things tidy.