diff --git a/.changelog/10157.txt b/.changelog/10157.txt new file mode 100644 index 000000000..7a994cd49 --- /dev/null +++ b/.changelog/10157.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Don't render a DOM element for empty namespace descriptions +``` diff --git a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs index 48e36ae90..a309d64d9 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs @@ -14,12 +14,14 @@ as |item|> {{/if}} +{{#if item.Description}}
Description
{{item.Description}}
+{{/if}} {{#if (env 'CONSUL_ACLS_ENABLED')}} {{/if}} diff --git a/ui/packages/consul-ui/app/styles/components/composite-row.scss b/ui/packages/consul-ui/app/styles/components/composite-row.scss index 9c2bb59ce..40cf5f036 100644 --- a/ui/packages/consul-ui/app/styles/components/composite-row.scss +++ b/ui/packages/consul-ui/app/styles/components/composite-row.scss @@ -16,14 +16,20 @@ .consul-lock-session-list ul > li:not(:first-child) { @extend %with-one-action-row; } -// TODO: This hides the icons-less dt's in the below lists as they don't have +// TODO: This hides the iconless dt's in the below lists as they don't have // tooltips the todo would be to wrap these texts in spans .consul-nspace-list > ul > li:not(:first-child) dt, .consul-token-list > ul > li:not(:first-child) dt, .consul-policy-list > ul li:not(:first-child) dl:not(.datacenter) dt, .consul-role-list > ul > li:not(:first-child) dt { + @extend %iconless-dt; +} +%iconless-dt { display: none; } +%iconless-dt + dd { + margin-left: 0 !important; +} /* TODO: the service list has a 1px offset */ .consul-policy-list dl.datacenter dt, .consul-service-list li > div:first-child > dl:first-child dd {