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

Show namespace.Code in chooser #623

Merged
merged 8 commits into from
Nov 22, 2023

Conversation

suprjinx
Copy link
Contributor

Alter namespace display in Chooser to show the namespace code instead of description. Description is shown in the "current namespace" area where it exists.

Fixes #622

@suprjinx suprjinx marked this pull request as ready for review November 20, 2023 15:36
@suprjinx
Copy link
Contributor Author

image
image

Comment on lines 81 to 84
<u>{{.CurrentNamespace.Code}}</u>
{{ if ne "" .CurrentNamespace.Description }}
- {{ .CurrentNamespace.Description }}
{{ end }}
Copy link
Member

Choose a reason for hiding this comment

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

I think we should apply this logic everywhere for consistency, probably by computing this before passing it to the template (as e.g. DisplayName)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

afaik this is the only place -- it looked strange to do this in the listing because the lengths were so different

Copy link
Member

Choose a reason for hiding this comment

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

But the listing is probably where the description is the most useful if we display it, no?
I think we either don't display the description in the chooser at all, or we display it everywhere in the chooser.

Copy link
Member

Choose a reason for hiding this comment

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

I guess it looked strange because the namespaces are displayed centred, but this might also be an issue when you have codes of various lenghts. We may want to align this all differently?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes left-align will probably look better, i'll try it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
image

Copy link
Member

Choose a reason for hiding this comment

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

could you please make the text left-aligned and move the arrow to the left of it?
also, I think it might look better with the description in parentheses, and with the default namespace being described as "Default namespace".

e.g.

  custom 1
  custom2 (has description)
→ default (Default namespace)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how's this?
image

@suprjinx suprjinx merged commit fe91e8c into G-Research:main Nov 22, 2023
@suprjinx suprjinx deleted the show-code-on-chooser branch November 22, 2023 18:36
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.

Show namespace code and description in chooser
3 participants