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

Onboarding: "when" statements with isLinux / isWindows / etc not working for configuration items #4141

Closed
cdrage opened this issue Sep 28, 2023 · 1 comment · Fixed by #4159
Assignees
Labels
area/onboarding kind/bug 🐞 Something isn't working

Comments

@cdrage
Copy link
Contributor

cdrage commented Sep 28, 2023

Bug description

When working with configuration items and isLinux / isWindows has been added, it does not appear correctly.

See:

"when": "isMac || isLinux"

Operating system

mac m1

Installation Method

None

Version

1.4.0

Steps to reproduce

Change the package.json to something like this:

        "podman.setting.dockerCompatibility": {
          "type": "boolean",
          "default": false,
          "description": "Docker compatibility mode is a feature that allows you to use Podman as a drop-in replacement for Docker-compatible CLI tools. Podman will automatically emulate a Docker API socket connection (typically) to /var/run/docker.sock. NOTE: This requires administrative privileges.",
          "when": "isMac || isLinux"
        }

isMac and isLinux` is not working correctly.

Relevant log output

No response

Additional context

No response

@cdrage cdrage added the kind/bug 🐞 Something isn't working label Sep 28, 2023
@cdrage cdrage self-assigned this Sep 28, 2023
@cdrage
Copy link
Contributor Author

cdrage commented Sep 28, 2023

Will take a bit longer to implement than just a few hours, just realized that https://github.com/containers/podman-desktop/blob/1b311fe0f1a0354b78f3b70841dcbb01d1568840/packages/renderer/src/lib/preferences/PreferencesRenderingItem.svelte we don't actually have when clauses implemented.

So will need to subscribe to context / create tests / add the feature.

cdrage added a commit to cdrage/podman-desktop that referenced this issue Sep 29, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Sep 29, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Sep 29, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Sep 29, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Sep 29, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Oct 2, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit to cdrage/podman-desktop that referenced this issue Oct 2, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes containers#4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
cdrage added a commit that referenced this issue Oct 3, 2023
### What does this PR do?

Adds the ability to use "when" statements for setting properties.

For example, if you want to only show certain settings for certain
operating systems by using `"when": "isLinux"`.

### Screenshot/screencast of this PR

### What issues does this PR fix or reference?

Closes #4141

### How to test this PR?

Edit `extensions/podman/package.json` configuration for binary path to:

```json
        "podman.binary.path": {
          "type": "string",
          "format": "file",
          "default": "",
          "description": "Custom path to Podman binary (Default is blank)",
          "when": "isLinux"
        },
```

When you check your preferences, it will now only show the binary path
if you are running Linux.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/onboarding kind/bug 🐞 Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants