Shuffleboard component properties - are they really whitespace-insensitive?

The official documentation for ShuffleboardComponent states that the property names in withProperties(Map<String, Object>) are whitespace-insensitive:

Property names are case- and whitespace-insensitive (capitalization and spaces do not matter).

However, when I tried to set a component’s properties with all whitespace removed, it does not work. For example, this works:

Shuffleboard.getTab("TestTab").add("A Boolean", true)
        .withWidget(BuiltInWidgets.kBooleanBox)
        .withProperties(Map.of("color when true", "blue"));

but this doesn’t:

Shuffleboard.getTab("TestTab").add("A Boolean", true)
        .withWidget(BuiltInWidgets.kBooleanBox)
        .withProperties(Map.of("colorwhentrue", "blue"));

Am I misunderstanding what being “whitespace-insensitive” means, or is this a mistake in the documentation?

1 Like

It seems like I have misunderstood the meaning of “whitespace-insensitive”. This issue has cleared it up for me: https://github.com/wpilibsuite/allwpilib/issues/1837

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.