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

[Refactoring UI Code] WIP: Inline UI Definition instead of xaml compilation #2629

Merged
merged 48 commits into from
Aug 28, 2024

Conversation

MyDrift-user
Copy link
Contributor

@MyDrift-user MyDrift-user commented Aug 26, 2024

Pull Request (Requires #2630 to be merged first)

Note

This PR is a reopened version of #2465 and was made compatible with #2630 in work with @og-mrk.
For this PR to not cause Issues and work while testing, I suggest merging #2630 first.

inline ui build

Type of Change

  • Refactoring
  • UI/UX improvement

Description

Instead of compiling the jsons to xaml, we could take them and build the ui from a runspace with code.

  • automation will not have to wait on UI elements to load, because with a WIP PR it will be disabled on automation.

  • refractor ui generation that is already defined in json

  • general little UI improvements across winutil (positioning, margin, padding ..)

  • optimize search

  • fix ui of search

    • Before:
      image

      • search box has no space to tabs
      • text is to far to the bottom, meaning some characters are cut off
      • text goes behint the looking glass icon
    • After:
      image

      • text ends before icon
      • text is horizontally centered to make q,p,g .. look correctly
      • added a bit of margin to the left of the textbox
  • use proper theming everywhere

Impact:

  • creates possibility to easily add tweaks/preferences ... to the gui only if requirements are met (based on OS Version (Win10 / Win11 / < Buildnumber))
  • minimize winutil.ps1 filesize ~ -200kb
  • dynamic loading of content would support easily adding stuff later on, meaning we could
  • lowering compilation process time
  • unify differences in ui code (correct handling of theming in multiple places)

Plans for future:

  • if someone can make it or I somehow get how to do it put ui addition into runspace so multiple panels can load at the same time & ui can load faster.

Additional Information

This PR is a WIP, I made it very early in dev process to get feedback and let people know what i am up to because this will change a lot (logics of building the GUI)

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

@MyDrift-user MyDrift-user marked this pull request as ready for review August 26, 2024 22:21
@MyDrift-user MyDrift-user mentioned this pull request Aug 27, 2024
7 tasks
ChrisTitusTech pushed a commit that referenced this pull request Aug 28, 2024
… to make PR #2629 merge easily without any problem) (#2630)

* Remove leftover comment & update another comment in 'Get-TabXaml' Private Function

* Add new 'CloseIconFontSize' Theme Option

This's done to fix the Visual Issue of the Close Button being smaller than the Settings Button.

* Rename 'CheckBoxBulletDecoratorFontSize' to 'CheckBoxBulletDecoratorSize'

* Experiment with DPI Aware Units

* Remove extra whitespace characters in 'theme.json'

* Implement Default Theming - Add Error Checking & Quitting Early upon XML Related Failures - Simple Code Formatting here & there

* Replace Tabs with Spaces to follow the conventions

* Fix some logic issue in 'Set-WinUtilUITheme.ps1' Private Function - Rename 'Set-WinUtilUiTheme.ps1' -> 'Set-WinUtilUITheme.ps1'

* Change output info from 'Write-Warning' to 'Write-Host' to make sure it's displayed even in RunSpaces as well as PowerShell 5 Environments

* Revert back to default Unit of Measuring for WPF (1/96 in)

* Revert "Remove leftover comment & update another comment in 'Get-TabXaml' Private Function"

This reverts commit 368e598.

* Update 'themes.json' so the general changes will work with PR #2629

* Support the fallback to default theme (if it exists)

* Update 'Set-WinUtilUITheme' Documentation

---------

Co-authored-by: MyDrift <personal@mdiana.ch>
@ChrisTitusTech ChrisTitusTech merged commit c741e00 into ChrisTitusTech:main Aug 28, 2024
1 check passed
@ChrisTitusTech ChrisTitusTech added the skip-changelog Skip Change Logs label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip Change Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants