Consider consolidating UI helpers into a Microsoft.Terminal.UI namespace/dll #19593

Open
opened 2026-01-31 06:48:14 +00:00 by claunia · 2 comments
Owner

Originally created by @DHowett on GitHub (Mar 29, 2023).

Originally assigned to: @DHowett on GitHub.

work branch https://github.com/microsoft/terminal/tree/dev/duhowett/m.t.ui

We have some UI helpers flung all about the Terminal code, including in Terminal.Settings.Model, that could be consolidated.

  • TerminalApp
    • EmptyStringVisibilityConverter
  • TerminalSettingsEditor
    • Converters
      • Including a duplicate EmptyStringVisibilityConverter equivalent; deduplicate these!
  • TerminalSettingsModel
    • IconPathConverter

I originally authored it to contain a resource string markup extension as detailed in an APS blog post. That'll help us get rid of all the places where we load resource strings in code because they couldn't be bound in XAML.

Originally created by @DHowett on GitHub (Mar 29, 2023). Originally assigned to: @DHowett on GitHub. _work branch https://github.com/microsoft/terminal/tree/dev/duhowett/m.t.ui_ We have some UI helpers flung all about the Terminal code, including in _Terminal.Settings.Model_, that could be consolidated. - TerminalApp - `EmptyStringVisibilityConverter` - TerminalSettingsEditor - `Converters` - Including a duplicate `EmptyStringVisibilityConverter` equivalent; deduplicate these! - TerminalSettingsModel - `IconPathConverter` I originally authored it to contain a resource string markup extension as detailed in [an APS blog post](https://devblogs.microsoft.com/ifdef-windows/use-a-custom-resource-markup-extension-to-succeed-at-ui-string-globalization/). That'll help us get rid of all the places where we load resource strings in code because they couldn't be bound in XAML.
claunia added the Issue-TaskProduct-TerminalArea-CodeHealth labels 2026-01-31 06:48:14 +00:00
Author
Owner

@DHowett commented on GitHub (Mar 29, 2023):

We could also park some shared UI components there, which we can finally use from TSE and TA without copying them.

@DHowett commented on GitHub (Mar 29, 2023): We could also park some shared UI components there, which we can finally use from TSE and TA without _copying them._
Author
Owner

@DHowett commented on GitHub (Mar 29, 2023):

And perhaps IDirectKeyListener, if we keep M.T.UI top-clean.

@DHowett commented on GitHub (Mar 29, 2023): And perhaps `IDirectKeyListener`, if we keep M.T.UI top-clean.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19593