Azure / azure-iot-explorer

Cross-platform UI for interacting with devices attached to Azure IoT Hub. This tool is meant for learning and testing, not for production environment.
MIT License
223 stars 73 forks source link

[BUG] Plug and Play Command request informational fields do not change color in dark mode #638

Open domasgim opened 1 year ago

domasgim commented 1 year ago

Describe the bug Command tab does not display Command request schema (name, displayName and other parameters), just a blank field to enter information

An older IoT Explorer 15.2 version did not have this bug. The application was updated with the following commands

apt remove azure-iot-explorer
apt install ./azure-iot-explorer_0.15.9_amd64.deb

15.2 version was later installed back and the issue was resolved

To Reproduce Steps to reproduce the behavior:

  1. Define a PnP interface which contains a Command with request schema
    
    {
    "@context": "dtmi:dtdl:context;2",
    "@id": "dtmi:XXX:ipBlockInterface;1",
    "@type": "Interface",
    "displayName": "XXXIpBlockInterface",
    "contents": [
    {
      "@type": "Command",
      "name": "ip_block_push",
      "displayName": "Push to IP Block",
      "request": {
        "name": "request",
        "displayName": "Request",
        "schema": {
          "@type": "Object",
          "fields": [
            {
              "name": "ip",
              "displayName": "IP address",
              "schema": "string"
            },
            {
              "name": "destination_ip",
              "displayName": "Destination IP address",
              "schema": "string"
            },
            {
              "name": "port",
              "displayName": "Port address",
              "schema": "string"
            },
            {
              "name": "proto",
              "displayName": "Protocol",
              "schema": "string"
            }
          ]
        }
      }
    }
    ]
    }

2. Check IoT Plug and Play component Commands tab
4. See error (no command request name, display name rendered)

**Expected behavior**
Command request name, display name and other information should be shown. In this particular example the first field should show _Destination IP address_, the second field _Port address_

**Screenshots**
![Screenshot from 2023-09-04 13-18-13](https://github.com/Azure/azure-iot-explorer/assets/38397825/bf9c0440-b78e-4eb8-8460-09f8bdfc519a)  

![Screenshot from 2023-09-04 13-19-46](https://github.com/Azure/azure-iot-explorer/assets/38397825/8fe0a2da-c71b-4db3-bdd8-4aeb1360c087)  

![Screenshot from 2023-09-04 13-20-32](https://github.com/Azure/azure-iot-explorer/assets/38397825/4f04451c-d661-41ec-baca-9136b5217583)   

Version `15.2` without the bug
![Screenshot from 2023-09-04 13-29-58](https://github.com/Azure/azure-iot-explorer/assets/38397825/ff969ba9-9cfd-4e1b-ba35-d930ad619cd2)

**Desktop (please complete the following information):**
 - Ubuntu
 - 22.04.2 LTS
 - `azure-iot-explorer_0.15.9_amd64.deb` and `azure-iot-explorer_0.15.8_amd64.deb`
domasgim commented 3 months ago

Found the issue... using dark mode these fields do get their colors updated