Skip to content

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Dec 5, 2024

Describe Your Changes

This minor fix aims to hide Vulkan settings in case the system doesn’t detect a GPU.

Screenshots

CleanShot 2024-12-05 at 17 26 52@2x

Fixes Issues

Changes made

The code change is in the index.tsx file located at web/screens/Settings/Advanced/. Here's a summary of the modification:

  • Conditional Rendering Update: The condition for rendering a specific <div> component has been modified.
  • Old Condition: The component was rendered based on the condition !isMac && experimentalEnabled.
  • New Condition: The component will now be rendered if !isMac && gpuList.length && experimentalEnabled, meaning it adds a check that requires gpuList to have a non-zero length (i.e., it is not empty).

This change introduces a dependency on gpuList.length as an additional condition for rendering, which implies that the display of this section is contingent upon the existence of GPU entries in gpuList.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Barecheck - Code coverage report

Total: 69.26%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web/containers/Providers/Jotai.tsx17
web/screens/Settings/Advanced/index.tsx82, 91, 104, 122-125, 135, 139-141, 143, 191, 207-210, 217-218, 220, 224-225, 227, 229-230, 233, 280, 312-315, 321-323, 330-333, 372, 395, 404, 453, 534, 539
web/utils/messageRequestBuilder.ts38-39, 51-54, 56, 63, 68-69, 76, 81, 96-97, 102, 118-119, 123-124, 129, 132, 138-142, 144, 146, 148, 156, 159, 163

@louis-jan louis-jan merged commit 41e0d4c into dev Dec 5, 2024
18 checks passed
@louis-jan louis-jan deleted the chore/hide-vulkan-option-when-there-is-no-gpu-detected branch December 5, 2024 10:34
@github-actions github-actions bot added this to the v0.5.12 milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants