More small bug fixes#438
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces small UI/UX fixes around loading states and media fade-in behavior, improving perceived responsiveness and accessibility in the Coho PWA’s Lit-based UI components.
Changes:
- Add a loading skeleton state to the hashtag timeline page while the hashtag timeline data is undefined.
- Improve media fade-in behavior in
image-grid(tweak transitions, respect reduced-motion, and handle cached images that don’t fireloadreliably). - Replace
setTimeout-based “loaded” class toggling withrequestAnimationFramefor images/videos.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/app-hashtags.ts | Shows md-skeleton-card placeholders while hashtag timeline data is loading. |
| src/components/image-grid.ts | Refines media fade-in transitions, adds reduced-motion handling, and marks cached images as loaded post-render. |
Comment on lines
+158
to
+168
| ${this.data === undefined | ||
| ? html`<div class="skeletons"> | ||
| <md-skeleton-card count="5"></md-skeleton-card> | ||
| </div>` | ||
| : html`<app-timeline | ||
| .data=${this.data} | ||
| .header=${false} | ||
| .autoLoad=${false} | ||
| @open="${(e: CustomEvent<{ tweet: Post }>) => | ||
| this.handleOpenPost(e.detail.tweet)}" | ||
| ></app-timeline>`} |
Comment on lines
+226
to
+232
| private _markCachedImagesLoaded() { | ||
| const imgs = this.shadowRoot?.querySelectorAll<HTMLImageElement>( | ||
| '.media-cell img:not(.blurhash-canvas)' | ||
| ); | ||
| if (!imgs) return; | ||
| for (const img of imgs) { | ||
| if (img.complete && img.naturalWidth > 0) { |
|
Visit the preview URL for this PR (updated for commit e651b56): https://coho-mastodon--pr438-more-small-bug-fixes-0418snwo.web.app (expires Sat, 30 May 2026 07:22:20 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 22a5c1adab53191fa6702e9454dee7bd02b2edd7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #436
fixes #433