start-os: [feat]: List of objects not displaying properly in config

Prerequisites

  • I have searched for existing issues that already report this problem, without success.

EmbassyOS Version

72cb451f5a4be02ad651e2c0bf4973dd8f36f9b1

Device

Laptop/Desktop

Device OS

Linux

Device OS Version

Ubuntu 20.04

Browser

Firefox

Browser Version

98.0.1

Current Behavior

This config spec:

        addnode:
          name: Add Nodes
          description: Add addresses of nodes to connect to.
          type: list
          subtype: object
          range: "[0,*)"
          default: []
          spec:
            type: object
            nullable: false
            name: "Peer"
            description: "Peer to connect to"
            spec:
              hostname:
                type: string
                nullable: false
                name: "Hostname"
                description: "Domain or IP address of bitcoin peer"
                masked: true
                pattern: "(^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$)|((^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$)|(^[a-z2-7]{16}\\.onion$)|(^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$))"
                pattern-description: Must be either a domain name, or an IPv4 or IPv6 address. Do not include protocol scheme (eg 'http://') or port.
              port:
                type: number
                # nullable: false
                nullable: true
                name: "Port"
                description: "Port that peer is listening on for inbound p2p connections"
                # default: 8333
                range: "[0,65535]"
                integral: true

Renders like this:

Screenshot from 2022-03-18 16-21-05

Expected Behavior

The user should be able to see the port field. The port is inaccessible no matter what I do.

Steps to Reproduce

  1. Package s9pk with config spec as above
  2. Go to configure it
  3. Cannot access second field in object, when object is nested inside a list.

Anything else?

This is blocking https://github.com/Start9Labs/bitcoind-wrapper/issues/53

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

So this is definitely an improvement, but still not ideal. Now when I add a new node, it gives me this:

Screen Shot 2022-06-24 at 2 51 56 PM

Then if I click to expand “Entry 1”, the new fields are displayed: Screen Shot 2022-06-24 at 2 55 49 PM

My question is: why require the user to expand “Entry 1”? They’ve just added a new entry; this makes it feel like they’ve done something wrong. Ideally the first (required) field in the new entry (or just the first field with an error, which would be the same in this case) should be visible and selected, that way the user can quickly understand what they’re supposed to do. The way it currently is, they have to stare at the screen for a moment and wonder why everything turned red, then just start clicking things until they see what the issue is.