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

HOST file editor #20204

Closed
crutkas opened this issue Aug 31, 2022 · 9 comments
Closed

HOST file editor #20204

crutkas opened this issue Aug 31, 2022 · 9 comments
Assignees
Labels
Idea-New PowerToy Suggestion for a PowerToy Product-Hosts File Editor Refers to the Hosts file editor Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@crutkas
Copy link
Member

crutkas commented Aug 31, 2022

Description of the new feature / enhancement

At times, you need to alter the HOST file but it is a very manual process.

It can become very cumbersome and would be very powerful and useful to have a quick editor for the file

This idea came from @snickler

Extra suggestions that would be great for this (and could even come later):

@crutkas crutkas added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Idea-New PowerToy Suggestion for a PowerToy and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 31, 2022
@davidegiacometti
Copy link
Collaborator

Very cool!
I definitely would like to create a POC with basic functionality.
C# and WinUI3 are fine?

@snickler
Copy link
Collaborator

snickler commented Sep 1, 2022

Very cool! I definitely would like to create a POC with basic functionality. C# and WinUI3 are fine?

That sounds perfect to me.

@davidegiacometti
Copy link
Collaborator

POC

I have started working on the POC. I am focusing more on the service that read/write the hosts file than the UI 😄

@crutkas at the moment lines that aren't parsed as valid entry (including headers/comments) are removed when we write the file. Will be tricky to preserve them especially if sorting will be implemented. What do you think?

@niels9001 what do you suggest for the user inteface? What do you think about using a DataGrid here instead of a ListView?

@crutkas
Copy link
Member Author

crutkas commented Sep 4, 2022

Maybe we lead with PT generated comment and our UX had a direct editor for the top part we can’t parse?

@davidegiacometti
Copy link
Collaborator

davidegiacometti commented Sep 5, 2022

I like the idea for the header on top of the file but still a problem if users mix valid hosts entries and commented lines.

@niels9001
Copy link
Contributor

@niels9001 what do you suggest for the user inteface? What do you think about using a DataGrid here instead of a ListView?

Nice! I think a DataGrid could work, but only if we expect to do resizable columns and/or inline/direct editing (without the popup). (I personally like your current implementation btw :))!

@davidegiacometti
Copy link
Collaborator

Since I am not a big fan of DataGrid and I like to pipup let's try keep the ListView.
Thank you @niels9001 😃

@jerone
Copy link
Contributor

jerone commented Sep 6, 2022

I think a DataGrid could work [..]

Shameless plug: https://github.com/jerone/HostProfiles#readme (it's old, but going strong for 9 years. Maybe useful for idea's)

@davidegiacometti davidegiacometti self-assigned this Sep 22, 2022
@crutkas crutkas added the Status-In progress This issue or work-item is under development label Oct 3, 2022
@davidegiacometti davidegiacometti added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Oct 13, 2022
@Svk1190
Copy link

Svk1190 commented Oct 15, 2022

It would be nice to have hosts editor functionality similar to Hostsman, which allows us to subscribe to local or remote sources, such as Malware Domain List.

@davidegiacometti davidegiacometti added the Product-Hosts File Editor Refers to the Hosts file editor label Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-New PowerToy Suggestion for a PowerToy Product-Hosts File Editor Refers to the Hosts file editor Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

7 participants