Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-9884 - support invisible aliases #4783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Feb 7, 2025

Updates the String method of AliasStringFlag to hide aliases, and ensures that AliasStringFlag is used consistently for organization, location, machine, and part.

Note: I opted to update AliasStringFlag rather than creating a new InvisibleAliasStringFlag type. My reasoning was 1) avoiding excessive type proliferation is a good thing, and 2) the only places AliasStringFlag was being used was for org/location/machine/part, so after this PR it wasn't actually being used anywhere. However, if in the future we have a string flag that is required and has aliases that we don't want to hide in the help text, we may have to revisit. Happy to discuss the decision here if there's any pushback.

Tested locally to confirm the new help text, and to confirm that despite not appearing in help text, the aliases are still respected.

viam machine part shell the old way:
Screenshot 2025-02-07 at 12 44 29

viam machine part shell the new way:
Screenshot 2025-02-07 at 12 44 42

cc @JessamyT

@stuqdog stuqdog requested a review from a team as a code owner February 7, 2025 17:46
@stuqdog stuqdog requested review from njooma and lia-viam February 7, 2025 17:46
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants