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

[Bug] Link to a local file does not work correctly #5146

Closed
He-Zu opened this issue Apr 16, 2024 · 5 comments
Closed

[Bug] Link to a local file does not work correctly #5146

He-Zu opened this issue Apr 16, 2024 · 5 comments
Labels
good first issue for devs for the community members to claim improvements improvements on an existing feature Q4 24

Comments

@He-Zu
Copy link

He-Zu commented Apr 16, 2024

Bug Description

entering a link to a file by hand works e.g.
4

I can open the file with the link

1

but if I only enter text and then create a link via the menu and enter the path to the file, an error "broken link" appears

2

it works with a weblink
5

How to Reproduce

see pictures

Expected Behavior

i think that both ways of creating a link should work

Operating System

linux

AppFlowy Version(s)

0.5.4

Screenshots

No response

Additional Context

No response

@Xazin
Copy link
Collaborator

Xazin commented Apr 16, 2024

I believe the scheme of http | https is currently hardcoded.

We should be able to allow IPv4/6, SSH, (S)FTTP, SMTP, and other protocols such as the File protocol that is mentioned in this issue.

Some other protocols that could be taken on as well: mailto, vnc, and imap.

@Xazin Xazin added good first issue for devs for the community members to claim improvements improvements on an existing feature labels Jun 9, 2024
@SillyCoon
Copy link

Hi! Can I work on this issue?
I found the relevant place in appflowy-editor, seems like current isUrl validator understands only http, https and ftp
https://github.com/AppFlowy-IO/appflowy-editor/blob/a64a5165e79bd2424e594b793843a7158e7d4fb4/lib/src/editor/toolbar/desktop/items/link/link_menu.dart#L119

@Xazin
Copy link
Collaborator

Xazin commented Sep 1, 2024

Hi! Can I work on this issue? I found the relevant place in appflowy-editor, seems like current isUrl validator understands only http, https and ftp https://github.com/AppFlowy-IO/appflowy-editor/blob/a64a5165e79bd2424e594b793843a7158e7d4fb4/lib/src/editor/toolbar/desktop/items/link/link_menu.dart#L119

I'm not too sure what the desired behavior is, if we should allow eg. file protocol for collaborative workspaces.

It could lead to misleading information where one user believe they have access to a file but in reality, it exists on the local of someone elses device, meaning if they follow the link they won't be able to find what they're looking for.

Anyhow, feel free to open a PR, and we can take a look.

@SillyCoon
Copy link

@Xazin hi! Could you please take a look at PR or point out some direction I could work on? Thank you!

@Xazin
Copy link
Collaborator

Xazin commented Oct 8, 2024

Closing as completed 👍

@Xazin Xazin closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue for devs for the community members to claim improvements improvements on an existing feature Q4 24
Projects
None yet
Development

No branches or pull requests

4 participants