[PR #7741] [CLOSED] chore: improve the error UI of link preview #8080

Closed
opened 2026-03-23 23:22:31 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7741
Author: @asjqkkkk
Created: 4/14/2025
Status: Closed

Base: mainHead: fix/link_preview


📝 Commits (3)

  • bc0882c chore: improve the error UI of link preview
  • a23f8c9 Merge branch 'main' into fix/link_preview
  • be061ee Merge branch 'main' into fix/link_preview

📊 Changes

2 files changed (+43 additions, -44 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart (+16 -7)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart (+27 -37)

📄 Description

Before:

image

After:

image

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Improve the error and loading state UI for link previews, enhancing the visual presentation and handling of link preview information

Enhancements:

  • Refactor link preview widget to handle different loading and error states more elegantly
  • Improve fallback display of link information by using URL host when title is not available

Chores:

  • Simplify link preview widget logic for displaying loading, error, and content states

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/7741 **Author:** [@asjqkkkk](https://github.com/asjqkkkk) **Created:** 4/14/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/link_preview` --- ### 📝 Commits (3) - [`bc0882c`](https://github.com/AppFlowy-IO/AppFlowy/commit/bc0882c554c4039a41b04de0dc15e37a8b14169c) chore: improve the error UI of link preview - [`a23f8c9`](https://github.com/AppFlowy-IO/AppFlowy/commit/a23f8c988b1ccb01ddd6bb232ffba3ae0a969c62) Merge branch 'main' into fix/link_preview - [`be061ee`](https://github.com/AppFlowy-IO/AppFlowy/commit/be061eea58658c7da9fdd4b7f07608662931eb82) Merge branch 'main' into fix/link_preview ### 📊 Changes **2 files changed** (+43 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart` (+16 -7) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart` (+27 -37) </details> ### 📄 Description Before: ![image](https://github.com/user-attachments/assets/55a587f4-f669-4662-af3c-d85db9ffbb96) After: <img width="541" alt="image" src="https://github.com/user-attachments/assets/278aa47f-d389-4260-8077-f70b86d46292" /> ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. ## Summary by Sourcery Improve the error and loading state UI for link previews, enhancing the visual presentation and handling of link preview information Enhancements: - Refactor link preview widget to handle different loading and error states more elegantly - Improve fallback display of link information by using URL host when title is not available Chores: - Simplify link preview widget logic for displaying loading, error, and content states --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:22:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8080
No description provided.