feat: fetch url meta data on creating row
On submitting a new row in board view, if the setting is enabled and the text is a URL fetch url metadata and fill the row with it.
closes #5963
Feature Preview
https://github.com/user-attachments/assets/26ffc1c1-e009-4079-be28-a1c92c3a1861
PR Checklist
- [x] My code adheres to AppFlowy's Conventions
- [x] 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.
🥷 Ninja i18n – 🛎️ Translations need to be updated
Project /project.inlang
| lint rule | new reports | level | link |
|---|---|---|---|
| Missing translation | 81 | warning | contribute (via Fink 🐦) |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.26%. Comparing base (
7ecf213) to head (347d0fc). Report is 30 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6130 +/- ##
==========================================
+ Coverage 74.41% 75.26% +0.84%
==========================================
Files 245 232 -13
Lines 6566 6828 +262
Branches 1057 964 -93
==========================================
+ Hits 4886 5139 +253
+ Misses 1628 1626 -2
- Partials 52 63 +11
| Flag | Coverage Δ | |
|---|---|---|
| appflowy_web_app | 75.26% <ø> (+0.84%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
At first, I wanted to also enable this feature in grid view on filling URL field, but filling other fields inside EditableURLCell isn't that straightforward. So I put it aside for maybe in the future.
The next step can be adding the description and image of URL metadata in the row page.
After inputting the URL, there's a noticeable delay before the parsed URL is inserted (I understand this is due to fetching metadata). This lag affects the user experience. We should consider a better way to handle this. For example:
- insert the raw URL text immediately.
- create a new item with the raw URL text.
- update the cell content with parsed metadata once it's available.
@zoli What do you think?
Screenshots:
@LucasXu0 By creating a new item do you mean sending CreateRow event to the backend? I think creating a pseudo card while fetching the URL is better, Maybe with less opacity so the user knows it's not final yet.
What should the behavior be when there are more than one URL fields?
What should the behavior be when there are more than one URL fields?
I can change the settings to choose a specific field, for now, I thought selecting the first URL field type would be good enough.
@richardshiue will choosing specific field in settings and pseudo card while fetching the URL be enough for this?
Hi @zoli , please add bloc tests or integration test.
@appflowy, Added both bloc and integration tests. @richardshiue, Enabled choosing the field (URL type) to fill the URL. @LucasXu0, Added loading state.
@richardshiue What do you think about it? I'm thinking that the toggle function should be an option for the URL field type, not in the global settings of the database.