instagram is on and off
Some checks failed
ci / site (push) Has been cancelled

This commit is contained in:
2026-02-10 00:36:59 -05:00
parent af112a713c
commit d4aef77eca
6 changed files with 131 additions and 53 deletions

View File

@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-02-10

View File

@@ -0,0 +1,33 @@
## 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.

View File

@@ -0,0 +1,23 @@
## Why
The homepage currently reserves space for the Instagram module even when there are no Instagram items available, which wastes above-the-fold real estate and makes the page less relevant.
## What Changes
- When the Instagram feed dataset is empty, the homepage MUST omit the Instagram module entirely (not render an empty state block).
- The rest of the homepage modules MUST continue to render normally.
## Capabilities
### New Capabilities
- (none)
### Modified Capabilities
- `homepage-content-modules`: change the "no Instagram items available" behavior from rendering an empty state to hiding/omitting the Instagram module.
## Impact
- Affected UI: homepage module composition and layout.
- Likely code changes in the homepage renderer (e.g., `site/src/pages/index.astro`) and any Instagram module component(s).
- Tests/verification should cover: with Instagram items => module visible; without items => module omitted.

View File

@@ -0,0 +1,11 @@
## MODIFIED Requirements
### Requirement: Graceful empty and error states
If a module has no content to display, the homepage MUST render a non-broken empty state for that module and MUST still render the rest of the page.
The Instagram module is an exception: if there are no Instagram items to display, the homepage MUST omit the Instagram module entirely (no empty state block) and MUST still render the rest of the page.
#### Scenario: No Instagram items available
- **WHEN** the cached dataset contains no Instagram items
- **THEN** the Instagram-related module is not rendered and the homepage still renders other modules

View File

@@ -0,0 +1,15 @@
## 1. Reproduce And Locate
- [x] 1.1 Confirm where the homepage renders the Instagram section and what data source it uses (`site/src/pages/index.astro`)
- [x] 1.2 Identify the condition that currently triggers the Instagram empty state (no items) and the markup that reserves space
## 2. Implement Conditional Rendering
- [x] 2.1 Update the homepage to omit the Instagram section entirely when there are 0 Instagram items (no header, no empty-state text, no container)
- [x] 2.2 Ensure when Instagram items exist, the Instagram section still renders correctly (embeds/links unchanged)
## 3. Verify
- [x] 3.1 Build the site and confirm the homepage HTML does not include the Instagram section when `site/content/instagram-posts.json` is empty
- [x] 3.2 Build the site and confirm the homepage HTML includes the Instagram section when `site/content/instagram-posts.json` has at least one item
- [x] 3.3 Smoke-test in Docker/nginx (`localhost:8080`) to ensure the homepage layout renders correctly in both cases