Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
083eaa8
replace slotted addon for app-view components
suresh-hashicorp Apr 6, 2026
aaac170
replace slotted for list-collection
suresh-hashicorp Apr 16, 2026
f93ecbf
replaces slots for data-form
suresh-hashicorp Apr 16, 2026
37f550d
replaces slotted for data writer
suresh-hashicorp Apr 18, 2026
8c4f31e
replaces slotted for tabular collection
suresh-hashicorp Apr 18, 2026
ac2f609
replaces slotted for tabular details
suresh-hashicorp Apr 18, 2026
19819d6
replaces slotted for data loader
suresh-hashicorp Apr 18, 2026
cf172c6
replaces slotted for EmptyState component
suresh-hashicorp Apr 18, 2026
3b0b4ca
replaces slotted in ChildSelector component
suresh-hashicorp Apr 18, 2026
b1b7fb1
remove debug comments
suresh-hashicorp Apr 19, 2026
f47bd35
removes slotted for confirmation-alert
suresh-hashicorp Apr 19, 2026
35a223c
chore: migrate confirmation-dialog from YieldSlot to Named Blocks
suresh-hashicorp Apr 19, 2026
e795020
chore: remove Slotted mixin from confirmation-dialog
suresh-hashicorp Apr 19, 2026
f8996a7
replaces slotted for confirmation-dialog
suresh-hashicorp Apr 19, 2026
c1cb77b
replace Slots for modal component
suresh-hashicorp Apr 21, 2026
2300205
replaces slots for menu panel
suresh-hashicorp Apr 21, 2026
b9c96d4
replaces slots for MenuSeparator
suresh-hashicorp Apr 21, 2026
09bd250
replaces slots for MenuItem
suresh-hashicorp Apr 21, 2026
ddb0b35
replace slots for popover-menu components and it's dependents
suresh-hashicorp Apr 21, 2026
9fdd4d7
fix conditional rendering of named blocks
suresh-hashicorp Apr 21, 2026
42f5477
replaced tooltip component
suresh-hashicorp Apr 23, 2026
650348b
replace slots for intention permission
suresh-hashicorp Apr 23, 2026
75a6994
remove slots from SourcesSelect
suresh-hashicorp Apr 23, 2026
11d0b89
remove slots for RoleForm
suresh-hashicorp Apr 23, 2026
7469d19
remove slots for polcies and roles forms
suresh-hashicorp Apr 29, 2026
fb2c081
remove slotted component's extensions
suresh-hashicorp Apr 29, 2026
3b4ebbe
remove blockslot for PolicyForm consumer
suresh-hashicorp Apr 29, 2026
8fad52b
remove blockslot references in docs
suresh-hashicorp Apr 29, 2026
08aa571
remove block slot addon
suresh-hashicorp Apr 29, 2026
97172a3
remove unused file
suresh-hashicorp Apr 29, 2026
bcc5bb4
remove block-slot mixin
suresh-hashicorp Apr 29, 2026
2a949db
fix lint errors
suresh-hashicorp Apr 29, 2026
b14c855
fix namespace delete list item
suresh-hashicorp May 2, 2026
e8c80a4
adds changelog
suresh-hashicorp May 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/23481.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Removed block-slot addon dependency
```
8 changes: 4 additions & 4 deletions ui/packages/consul-ui/app/components/app-error/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
}}

<AppView>
<BlockSlot @name="header">
<:header>
<h1>
Error {{@error.status}}
</h1>
</BlockSlot>
<BlockSlot @name="content">
</:header>
<:content>
<ErrorState
@error={{@error}}
@login={{if (eq @error.status "403") @login}}
/>
</BlockSlot>
</:content>
</AppView>
32 changes: 16 additions & 16 deletions ui/packages/consul-ui/app/components/app-view/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ breadcrumbs and back again.

<AppView>

<BlockSlot @name="header">
<:header>
<h1>
Main title <em>{{format-number "100000"}} total {{pluralize 100000 "thing" without-count=true}} in this page</em>
</h1>
</BlockSlot>
<BlockSlot @name="content">
</:header>
<:content>

<EmptyState>
<BlockSlot @name="body">
<:body>
<p>
Nothing to see here
</p>
</BlockSlot>
</:content>
</EmptyState>

</BlockSlot>
</:body>
</AppView>

<figcaption>Basic list-like view</figcaption>
Expand All @@ -48,36 +48,36 @@ breadcrumbs and back again.
<figure>

<AppView>
<BlockSlot @name="breadcrumbs">
<:breadcrumbs>
<ol>
<li><a href="">Hansel</a></li>
<li><a href="">Gretel</a></li>
</ol>
</BlockSlot>
</:breadcrumbs>

<BlockSlot @name="header">
<:header>
<h1>
Scary witch's gingerbread house <em>(run away quick!)</em>
</h1>
</BlockSlot>
</:header>

<BlockSlot @name="actions">
<:actions>
<Action
{{on "click" (noop)}}
>
Run away!
</Action>
</BlockSlot>
</:actions>

<BlockSlot @name="content">
<:content>
<EmptyState>
<BlockSlot @name="body">
<:body>
<p>
Double, double toil and trouble
</p>
</BlockSlot>
</:content>
</EmptyState>
</BlockSlot>
</:body>
</AppView>

<figcaption>Basic detail-like view</figcaption>
Expand Down
38 changes: 18 additions & 20 deletions ui/packages/consul-ui/app/components/app-view/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,34 @@
<header>
<div>
<div>
<div class="app-view-breadcrumbs" data-test-breadcrumbs>
<YieldSlot @name="breadcrumbs">
{{document-attrs class="with-breadcrumbs"}}
{{yield}}
</YieldSlot>
</div>
<nav class="app-view-breadcrumbs" aria-label="Breadcrumb" data-test-breadcrumbs>
{{#if (if (not-eq @showBreadcrumb undefined) @showBreadcrumb (has-block 'breadcrumbs'))}}
{{document-attrs class="with-breadcrumbs"}}
{{yield to='breadcrumbs'}}
{{/if}}
</nav>
<div class="title">
<div class="title-left-container">
<YieldSlot @name="header">
{{yield}}
</YieldSlot>
{{yield to='header'}}
</div>
<div class="actions">
<YieldSlot @name="actions">
<PortalTarget @name="app-view-actions" />
{{yield}}
</YieldSlot>
<PortalTarget @name="app-view-actions" />
{{#if (has-block 'actions')}}
{{yield to='actions'}}
{{/if}}
</div>
</div>
<YieldSlot @name="nav">
{{yield}}
</YieldSlot>
{{#if (has-block 'nav')}}
{{yield to='nav'}}
{{/if}}
</div>
</div>
<YieldSlot @name="toolbar">
{{#if (has-block 'toolbar')}}
<input type="checkbox" id="toolbar-toggle" />
{{yield}}
</YieldSlot>
{{yield to='toolbar'}}
{{/if}}
</header>
<div>
<YieldSlot @name="content">{{yield}}</YieldSlot>
{{yield to='content'}}
</div>
</div>
4 changes: 2 additions & 2 deletions ui/packages/consul-ui/app/components/app-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: BUSL-1.1
*/

import Component from '@ember/component';

Check warning on line 6 in ui/packages/consul-ui/app/components/app-view/index.js

View workflow job for this annotation

GitHub Actions / node-tests

Use Glimmer components(@glimmer/component) instead of classic components(@ember/component)
import SlotsMixin from 'block-slots';
export default Component.extend(SlotsMixin, {

export default Component.extend({

Check warning on line 8 in ui/packages/consul-ui/app/components/app-view/index.js

View workflow job for this annotation

GitHub Actions / node-tests

Native JS classes should be used instead of classic classes
tagName: '',
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
>
{{yield}}
{{#if (not @disabled)}}
<YieldSlot @name="create">{{yield}}</YieldSlot>
{{yield to="create"}}
<label class="type-text">
<span><YieldSlot @name="label">{{yield}}</YieldSlot></span>
<span>{{yield to="label"}}</span>
{{!-- {{#if isOpen}} --}}
<DataSource
@src={{uri '/${partition}/${nspace}/${dc}/${type}'
Expand Down Expand Up @@ -50,7 +50,7 @@
</label>
{{/if}}
{{#if (gt @items.length 0)}}
<YieldSlot @name="set" @params={{block-params (action "remove")}}>{{yield}}</YieldSlot>
{{yield (action "remove") to="set"}}
{{else}}

{{/if}}
Expand Down
11 changes: 6 additions & 5 deletions ui/packages/consul-ui/app/components/child-selector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: BUSL-1.1
*/

import Component from '@ember/component';

Check warning on line 6 in ui/packages/consul-ui/app/components/child-selector/index.js

View workflow job for this annotation

GitHub Actions / node-tests

Use Glimmer components(@glimmer/component) instead of classic components(@ember/component)
import { get, set, computed } from '@ember/object';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
Expand All @@ -11,9 +11,7 @@

import { task } from 'ember-concurrency';

import Slotted from 'block-slots';

export default Component.extend(Slotted, {
export default Component.extend({
onchange: function () {},
tagName: '',

Expand All @@ -30,8 +28,11 @@
init: function () {
this._super(...arguments);
this._listeners = this.dom.listeners();
set(this, 'form', this.formContainer.form(this.type));
this.form.clear({ Datacenter: this.dc, Namespace: this.nspace });
const form = this.formContainer.form(this.type);
setTimeout(() => {
form.clear({ Datacenter: this.dc, Namespace: this.nspace });
}, 0);
set(this, 'form', form);
},
willDestroyElement: function () {
this._super(...arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,42 @@
SPDX-License-Identifier: BUSL-1.1
}}

{{yield}}
<InformedAction
class="confirmation-alert warning"
...attributes
>
<:header>
<YieldSlot @name="header">{{yield}}</YieldSlot>
{{#if (has-block "header")}}
{{yield to="header"}}
{{else}}
{{yield}}
{{/if}}
</:header>
<:body>
<YieldSlot @name="body">{{yield}}</YieldSlot>
{{#if (has-block "body")}}
{{yield to="body"}}
{{else}}
{{yield}}
{{/if}}
</:body>
<:actions as |Actions|>
<Actions.Action class="dangerous">
<YieldSlot @name="confirm" @params={{
block-params (component 'action'
{{#if (has-block "confirm")}}
{{yield
(component 'action'
onclick=(action @onclick)
tabindex="-1"
)
to="confirm"
}}
>
{{else}}
{{yield}}
</YieldSlot>
{{/if}}
</Actions.Action>
<Actions.Action>
<Action @for={{@name}}>
Cancel
</Action>
</Actions.Action>
</:actions>
</InformedAction>
</InformedAction>
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
}}

<div class={{concat "with-confirmation" (if this.confirming " confirming" "")}} ...attributes>
{{yield}}
<YieldSlot @name="action" @params={{block-params (action "confirm") (action "cancel")}}>
{{#if (or this.permanent (not this.confirming))}}
{{#if (has-block)}}
{{yield}}
{{/if}}
</YieldSlot>
<YieldSlot @name="dialog" @params={{block-params (action "execute") (action "cancel") @message this.actionName}}>
{{#if this.confirming }}
{{yield}}
{{/if}}
</YieldSlot>
</div>
{{/if}}

{{#if (has-block "action")}}
{{#if (or this.permanent (not this.confirming))}}
{{yield (action "confirm") (action "cancel") to="action"}}
{{/if}}
{{/if}}

{{#if (has-block "dialog")}}
{{#if this.confirming}}
{{yield (action "execute") (action "cancel") @message this.actionName to="dialog"}}
{{/if}}
{{/if}}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import Component from '@ember/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';

import Slotted from 'block-slots';

export default class ConfirmationDialogComponent extends Component.extend(Slotted) {
export default class ConfirmationDialogComponent extends Component {
tagName = '';
message = 'Are you sure?';
@tracked confirming = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
}}

<AppView>
<BlockSlot @name="header">
<:header>
<h1>
Tokens
</h1>
</BlockSlot>
<BlockSlot @name="content">
</:header>
<:content>
<EmptyState data-test-acls-disabled>
<BlockSlot @name="header">
<:header>
<h2>Welcome to ACLs</h2>
</BlockSlot>
<BlockSlot @name="body">
</:header>
<:body>
<p>
ACLs are not enabled in this Consul cluster. We strongly encourage the use of ACLs in production environments for the best security practices.
</p>
</BlockSlot>
<BlockSlot @name="actions">
</:body>
<:actions>
<li>
<Hds::Link::Standalone
@text='Read the documentation'
Expand All @@ -38,8 +38,8 @@
@size='small'
/>
</li>
</BlockSlot>
</:actions>
</EmptyState>
</BlockSlot>
</:content>
</AppView>

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
<ListCollection
class="consul-auth-method-list"
@items={{@items}}
as |item|
>
<BlockSlot @name="header">
<:header as |item|>
{{#if (not-eq item.DisplayName '')}}
<a data-test-auth-method href={{href-to "dc.acls.auth-methods.show" item.Name}}>
{{item.DisplayName}}
Expand All @@ -18,8 +17,8 @@
{{item.Name}}
</a>
{{/if}}
</BlockSlot>
<BlockSlot @name="details">
</:header>
<:details as |item|>
<Consul::AuthMethod::Type @item={{item}} />
{{#if (not-eq item.DisplayName '')}}
<span data-test-display-name>{{item.Name}}</span>
Expand All @@ -35,5 +34,5 @@
<dd>{{item.MaxTokenTTL}}</dd>
</dl>
{{/if}}
</BlockSlot>
</:details>
</ListCollection>
Loading
Loading