Feature: DNS Lookup - Input server #3261
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Related issue(s)
Copilot generated summary
Provide a Copilot generated summary of the changes in this pull request.
Copilot summary
This pull request refactors the DNS server selection logic in the DNS Lookup feature, improving usability and code maintainability. The main changes include replacing the custom value converter with a more direct approach to displaying DNS server names, supporting editable ComboBox input for custom DNS server entries, and updating model and viewmodel logic for clearer separation of concerns and easier custom profile handling.
UI and Usability Improvements
DNSLookupView.xamlis now editable, allowing users to enter custom DNS server IPs directly. The selection logic was updated to bind to a newSelectedListProfileproperty and support custom input viaDNSServerQuickInput, removing the need for a value converter. [1] [2]ViewModel and Data Handling
DNSLookupViewModelnow distinguishes between selected list profiles and direct text input. When a user types an IP address, a custom profile is created and used for DNS queries. TheDNSServerproperty is now private set, and a newSelectedListProfileproperty manages selection from the ComboBox. [1] [2]Model and Data Structure Updates
DNSServerConnectionInfoProfileconstructor now sets a default name for the Windows DNS profile, and theServersproperty uses collection initializers for brevity and clarity. [1] [2] [3]nullinstead of a new profile instance, preventing unintended default selections and improving state management. [1] [2]Codebase Simplification
DNSServerConnectionInfoProfileToStringvalue converter was removed as its functionality is now handled by the model'sToString()override and direct binding.References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
To-Do
ip:port; ip:port)Contributing
By submitting this pull request, I confirm the following: