-
Notifications
You must be signed in to change notification settings - Fork 4.6k
UI/ember upgrade to v4.12 #23070
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
UI/ember upgrade to v4.12 #23070
Changes from all commits
c50fe62
3a4f72e
a6118a5
1142d80
0ca7d80
3673e3d
15876bb
fcddf87
05a6667
8d673eb
69d92c9
2155bce
763ceaf
283836f
f00268f
d32d729
54ea162
bf6aad2
eb23bad
8587dc8
8bc9c4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ```release-note:improvement | ||
| ui: upgraded Ember framework from v3.28 to v4.12, improving performance and stability. Upgrades multiple other packages which support Ember v4. | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,8 +9,8 @@ | |||||
| "/${partition}/${nspace}/${dc}/nspace" | ||||||
| (hash partition="" nspace="" dc=@item.Datacenter) | ||||||
| }} | ||||||
| @type={{"nspace"}} | ||||||
| @label={{"Namespace"}} | ||||||
| @type="nspace" | ||||||
| @label="Namespace" | ||||||
| @ondelete={{fn this.onDelete @item}} | ||||||
| @onchange={{fn this.onSubmit @item}} | ||||||
| as |writer| | ||||||
|
|
@@ -145,7 +145,7 @@ | |||||
| data-test-delete | ||||||
| @color='critical' | ||||||
| @text='Delete' | ||||||
| {{on "click" (fn confirm )}} | ||||||
| {{on "click" confirm }} | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be tied to the component action using
Suggested change
|
||||||
| /> | ||||||
| </BlockSlot> | ||||||
| <BlockSlot @name="dialog" as |execute cancel message|> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| }} | ||
|
|
||
| <Route | ||
| @name={{routeName}} | ||
| @name={{this.routeName}} | ||
| as |route|> | ||
| <DataLoader | ||
| @src={{ | ||
|
|
@@ -27,18 +27,18 @@ as |route|> | |
| {{#let | ||
|
|
||
| (hash | ||
| value=(or sortBy "Name:asc") | ||
| change=(action (mut sortBy) value="target.selected") | ||
| value=(or this.sortBy "Name:asc") | ||
| change=(action (mut this.sortBy) value="target.selected") | ||
| ) | ||
|
|
||
| (hash | ||
| searchproperty=(hash | ||
| value=(if (not-eq searchproperty undefined) | ||
| (split searchproperty ',') | ||
| searchProperties | ||
| value=(if (not-eq this.searchproperty undefined) | ||
| (split this.searchproperty ',') | ||
| this.searchProperties | ||
| ) | ||
| change=(action (mut searchproperty) value="target.selectedItems") | ||
| default=searchProperties | ||
| change=(action (mut this.searchproperty) value="target.selectedItems") | ||
| default=this.searchProperties | ||
| ) | ||
| ) | ||
|
|
||
|
|
@@ -64,8 +64,8 @@ as |route|> | |
| <BlockSlot @name="toolbar"> | ||
| {{#if (gt items.length 0)}} | ||
| <Consul::Nspace::SearchBar | ||
| @search={{search}} | ||
| @onsearch={{action (mut search) value="target.value"}} | ||
| @search={{this.search}} | ||
| @onsearch={{action (mut this.search) value="target.value"}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [note]: ideally we would address two items in the follow up as well, since it would help with the next steps:
|
||
|
|
||
| @sort={{sort}} | ||
|
|
||
|
|
@@ -100,7 +100,7 @@ as |route|> | |
| @type="nspace" | ||
| @sort={{sort.value}} | ||
| @filters={{filters}} | ||
| @search={{search}} | ||
| @search={{this.search}} | ||
| @items={{items}} | ||
| as |collection|> | ||
| <collection.Collection> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,8 @@ | |
| [email protected] | ||
| ) | ||
| }} | ||
| @type={{'partition'}} | ||
| @label={{'Partition'}} | ||
| @type='partition' | ||
| @label='Partition' | ||
| @ondelete={{fn (if @ondelete @ondelete @onsubmit) @item}} | ||
| @onchange={{fn (optional @onsubmit) @item}} | ||
| as |writer|> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,12 +13,12 @@ | |
| as |fsm| | ||
| > | ||
|
|
||
| {{#let (unique-id) as |id reset|}} | ||
| {{#let (dom-guid) as |id reset|}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this a custom helper?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, unique-id was a custom helper we were using. Ember 4 provides its own helper by the same name. Changed our helpers name to dom-guid to avoid conflicts. |
||
| <form {{on "submit" (fn fsm.dispatch "LOAD")}} id={{id}}> | ||
|
|
||
| <fsm.State @matches={{array "idle" "error"}}> | ||
| <fsm.State @matches={{"error"}}> | ||
| <Hds::Alert @color='critical' class='mb-3 mt-2' as |A|> | ||
| <fsm.State @matches="error"> | ||
| <Hds::Alert @type="inline" @color='critical' class='mb-3 mt-2' as |A|> | ||
| <A.Title>Error</A.Title> | ||
| <A.Description>{{fsm.state.context.error.message}}</A.Description> | ||
| </Hds::Alert> | ||
|
|
@@ -35,7 +35,7 @@ | |
| }} | ||
| </fsm.State> | ||
|
|
||
| <fsm.State @matches={{"loading"}}> | ||
| <fsm.State @matches="loading"> | ||
| <DataSource | ||
| @src={{uri | ||
| "/${partition}/${nspace}/${dc}/peering/token-for/${name}/${externalAddresses}" | ||
|
|
@@ -55,7 +55,7 @@ | |
| /> | ||
| </fsm.State> | ||
|
|
||
| <fsm.State @matches={{"success"}}> | ||
| <fsm.State @matches="success"> | ||
| {{yield | ||
| (hash | ||
| Fieldsets=(component | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,14 +3,11 @@ | |
| SPDX-License-Identifier: BUSL-1.1 | ||
| }} | ||
|
|
||
| <div | ||
| ...attributes | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it a good idea to keep splatributes on component level, maybe move it a level if this wrapping div is just a leftover from ember component migration |
||
| > | ||
| <div ...attributes> | ||
| <Hds::ButtonSet> | ||
| <Hds::Button | ||
| @text='Copy token' | ||
| @color='primary' | ||
| ...attributes | ||
| {{with-copyable @token}} | ||
| /> | ||
| <Hds::Button | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /** | ||
| * Copyright (c) HashiCorp, Inc. | ||
| * SPDX-License-Identifier: BUSL-1.1 | ||
| */ | ||
|
|
||
| import Route from 'consul-ui/routing/route'; | ||
|
|
||
| export default class PeersShowExportedRoute extends Route { | ||
| queryParams = { | ||
| search: { | ||
| as: 'filter', | ||
| }, | ||
| }; // Object format in route with configuration | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
this.confirmto reference the component. Also the same for thecancelbelow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmis trickling down as return value from the wrapping BlockSlot. It's not part ofthisobject.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was confusing to me at first but I have looked at the file and it seems this are block arguments, which seems fine but does ask for some refactor in the future