Skip to content
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

fix: updated link preview node attributes #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Omegaviv
Copy link

Part fix for #13

Updated linkPreview node with attributes (title, description) after it is fetched. This will be used for Issue #5193 fixing export markdown format.


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes/resolves 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.

@Xazin
Copy link
Collaborator

Xazin commented May 28, 2024

Looks good, we should add an option in AppFlowy itself to handle updating the meta information if there is a chance it's outdated. Eg. with GitHub previews and so forth.

@Xazin
Copy link
Collaborator

Xazin commented May 29, 2024

Analyzer found an issue

@Omegaviv
Copy link
Author

Omegaviv commented May 29, 2024

Looks good, we should add an option in AppFlowy itself to handle updating the meta information if there is a chance it's outdated. Eg. with GitHub previews and so forth.

last time you mentioned to add a reload option to refetch the metadata if user thinks it's outdated, so I think that will do the job.

Comment on lines 148 to +152
future = parser.start();

future.then(
(_) => WidgetsBinding.instance.addPostFrameCallback((_) => _updateNode()),
);
Copy link
Collaborator

@Xazin Xazin Jun 28, 2024

Choose a reason for hiding this comment

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

One minor thing, we shouldn't even need to call the parser if the attributes exist.

I will amend with a new commit.

The idea is to avoid a new request if the node already contains the information.

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.

2 participants