FluentHub icon indicating copy to clipboard operation
FluentHub copied to clipboard

Feature: Add edit code with VSCode button to repository code page

Open dovatti opened this issue 2 years ago • 15 comments

Before you start...

  • [X] Have you checked if a similar feature request has already been reported?

Description

Simplest idea: integrate a magnet button to open system default text-editor (Visual Studio Code, Atom, Sublime Text, etc etc).

Alternative solutions

In addition to that, we could integrate vscode.dev inside a chromium instance so final user can code directly inside FluentHub: for example, if I just had to add a link to README.md of an awesome-list, I'll click on "Edit in FluentHub" (or something similar), code and pull.

I can help you for both ideas.

Relevant Assets

No response

dovatti avatar Jun 21 '22 07:06 dovatti

Want to add "Edit in FluentHub" like vscode.dev in your browser and create something similar to text editor into FluentHub?

0x5bfa avatar Jun 21 '22 08:06 0x5bfa

If so, it's a good idea. but the goal up to version v0.5 is to make all queries work correctly and with as few bugs as possible. The goal up to v0.9 is to make all mutations work correctly and with as few bugs as possible. We will also do a final check to migrate all Alpha phase features to Stable by v1.

This feature may be considered after v0.5. For now, we have no plans to create a feature to change GitHub data (called Mutation) such as editing user profile and editing a blob.

0x5bfa avatar Jun 21 '22 08:06 0x5bfa

I was talking about adding an integrated instance of vscode.dev inside FluentHub. If you wants, I could develop it, pull a request and wait until v1. Meanwhile waiting I could help on bug fixes.

dovatti avatar Jun 21 '22 09:06 dovatti

Just don't modify GitHub data? I don't know what “integrated instance” was.

0x5bfa avatar Jun 21 '22 10:06 0x5bfa

Just don't modify GitHub data? I don't know what “integrated instance” was.

I think you should read this, it is ofc more specific than me. For integrated instance I mean I would like to have a page like vscode.dev inside FluentHub. I think we're talking about the same thing but with different synonyms. 😁

dovatti avatar Jun 21 '22 11:06 dovatti

Ah, when clicking the edit button, the app opens WebView2 windows with vscode.dev?

0x5bfa avatar Jun 21 '22 11:06 0x5bfa

Yep. Or with installed text-editor inside OS where is running FluentHub. i.e: I've got Windows 11 and Sublime Text, I can choose between integrated editor (via WebView2 with vscode.dev etc, etc...) or opening in a new window inside my installed editor (like an "Open in" context menu). The last part is easier than first to implement. It simply link via an editor.JSON file (or whatever name we want to give it) installed text-editors.

dovatti avatar Jun 21 '22 11:06 dovatti

Got it. It is a good idea! if you can open a PR, please do.

you think it is something like this, right?

image

0x5bfa avatar Jun 21 '22 12:06 0x5bfa

Exactly! If is okay for you, I'll work on it soon!

dovatti avatar Jun 21 '22 13:06 dovatti

Wait just to make things clear.. @onein528 you want to add WebView2 with github.dev page to FH?

Lamparter avatar Jul 03 '22 08:07 Lamparter

No this feature request is not like that. just open github.dev with browser.

0x5bfa avatar Jul 03 '22 08:07 0x5bfa

No this feature request is not like that. just open github.dev with browser.

oh. Can't we use WebView? @onein528

Lamparter avatar Jul 03 '22 08:07 Lamparter

can use. but he not meant to. @dovatti How about?

0x5bfa avatar Jul 03 '22 08:07 0x5bfa

Not yet. I think this will take some time to start working on if alone. @DeveloperWOW64 if you would like to implement that would be great, I would help in my free time. I do work every day so I do not have too much spare time.

dovatti avatar Jul 03 '22 18:07 dovatti

@onein528 @DeveloperWOW64 I've got some news: I've been coding according to these guide and essentially got code working. Currently could be possible to get an "Open in VSCode.dev" button and open the web page inside FluentHub. But I was thinking: does exist an "official" pattern/model to achieve that? I think more than one person in UWP community would like to integrate WebView2 already wrapped with it's own UI. If so we could use this coding pattern instead of my code monster 😆 Otherwise, I've been already thinking about a Fluent wrapper for VSCode UI; but I do not think would be perfect as I want.

I'll release soon all the project folder with schemas, graphs and resources, and obviously with code working for WebView at least. Don't know when because I've been working and studying very hard this months 👍🏻

dovatti avatar Jul 19 '22 05:07 dovatti