[GH-ISSUE #343] Support new Setting for Appearance #344

Open
opened 2026-03-03 19:50:00 +03:00 by kerem · 0 comments
Owner

Originally created by @NghiaTranUIT on GitHub (Jan 4, 2024).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/343

Originally assigned to: @kics223w1 on GitHub.

Description

  • We should add 3 new settings to Proxyman Windows

Screenshot 2024-01-04 at 09 25 15

Tab Width

  • Able to select tab width (2 or 4). The default is 2. Use tabSize in Monaco Option
  • As soon as the value is changed, we should tell the Monaco Editor with the new Tab Width Setting (See GIF)
  • This setting is persisted to the next launch
  • Make sure: the "Restore Default" button will restore this setting to 2 too.
  • This setting applies for all Monaco editors: Body, Raw, Compose, Map Local, Breakpoint and Scripting, ...

https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/14b9f12b-b2fa-4d84-8e8a-56338a49d1f8

Show Invisible

  • Able to select "Show Invisibles". The default is OFF. Use renderWhitespace in Monaco Option
  • As soon as the value is changed, we should tell the Monaco Editor with the new Setting (See GIF)
  • This setting is persisted to the next launch
  • Make sure: the "Restore Default" button will restore this setting to OFF too.
  • This setting applies for all Monaco editors: Body, Raw, Compose, Map Local, Breakpoint and Scripting, ...

https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/7dc923c9-2ce9-4307-bafc-299f37d6b730

Monospace Font

  • Logic for Monospace Font. Apply to some TextField (See the screesnhot)
    CleanShot 2024-01-04 at 09 34 47@2x

  • It also applies to the same Subview (Header, Query, Form, Body, URL, Status View...) in the Compose and the Breakpoint

  • Support Monosapce Font for the Monaco Editor (Body, Raw, Map LOcal, Breakpoint and Scripting)

I'm not sure how to do it on Windows, but it's how we implement on macOS. We use SF Mono since it's natively supported when using WKWebView for rendering the Monaco Editor.

On Windows, please try to download the SF Mono and embed it into the app.

extension MonacoSetting {

    static func getFontFamily(isMonospacedFont: Bool) -> String {
        // safari can use system monospaced font
        // https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/
        return isMonospacedFont ? "'SF Mono', SFMono-Regular, ui-monospace, Menlo" : "Menlo"
    }
}

  • This setting is persisted to the next launch
  • Make sure: the "Restore Default" button will restore this setting to OFF too.
Originally created by @NghiaTranUIT on GitHub (Jan 4, 2024). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/343 Originally assigned to: @kics223w1 on GitHub. ## Description - We should add 3 new settings to Proxyman Windows ![Screenshot 2024-01-04 at 09 25 15](https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/ee79aa98-3da0-4349-9f6c-2d2406ba8a40) ## Tab Width - [x] Able to select tab width (2 or 4). The default is 2. Use `tabSize` in Monaco Option - [x] As soon as the value is changed, we should tell the Monaco Editor with the new Tab Width Setting (See GIF) - [x] This setting is persisted to the next launch - [x] Make sure: the "Restore Default" button will restore this setting to 2 too. - [x] This setting applies for all Monaco editors: Body, Raw, Compose, Map Local, Breakpoint and Scripting, ... https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/14b9f12b-b2fa-4d84-8e8a-56338a49d1f8 ## Show Invisible - [x] Able to select "Show Invisibles". The default is OFF. Use `renderWhitespace` in Monaco Option - [x] As soon as the value is changed, we should tell the Monaco Editor with the new Setting (See GIF) - [x] This setting is persisted to the next launch - [x] Make sure: the "Restore Default" button will restore this setting to OFF too. - [x] This setting applies for all Monaco editors: Body, Raw, Compose, Map Local, Breakpoint and Scripting, ... https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/7dc923c9-2ce9-4307-bafc-299f37d6b730 ## Monospace Font - [x] Logic for Monospace Font. Apply to some TextField (See the screesnhot) ![CleanShot 2024-01-04 at 09 34 47@2x](https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/ec3bcf25-8519-4326-9cf1-2ac4fd2ea785) - [x] It also applies to the same Subview (Header, Query, Form, Body, URL, Status View...) in the Compose and the Breakpoint - [x] Support Monosapce Font for the Monaco Editor (Body, Raw, Map LOcal, Breakpoint and Scripting) I'm not sure how to do it on Windows, but it's how we implement on macOS. We use SF Mono since it's natively supported when using WKWebView for rendering the Monaco Editor. On Windows, please try to download the SF Mono and embed it into the app. ```swift extension MonacoSetting { static func getFontFamily(isMonospacedFont: Bool) -> String { // safari can use system monospaced font // https://webkit.org/blog/10247/new-webkit-features-in-safari-13-1/ return isMonospacedFont ? "'SF Mono', SFMono-Regular, ui-monospace, Menlo" : "Menlo" } } ``` - [x] This setting is persisted to the next launch - [x] Make sure: the "Restore Default" button will restore this setting to OFF too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxyman-windows-linux#344
No description provided.