Files
astro-website/openspec/changes/hide-ig-if-no-data/design.md
Santhosh Janardhanan d4aef77eca
Some checks failed
ci / site (push) Has been cancelled
instagram is on and off
2026-02-10 00:36:59 -05:00

34 lines
2.1 KiB
Markdown

## Context
The homepage includes an Instagram section that renders even when there are no Instagram items in the cached dataset (or configured Instagram post URL list). Today the page shows an empty-state block, which takes away valuable homepage real estate.
The site is built with Astro and served as static HTML via nginx.
## Goals / Non-Goals
**Goals:**
- Omit the Instagram module entirely when there are no Instagram items available.
- Keep the rest of the homepage modules rendering unchanged.
- Preserve existing behavior when Instagram items exist (module visible, embeds render).
**Non-Goals:**
- Changing how Instagram data is ingested or configured (this remains a content/config concern).
- Adding new analytics events (existing Umami tracking remains as-is).
- Redesigning the homepage module layout beyond removing the empty Instagram block.
## Decisions
- **Decision: Prefer conditional rendering over “empty state” content.**
- Rationale: The objective is to reclaim space and keep the page focused; rendering nothing is the simplest and most consistent behavior.
- Alternative considered: Keep the empty state but reduce its height. Rejected because it still consumes space and draws attention to missing content.
- **Decision: Make the visibility decision at the homepage composition level.**
- Rationale: The homepage (`site/src/pages/index.astro`) is the module orchestrator and already has access to the list of Instagram items; the simplest change is to gate rendering of the section.
- Alternative considered: Add “hide if empty” behavior inside a shared module component. Rejected for now because the Instagram section is already bespoke in the homepage.
## Risks / Trade-offs
- [Risk] The homepage may look “suddenly different” if Instagram items disappear due to content/config changes. → Mitigation: This is the intended outcome; ensure the layout still flows nicely without the section.
- [Risk] Future requirements might want a minimal hint instead of full omission. → Mitigation: If needed later, we can reintroduce a smaller, inline CTA without restoring the full module.