Skip to content

Conversation

@SiboVG
Copy link
Member

@SiboVG SiboVG commented Feb 14, 2023

This PR fixes #2055. Entering {manufacturers} in the configuration name field now replaces that text with the motor manufacturers.

I also noticed that the configurations in the flight configuration combo box did not use the proper RocketDescriptor substitutor. In layman terms, this means that the text in the flight configuration combo box was different from that seen in the motors configurations table. This was only noticeable when there were no motors in the configuration. In that case, the flight configuration displayed No motors, while the motors configuration table displayed [No motors] (with brackets).

This PR now ensures that the configurations in the flight configuration combo box are properly formatted. The only noticeable difference with the current behavior is that a "No motors" configuration is now displayed as [No motors] instead of No motors.

Screen.Recording.2023-02-14.at.13.51.38.mp4

I also added an explanation of the substitution tags in the rename config dialog:
image

@neilweinstock
Copy link
Contributor

Cool. Did anything like this exist before? If so I had no idea (and, most likely, neither does anyone else).

@SiboVG
Copy link
Member Author

SiboVG commented Feb 14, 2023

Cool. Did anything like this exist before? If so I had no idea (and, most likely, neither does anyone else).

The {motors} tag always existed. If you edit the config name in OR 22.02, you can see the tag.

@hcraigmiller
Copy link
Collaborator

hcraigmiller commented Feb 14, 2023

Functions as expected, no anomalous behavior found.

Although it would be nice if the display could be [A8-5 Estes; B6-0 Estes; B6-0 Estes] instead of [A8-5; B6-0; B6-0 Estes; Estes; Estes]

OR Build: 1552
Microsoft Windows 11 Pro; 10.0.22621 Build 22621.1105; Windows Feature Experience Pack 1000.22638.1000.0
Java(TM) SE Runtime Environment 18.9 (build 11.0.18+9-LTS-195)

@SiboVG
Copy link
Member Author

SiboVG commented Feb 21, 2023

Although it would be nice if the display could be [A8-5 Estes; B6-0 Estes; B6-0 Estes] instead of [A8-5; B6-0; B6-0 Estes; Estes; Estes]

That would require a new tag IMO, like {motors-manufacturers} or something similar. Ideally you would be able to type e.g. {motors manufacturers}, which would display as [A8-5 Estes; B6-0 Estes; B6-0 Estes], or {motors | manufacturers} which would be [A8-5 | Estes; B6-0 | Estes; B6-0 | Estes]. So you could choose the separator between the motor and manufacturer. However, that would be a bit more complex to implement. I would make that a new feature request.

@neilweinstock
Copy link
Contributor

Although it would be nice if the display could be [A8-5 Estes; B6-0 Estes; B6-0 Estes] instead of [A8-5; B6-0; B6-0 Estes; Estes; Estes]

I would tend to think that this is the desired behavior. Not sure if the Discord user who made the initial request specified?

@SiboVG
Copy link
Member Author

SiboVG commented Feb 22, 2023

Although it would be nice if the display could be [A8-5 Estes; B6-0 Estes; B6-0 Estes] instead of [A8-5; B6-0; B6-0 Estes; Estes; Estes]

I would tend to think that this is the desired behavior. Not sure if the Discord user who made the initial request specified?

He specified it as is implemented in this PR.

@neilweinstock
Copy link
Contributor

neilweinstock commented Feb 22, 2023

OK, fair enough, although I wonder how many other people will actually want it to work this way (doesn't make a great deal of sense to me).

@JoePfeiffer
Copy link
Contributor

OK, fair enough, although I wonder how many other people will actually want it to work this way (doesn't make a great deal of sense to me).

Agreed. Yes, I can see this is what was requested, but @neilweinstock 's suggestion would make more sense to me as well.

@SiboVG
Copy link
Member Author

SiboVG commented Feb 23, 2023

Okay, I changed the substitutor to a generalized one, where you can also use a combination of motors and manufacturers, as described in #2068.

Substitution of [{motors manufacturers}] in "A three-staged rocket" example:
image

New rename dialog:
image

@SiboVG SiboVG linked an issue Feb 23, 2023 that may be closed by this pull request
@neilweinstock
Copy link
Contributor

Now we're talking. :)

I would suggest that the example for the combination should be {motors manufacturers} which would yield something like "Aerotech M1350-0" which is (I think) the most likely desired output.

@SiboVG
Copy link
Member Author

SiboVG commented Feb 23, 2023

Now we're talking. :)

I would suggest that the example for the combination should be {motors manufacturers} which would yield something like "Aerotech M1350-0" which is (I think) the most likely desired output.

Okay, I'll change it. I was trying to demonstrate that you can choose the separator between the tags. Should I add an extra info text, e.g. "A combination of the above can be used. You may choose the separator between the tags."?
image

@neilweinstock
Copy link
Contributor

More show, less tell is generally preferable. In this case, it is a feature that will be used by an incredibly small group of people; the number who care about separators is an even smaller subset. I wouldn't worry about it.

@neilweinstock
Copy link
Contributor

I apologize but I fumbled my original suggestion... I meant to say {manufacturers motors} which would yield "Estes D12".

Not sure why the substitutors are plural but not worth worrying about.

@SiboVG
Copy link
Member Author

SiboVG commented Feb 23, 2023

I apologize but I fumbled my original suggestion... I meant to say {manufacturers motors} which would yield "Estes D12".

Not sure why the substitutors are plural but not worth worrying about.

Sorry, didn't read your message properly, updated now. I decided on the plural form because motors is also plural. I could do manufacturer and motors, but changing motors to motor will break compatibility with all previous OR designs, those will then display [{motors}] instead of the actual motor list. So, idk, you wanna keep manufacturers or change to manufacturer?

@neilweinstock
Copy link
Contributor

If we're stuck with motors then make it manufacturers for consistency. In a perfect world it would be motor and manufacturer. Oh well!

@hcraigmiller
Copy link
Collaborator

Very nice.
Functions as expected, no anomalous behavior found.

OR Build: 1564
Microsoft Windows 11 Pro; 10.0.22621 Build 22621.1105; Windows Feature Experience Pack 1000.22638.1000.0
Java(TM) SE Runtime Environment 18.9 (build 11.0.18+9-LTS-195)

@SiboVG SiboVG merged commit 2c22015 into openrocket:unstable Feb 24, 2023
@SiboVG SiboVG deleted the issue-2055 branch February 24, 2023 21:12
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.

[Feature Request] Change motor manufacturers substitutor display [Feature Request] Add manufacturers wildcard option to configuration naming

4 participants