Skip to content

Provide consistent field names across parameters#24

Open
sammysmallman wants to merge 1 commit into
ssilverman:masterfrom
sammysmallman:issue-23
Open

Provide consistent field names across parameters#24
sammysmallman wants to merge 1 commit into
ssilverman:masterfrom
sammysmallman:issue-23

Conversation

@sammysmallman

Copy link
Copy Markdown
Contributor

Closes #23
Signed-off-by: Sam Smallman srsmallman@mac.com

Signed-off-by: Sam Smallman <srsmallman@mac.com>

@ssilverman ssilverman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text follows the E1.20 specification, so I'm hesitant to change this.

@ssilverman ssilverman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text follows the E1.20 specification, so I'm hesitant to change this.

@ssilverman ssilverman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text follows the E1.20 specification, so I'm hesitant to change this.

@ssilverman

Copy link
Copy Markdown
Owner

Egads, I can't figure out how to make an "unresolved conversation." Sorry about the noise.

@ssilverman ssilverman force-pushed the master branch 2 times, most recently from 3e6d0c1 to ac42033 Compare August 23, 2022 15:18
@peternewman

Copy link
Copy Markdown
Contributor

Egads, I can't figure out how to make an "unresolved conversation." Sorry about the noise.

I think you're talking about a line comment:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request

@peternewman peternewman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some improvements and potential solutions

},
{
"name": "current_personality",
"name": "personality",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a field name and an optional field label maybe?

OLA currently uses one field for both (with some automagic conversion to the other).

I can certainly see the argument for flagging the piece of information the same if it's present in multiple PIDs. But if this was called personality and we also had personality count in this PID it's probably not as user friendly, especially given it's actually the personality number not a name or anything.

@sammysmallman sammysmallman Sep 1, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically speaking they are not names or labels. They are unique keys that can be used for localisation and hopefully to distinguish matching fields across parameters. The value of this key is shown only to the user as a last resort, you would first check whether you have a localised string using the value of this key, if not you would check whether there is a "displayName" key in the schema and present that, before using the "name" keys value and then arguably I would probably just use the PID as it would look better...

{ "name": "personality_count", "type": "uint8" },
{
"name": "dmx_start_address",
"name": "dmx_address",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real excuse here though, apart from none of us spotted and flagged it in the recent review. Although I'd argue the change is being made the wrong way round, DMX start address is more descriptive and unambiguous to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree I think it should be dmx_start_address matching the name of the pid 240. Same goes for the fields name within that parameters schema. I also think wherever personality is used it should be dmx_personality matching that parameters name

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.

Consistent Field Names

3 participants