Skip to content

Alicia Wynona Tjahjadi | Oct2025-1 | Module-Legacy-Code | Sprint-1 | Purple Forest: Bug Report: Hashtag slowing down my browser - #4

Open
aliciawt wants to merge 1 commit into
mainfrom
fix/hashtag-performance
Open

Alicia Wynona Tjahjadi | Oct2025-1 | Module-Legacy-Code | Sprint-1 | Purple Forest: Bug Report: Hashtag slowing down my browser#4
aliciawt wants to merge 1 commit into
mainfrom
fix/hashtag-performance

Conversation

@aliciawt

Copy link
Copy Markdown
Owner

Fix: Hashtag slowing down my browser

Problem

When clicking on hashtags, the page flashes blank on and off before showing the content.

Root Cause

The hashtag view was:

  1. Calling destroy() which cleared the DOM immediately → blank page
  2. Calling apiService.getBloomsByHashtag() (async) but not waiting for it
  3. Rendering with empty data before the API call completed → still blank
  4. Then re-rendering when data finally arrived → content appears

This caused a "blank → blank → content" flash sequence.

Solution

  • Made hashtagView async to wait for data before rendering
  • Show loading message immediately after destroy() to prevent blank flash
  • Wait for apiService.getBloomsByHashtag() to complete
  • Only render blooms after data is loaded

Testing

  • Clicking hashtag shows "Loading hashtag blooms..." (no blank flash)
  • Blooms appear after loading completes
  • Page no longer flashes blank
  • Multiple hashtag clicks work smoothly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant