Skip to content

Commit

Permalink
Merge pull request #1905 from hashicorp/alex-ju/remove-cached-decorat…
Browse files Browse the repository at this point in the history
…or-in-tabs

`Tabs` - remove `@cached` decorator
  • Loading branch information
alex-ju committed Jan 24, 2024
2 parents e5c52d4 + 014bf97 commit d6d3588
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-feet-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hashicorp/design-system-components": patch
---

`Tabs` - removed `@cached` decorator and the associated `ember-cached-decorator-polyfill`
2 changes: 0 additions & 2 deletions packages/components/addon/components/hds/tabs/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import Component from '@glimmer/component';
import { cached } from '@glimmer/tracking';
import { guidFor } from '@ember/object/internals';
import { action } from '@ember/object';

Expand All @@ -15,7 +14,6 @@ export default class HdsTabsPanelComponent extends Component {
*/
panelId = 'panel-' + guidFor(this);

@cached
get nodeIndex() {
return this.args.panelIds
? this.args.panelIds.indexOf(this.panelId)
Expand Down
2 changes: 0 additions & 2 deletions packages/components/addon/components/hds/tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import Component from '@glimmer/component';
import { cached } from '@glimmer/tracking';
import { guidFor } from '@ember/object/internals';
import { action } from '@ember/object';

Expand All @@ -15,7 +14,6 @@ export default class HdsTabsTabComponent extends Component {
*/
tabId = 'tab-' + guidFor(this);

@cached
get nodeIndex() {
return this.args.tabIds ? this.args.tabIds.indexOf(this.tabId) : undefined;
}
Expand Down
1 change: 0 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"dialog-polyfill": "^0.5.6",
"ember-a11y-refocus": "^3.0.2",
"ember-auto-import": "^2.6.3",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-sass": "^11.0.1",
Expand Down
33 changes: 2 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2730,7 +2730,7 @@ __metadata:
languageName: node
linkType: hard

"@embroider/macros@npm:^0.50.0 || ^1.0.0, @embroider/macros@npm:^1.0.0, @embroider/macros@npm:^1.10.0, @embroider/macros@npm:^1.12.0, @embroider/macros@npm:^1.13.0, @embroider/macros@npm:^1.13.1, @embroider/macros@npm:^1.2.0, @embroider/macros@npm:^1.8.1, @embroider/macros@npm:^1.8.3":
"@embroider/macros@npm:^0.50.0 || ^1.0.0, @embroider/macros@npm:^1.0.0, @embroider/macros@npm:^1.10.0, @embroider/macros@npm:^1.12.0, @embroider/macros@npm:^1.13.0, @embroider/macros@npm:^1.13.1, @embroider/macros@npm:^1.2.0, @embroider/macros@npm:^1.8.1":
version: 1.13.2
resolution: "@embroider/macros@npm:1.13.2"
dependencies:
Expand Down Expand Up @@ -3483,7 +3483,6 @@ __metadata:
ember-a11y-testing: "npm:^6.1.1"
ember-auto-import: "npm:^2.6.3"
ember-body-class: "npm:^3.0.0"
ember-cached-decorator-polyfill: "npm:^1.0.2"
ember-cli: "npm:~5.3.0"
ember-cli-babel: "npm:^8.2.0"
ember-cli-clean-css: "npm:^3.0.0"
Expand Down Expand Up @@ -6774,7 +6773,7 @@ __metadata:
languageName: node
linkType: hard

"babel-import-util@npm:^1.1.0, babel-import-util@npm:^1.2.2, babel-import-util@npm:^1.3.0":
"babel-import-util@npm:^1.1.0, babel-import-util@npm:^1.3.0":
version: 1.4.1
resolution: "babel-import-util@npm:1.4.1"
checksum: becfbc6a60c8e6d026d648abec94af1a6bcc952d015dc1a802722b36abfffb5c9e0e803345d344738a1dcdab8c63eb33766316fd66b32f78b9dce9a93391a80d
Expand Down Expand Up @@ -11086,34 +11085,6 @@ __metadata:
languageName: node
linkType: hard

"ember-cache-primitive-polyfill@npm:^1.0.1":
version: 1.0.1
resolution: "ember-cache-primitive-polyfill@npm:1.0.1"
dependencies:
ember-cli-babel: "npm:^7.22.1"
ember-cli-version-checker: "npm:^5.1.1"
ember-compatibility-helpers: "npm:^1.2.1"
silent-error: "npm:^1.1.1"
checksum: 6a9b85bb67d17b4d1a2a7556e3ae851ef1e63c7395a19f534421707a4ee19212b0682fa2435c3efaefcc7e9c4c63e7348cbdfde2a31a8e73f5d725344de34db1
languageName: node
linkType: hard

"ember-cached-decorator-polyfill@npm:^1.0.2":
version: 1.0.2
resolution: "ember-cached-decorator-polyfill@npm:1.0.2"
dependencies:
"@embroider/macros": "npm:^1.8.3"
"@glimmer/tracking": "npm:^1.1.2"
babel-import-util: "npm:^1.2.2"
ember-cache-primitive-polyfill: "npm:^1.0.1"
ember-cli-babel: "npm:^7.26.11"
ember-cli-babel-plugin-helpers: "npm:^1.1.1"
peerDependencies:
ember-source: ^3.13.0 || ^4.0.0 || >= 5.0.0
checksum: e83d4e3064c9787fa3e1b8f8b7e809360ab06c04f098f95a9aa2f95049634bda614270fedce2859373ca448b013c289658c8f290f5abd4af8ab2eecb2483f2d0
languageName: node
linkType: hard

"ember-cli-app-version@npm:^6.0.1":
version: 6.0.1
resolution: "ember-cli-app-version@npm:6.0.1"
Expand Down

2 comments on commit d6d3588

@vercel
Copy link

@vercel vercel bot commented on d6d3588 Jan 24, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

hds-showcase – ./packages/components

hds-showcase.vercel.app
hds-showcase-hashicorp.vercel.app
hds-components-hashicorp.vercel.app
hds-showcase-git-main-hashicorp.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d6d3588 Jan 24, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.