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

Support display names for actions #242

Closed
itowlson opened this issue Aug 7, 2019 · 5 comments · Fixed by #323
Closed

Support display names for actions #242

itowlson opened this issue Aug 7, 2019 · 5 comments · Fixed by #323

Comments

@itowlson
Copy link

itowlson commented Aug 7, 2019

The CNAB WD says that action names "SHOULD use dotted name syntax". This is great for uniqueness, but not great for UI. Could we have an optional 'display name' attribute for actions? The scenario is a GUI which displays the actions that can be taken on a bundle (or installation/instance/claim), e.g. as buttons or on a menu: it would be nice to be able to display:

--------------------------------------
|  Upgrade  |  Status  |  Uninstall  |
--------------------------------------

instead of

----------------------------------------------
|  Upgrade  |  io.cnab.status  |  Uninstall  |
----------------------------------------------
@itowlson
Copy link
Author

itowlson commented Aug 7, 2019

I realise this could be done using the custom section of the bundle, and I would certainly use that for other action-related stuff (e.g. if I want icons on the buttons); but I feel that a display name is likely to be of wide enough use that it could be part of the standard.

@chris-crone
Copy link
Contributor

Couple of thoughts on this:

  1. What about localisation?
  2. Would it be sufficient to say that a UI MAY use whatever is after the last dot is the "display name" with - and _ replaced by <space>?

@carolynvs
Copy link
Contributor

I've never liked the dotted syntax and that it ended up in the spec to begin with (/bias). 😀 So I am in favor of whatever we can do to not have it forced onto the tools/UIs.

Localization is a great thing that we should do but I think that it is also a big thing that is larger than what Ivan is asking about. Hopefully we can do something similar to 2 for now to get by and localization could come in a later additive feature?

FWIW, Porter already has something very similar to 2 and supports status, logs dry-run etc without the dotted syntax because of my awful anti-dotted syntax bias. 😉 So you can run porter invoke --action=status or porter invoke --action=io.cnab.status if you enjoy typing and want to type more.

@chris-crone
Copy link
Contributor

Hopefully we can do something similar to 2 for now to get by and localization could come in a later additive feature?

+1 to this especially if we have tools doing it.

On projects where I've had to worry about localisation before, we've needed a unique key and description. We have that as part of actions in the spec already so we can use that.

@carolynvs
Copy link
Contributor

I'm splitting localization/internationalization off as a separate/larger concern based on feedback during the cnab community meeting on 2019/9/4. #262

The suggestion for the interim was to include the second solution to the non-normative section on how to display the dotted custom action names.

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 a pull request may close this issue.

3 participants