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

feat(web-ui): replace dropdown menus with checkboxes #3455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrogTheFrog
Copy link
Collaborator

@FrogTheFrog FrogTheFrog commented Dec 16, 2024

Description

Replaced the enabled/disabled dropdowns with checkboxes.
Except this one as it has custom dropdown values and it seems that it could possible have more values in the future:
image

Additionally fixed incorrectly labeled default values, some missing/mis-configured translation stuff and styling issues.

Screenshots

General

Before

image

After

image

Input

Before 1

image

After 1

image

Before 2

image

After 2

image

Before 3

image

After 3

image

Before 4

image

After 4

image

Audio/Video

Before

image

After

image

Network

Before

image

After

image

Nvidia

Before

image

After

image

Intel

Before

image

After

image

AMD

Before

image

After

image

VideoToolbox

Before

image

After

image

VA-API

Before

image

After

image

Apps

Before

image
image

After

image
image

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.88%. Comparing base (e00c458) to head (60d7c1c).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3455      +/-   ##
=========================================
- Coverage   11.17%   7.88%   -3.29%     
=========================================
  Files         100      90      -10     
  Lines       17310   15793    -1517     
  Branches     8069    7480     -589     
=========================================
- Hits         1934    1246     -688     
+ Misses      12671   12126     -545     
+ Partials     2705    2421     -284     
Flag Coverage Δ
Linux 8.43% <ø> (ø)
Windows 5.38% <ø> (ø)
macOS-13 ?
macOS-14 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 44 files with indirect coverage changes

@FrogTheFrog FrogTheFrog marked this pull request as ready for review December 16, 2024 21:39
Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to review the input accordion a little closer.

</select>
<div class="mb-3 form-check">
<label for="excludeGlobalPrep" class="form-label">{{ $t('apps.global_prep_name') }}<div class="mt-0 form-text">{{ $t('_common.enabled_def_cbox') }}</div></label>
<input type="checkbox" class="form-check-input" id="excludeGlobalPrep" v-model="editForm['exclude-global-prep-cmd']" true-value="false" false-value="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be renamed to includeGlobalPrep to simplify the true/false values and avoid confusion. Since the default is enabled/true it doesn't seem to make sense as is.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably should, however this involves more work than just replacing dropdown list with checkbox, which I would like not to do here.

src_assets/common/assets/web/apps.html Outdated Show resolved Hide resolved
src_assets/common/assets/web/configs/tabs/Advanced.vue Outdated Show resolved Hide resolved
</select>
<div class="mb-3 form-check">
<label for="install_steam_audio_drivers" class="form-label">{{ $t('config.install_steam_audio_drivers') }}<div class="mt-0 form-text">{{ $t('_common.enabled_def_cbox') }}</div></label>
<input type="checkbox" class="form-check-input" id="install_steam_audio_drivers" v-model="config.install_steam_audio_drivers" true-value="enabled" false-value="disabled" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<input type="checkbox" class="form-check-input" id="install_steam_audio_drivers" v-model="config.install_steam_audio_drivers" true-value="enabled" false-value="disabled" />
<input
type="checkbox"
class="form-check-input"
id="install_steam_audio_drivers"
v-model="config.install_steam_audio_drivers"
true-value="enabled"
false-value="disabled"
/>

When the line is too long can we do this?

Also, do the true/false values account for all the possible options in the config? Ideally in the cpp we would translate enabled/disabled to boolean before providing it to the web-ui.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the line is too long can we do this?

I'll try to come up with something better.

Also, do the true/false values account for all the possible options in the config? Ideally in the cpp we would translate enabled/disabled to boolean before providing it to the web-ui.

As you have said, only 1 value pair will be accounted for. In case none of the values match, it defaults to false. Again, this requires more refactoring due to separate parsing in cpp/vue. I do not want to do this here.

@FrogTheFrog FrogTheFrog force-pushed the checkbox-replacement branch 2 times, most recently from 0274081 to 60d7c1c Compare December 23, 2024 11:27
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants