mirror of https://github.com/status-im/consul.git
ui: Wrap service names on show and instance routes (#14771)
* Wrap service names on show and instance routes Moves the trailing type/kind/actions to the second row of the header no matter what length the service name is. Wraps service name text. * Change grid format of AppView globally * Add tooltips to the last element of breadcrumbs
This commit is contained in:
parent
2811925417
commit
3638dc13fb
|
@ -13,14 +13,16 @@
|
||||||
</YieldSlot>
|
</YieldSlot>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<YieldSlot @name="header">
|
<div class="title-left-container">
|
||||||
{{yield}}
|
<YieldSlot @name="header">
|
||||||
</YieldSlot>
|
|
||||||
<div class="actions">
|
|
||||||
<YieldSlot @name="actions">
|
|
||||||
<PortalTarget @name="app-view-actions" />
|
|
||||||
{{yield}}
|
{{yield}}
|
||||||
</YieldSlot>
|
</YieldSlot>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<YieldSlot @name="actions">
|
||||||
|
<PortalTarget @name="app-view-actions" />
|
||||||
|
{{yield}}
|
||||||
|
</YieldSlot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<YieldSlot @name="nav">
|
<YieldSlot @name="nav">
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
%app-view-header .title {
|
%app-view-header .title {
|
||||||
@extend %app-view-title;
|
@extend %app-view-title;
|
||||||
}
|
}
|
||||||
|
%app-view-title .title-left-container {
|
||||||
|
@extend %app-view-title-left-container;
|
||||||
|
}
|
||||||
%app-view-header .actions {
|
%app-view-header .actions {
|
||||||
@extend %app-view-actions;
|
@extend %app-view-actions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,38 @@
|
||||||
/* layout */
|
/* layout */
|
||||||
%app-view-title {
|
%app-view-title {
|
||||||
display: flex;
|
display: grid;
|
||||||
align-items: center;
|
grid-template-columns: 1fr auto;
|
||||||
white-space: nowrap;
|
grid-template-areas: "title actions";
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
%app-view-title-left-container {
|
||||||
|
grid-area: title;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
%app-view-title-left-container > :first-child {
|
||||||
|
flex-basis: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
%app-view-title-left-container > :not(:first-child) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
%app-view-actions {
|
%app-view-actions {
|
||||||
|
grid-area: actions;
|
||||||
|
align-self: end;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* units */
|
/* units */
|
||||||
%app-view-title {
|
%app-view-title {
|
||||||
padding-bottom: 0.2em;
|
padding-bottom: 1.4em;
|
||||||
}
|
|
||||||
%app-view-title > :not(:last-child) {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
%app-view-actions {
|
|
||||||
margin-top: 9px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* content */
|
/* content */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%app-view-title > *:first-child {
|
%app-view-title-left-container > *:first-child {
|
||||||
@extend %h100;
|
@extend %h100;
|
||||||
}
|
}
|
||||||
%app-view-title {
|
%app-view-title {
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
|
%breadcrumbs {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
%breadcrumbs > li {
|
%breadcrumbs > li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
overflow: hidden
|
||||||
}
|
}
|
||||||
%breadcrumb-milestone::before {
|
%breadcrumb-milestone::before {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
@ -10,6 +18,8 @@
|
||||||
/* as the separator is a '/' the left margin needs */
|
/* as the separator is a '/' the left margin needs */
|
||||||
/* to be different from the right in order to center it */
|
/* to be different from the right in order to center it */
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
%breadcrumb::before {
|
%breadcrumb::before {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
|
|
@ -63,6 +63,7 @@ as |parts|}}
|
||||||
{{! We push on a '' here so make sure we get a trailing slash/separator }}
|
{{! We push on a '' here so make sure we get a trailing slash/separator }}
|
||||||
<li>
|
<li>
|
||||||
<Action
|
<Action
|
||||||
|
{{action breadcrumb}}
|
||||||
@href={{href-to 'dc.kv.folder'
|
@href={{href-to 'dc.kv.folder'
|
||||||
(join '/'
|
(join '/'
|
||||||
(append
|
(append
|
||||||
|
@ -149,4 +150,4 @@ as |parts|}}
|
||||||
</DataLoader>
|
</DataLoader>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -108,7 +108,7 @@ as |sort filters parent items|}}
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href={{href-to 'dc.kv'}}>Key / Values</a></li>
|
<li><a href={{href-to 'dc.kv'}}>Key / Values</a></li>
|
||||||
{{#each (slice 0 -2 (split parent.Key '/')) as |breadcrumb index|}}
|
{{#each (slice 0 -2 (split parent.Key '/')) as |breadcrumb index|}}
|
||||||
<li><a href={{href-to 'dc.kv.folder' (join '/' (append (slice 0 (add index 1) (split parent.Key '/')) ''))}}>{{breadcrumb}}</a></li>
|
<li><a {{tooltip breadcrumb}} href={{href-to 'dc.kv.folder' (join '/' (append (slice 0 (add index 1) (split parent.Key '/')) ''))}}>{{breadcrumb}}</a></li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ol>
|
</ol>
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
|
@ -207,4 +207,4 @@ as |sort filters parent items|}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
</DataLoader>
|
</DataLoader>
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -129,7 +129,9 @@ as |item|}}
|
||||||
<BlockSlot @name="breadcrumbs">
|
<BlockSlot @name="breadcrumbs">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href={{href-to 'dc.services' params=(hash peer=undefined)}}>All Services</a></li>
|
<li><a href={{href-to 'dc.services' params=(hash peer=undefined)}}>All Services</a></li>
|
||||||
<li><a data-test-back href={{href-to 'dc.services.show'}}>Service ({{item.Service.Service}})</a></li>
|
<li><a {{tooltip (concat "Service (" item.Service.Service ")")}} data-test-back href={{href-to 'dc.services.show'}}>
|
||||||
|
Service ({{item.Service.Service}})
|
||||||
|
</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="header">
|
<BlockSlot @name="header">
|
||||||
|
@ -192,4 +194,4 @@ as |item|}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
</DataLoader>
|
</DataLoader>
|
||||||
</Route>
|
</Route>
|
||||||
|
|
Loading…
Reference in New Issue