Skip to content

DEV: Render username in quote posts marked as not found #33800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

megothss
Copy link
Contributor

@megothss megothss commented Jul 23, 2025

This change improves the handling of quote components when the referenced post cannot be found in the Glimmer Post Stream.
Previously, quotes marked as "not found" would not display any username information, making them difficult to understand contextually.

Key Changes:

  • Added conditional logic to hide quote controls (toggle and navigate buttons) when quotedPostNotFound is true
  • Introduced shouldDisplayQuoteControls getter to centralize control visibility logic
  • Modified the quote controls template to only render when appropriate
  • Updated data attributes to include data-can-navigate-to-post for better semantic meaning
  • Ensured the username from quotedUsername is properly displayed even for not-found quotes
  • Added comprehensive test coverage for the new behavior

The quote component now gracefully handles missing posts by showing the username while hiding interactive controls that would not function properly.

{{~/if~}}
</div>
{{~#if this.shouldDisplayQuoteControls~}}
<div class="quote-controls">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! this empty div was getting in the way when I was looking at another issue earlier

@megothss megothss merged commit 89d2054 into main Jul 23, 2025
18 checks passed
@megothss megothss deleted the dev/ensure-username-quote-post-not-found branch July 23, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants