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

Support additional clone schemes #21121

Closed
rdwz opened this issue Sep 9, 2022 · 14 comments · Fixed by #29320
Closed

Support additional clone schemes #21121

rdwz opened this issue Sep 9, 2022 · 14 comments · Fixed by #29320
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@rdwz
Copy link

rdwz commented Sep 9, 2022

Feature Description

the custom handler for VSCodium is
vscodium://vscode.git/clone?url=

Screenshots

@rdwz rdwz added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Sep 9, 2022
@rdwz rdwz changed the title Add clone in VSCodium button Add "Clone in VS Codium"-button Sep 9, 2022
@jolheiser
Copy link
Member

This makes me think we should somehow make this configurable.

One option is to maintain a custom template, but understandably that's less than ideal for this.
Another option is to somehow make this a type of config setting that's dynamic.

Nothing against vscodium, if I'm honest I also (personal opinion) don't like that we've already added a vscode link to begin with.

Perhaps we should discuss how to make this generic before we end up with another "adding webhooks for every service" problem. 😅

@6543
Copy link
Member

6543 commented Sep 9, 2022

User preverences ...

@silverwind
Copy link
Member

silverwind commented Sep 9, 2022

Does VSCodium not support vscode:// urls? I think it'd be better to start there. Maybe there is also a editor-agnostic scheme we could use.

@jolheiser
Copy link
Member

jolheiser commented Sep 9, 2022

I think we could

  1. Add another custom-only template like how we do for header links, etc. (to limit breakage) or;
  2. Somehow make this a dynamic configuration option similar to external renderers

@silverwind
Copy link
Member

silverwind commented Sep 9, 2022

No custom templates please, they suck 😉. Maybe with config:

repo.ADDITIONAL_CLONE_SCHEMES = vscodium://,sublime://

Still, generall I think the issue is on the editors, not us.

@jolheiser
Copy link
Member

jolheiser commented Sep 9, 2022

Still, generally I think the issue is on the editors, not us.

Probably true, but a custom protocol probably lets them do other things that's specific to each editor (maybe?)
I think a config option would work fine with a little forethought

@silverwind
Copy link
Member

silverwind commented Sep 9, 2022

Problem with the config approach is user can not set icon, but that may be acceptable.

@silverwind
Copy link
Member

Well I suppose one could have a JSON value in the config option, but I don't think we do those yet.

repo.ADDITIONAL_CLONE_SCHEMES = '[{"scheme": "vscodium://", "icon": "<svg/>"}]'

@jolheiser
Copy link
Member

Could have a config option for local image or web image.
In terms of "security", since it would be config-level, it would be up to the admin?

@silverwind
Copy link
Member

Would keep it simple, just SVG string support. Security should be fine as it's in the config, only admin-accessible.

@jolheiser
Copy link
Member

Would keep it simple, just SVG string support.

For a web image, technically Gitea could even host the image in its custom dir, which would still allow users to serve it themselves without relying on another service.
And I think might be nicer than storing JSON in an ini config?

@CypherpunkSamurai
Copy link
Contributor

CypherpunkSamurai commented Sep 10, 2022

I think adding more than editor svg could be confusing later on. We can simply skip it and use a standard icon for code editor urls, and just have the text beside it. Url Scheme can be Configurable, the frontend would just loop through the json and add new divs with links.

image

@goyalyashpal
Copy link

hey @author @redwerkz can u add a test link in the description (first comment) of this issue? e.g.:

"Repositories for trial on gitea are at: https://try.gitea.io/"

@rdwz rdwz changed the title Add "Clone in VS Codium"-button ~~Add "Clone in VS Codium"-button~~ Jan 10, 2023
@rdwz rdwz changed the title ~~Add "Clone in VS Codium"-button~~ ☠️ Jan 10, 2023
@lunny
Copy link
Member

lunny commented Feb 11, 2023

Please don't talk about your opinion of community governance in a special issue.

@wolfogre wolfogre changed the title ☠️ Add "Clone in VS Codium"-button Feb 11, 2023
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2023
@silverwind silverwind changed the title Add "Clone in VS Codium"-button Support additional clone schemes Mar 18, 2023
wxiaoguang added a commit that referenced this issue Feb 24, 2024
Users could customize the "clone" menu with their own application URLs on the admin panel.

Replace #22378
Close #21121
Close #22149
@lunny lunny added this to the 1.22.0 milestone Feb 24, 2024
@lunny lunny added type/changelog Adds the changelog for a new Gitea version and removed type/changelog Adds the changelog for a new Gitea version labels Feb 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
7 participants