Skip to content

Update for ember 4.12 #3

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

Open
wants to merge 27 commits into
base: scf_master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8f98504
update node version
Gaurav0 Nov 6, 2024
d017e45
reroll yarn.lock
Gaurav0 Nov 6, 2024
da7bb8a
test on ember 4.8, 4.12
Gaurav0 Nov 6, 2024
50b08af
update embrodier dependencies
Gaurav0 Nov 6, 2024
fd05f2e
drop support for ember < 3.28
Gaurav0 Nov 6, 2024
8f8f4cf
update to Ember 3.28 with ember-cli-update
Gaurav0 Nov 6, 2024
0c97a6e
<auto> run yarn lint:fix
Gaurav0 Nov 6, 2024
1926986
manually fix remaining eslint errors
Gaurav0 Nov 6, 2024
f0b35b3
fix bug exposed by eslint fix
Gaurav0 Nov 6, 2024
01a2a15
fix missing @ember/string dependency
Gaurav0 Nov 6, 2024
68abde5
pin ember-cli-fastboot-testing to 0.6.1
Gaurav0 Nov 7, 2024
e8f650d
fix peerDependency warnings
Gaurav0 Nov 7, 2024
9de3470
update ember-element-helper
Gaurav0 Nov 7, 2024
2884cd7
Update dependency ember-focus-trap to v1
renovate-bot Jan 28, 2022
b444539
Fix test
simonihmig Jan 28, 2022
2d2f819
fix bs5 tests
Gaurav0 Nov 8, 2024
1d9a5fd
do not fail on @ember/string deprecation in Ember 4.12
Gaurav0 Nov 8, 2024
9066e0a
test on Ember 5.4, 5.8
Gaurav0 Nov 8, 2024
672d709
allow failures for ember-release, ember-beta, ember-canary
Gaurav0 Nov 8, 2024
b696193
upgrade ember-element-helper
Gaurav0 Nov 8, 2024
abeec2a
Refactor bs-alert to remove @localCopy and avoid mutation after consu…
SanderKnauff Nov 20, 2023
5c930ac
Skip failing tests in Embroider
simonihmig Nov 6, 2021
6a6d4e9
update ember-modifier to v3 and dependents
Gaurav0 Nov 9, 2024
9c282b1
bump version
Gaurav0 Nov 9, 2024
218d2f5
exclude tests for ember 6+
Gaurav0 Jun 23, 2025
91b75b4
reroll yarn.lock
Gaurav0 Jun 23, 2025
bae382d
do not allow ember-render-helpers-0.2.1 with old helper names deprecated
Gaurav0 Jun 23, 2025
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
Expand Down
30 changes: 19 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**/*.js',
'node-tests/**/*.js',
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
'./lib/**/*.js',
'./node-tests/**/*.js',
],
excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
parserOptions: {
Expand All @@ -69,5 +69,13 @@ module.exports = {
mocha: true,
},
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': 'warn',
},
},
],
};
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/ember-cli-build.js
testem.*
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ To switch Bootstrap version or preprocessor, see the [setup documentation](http:

Ember Bootstrap works and is fully [tested](https://github.com/kaliber5/ember-bootstrap/actions?query=workflow%3ACI+branch%3Amaster) with

* Ember.js 3.16+ (including all optional features)
* Ember.js 3.28+ (including all optional features)
* Ember CLI 3.15+
* Bootstrap 3 and 4
* Bootstrap 3-5
* all modern evergreen browsers (Chrome, Firefox, Safari, Edge)
* node.js 12+
* FastBoot 3.0+
* node.js 16+
* FastBoot 4.0+
* Embroider: we strive (and test) for maximum compatibility with Embroider, including the most aggressive setting
(`staticComponents`) for tree shaking and code splitting. However as Embroider itself is still considered beta software,
we won't be able to *guarantee* that for the time being.
Expand Down
1 change: 1 addition & 0 deletions addon/components/bs-alert.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class="{{unless this.hidden "alert"}} {{if this.fade "fade"}} {{if this.dismissible "alert-dismissible"}} {{bs-type-class "alert" @type}} {{if this.showAlert (if (macroCondition (macroGetOwnConfig "isNotBS3")) "show" "in")}}"
...attributes
{{did-update this.showOrHide this._visible}}
{{did-update this.updateVisibility @visible}}

Choose a reason for hiding this comment

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

thought: needs QA focus

>
{{#unless this.hidden}}
{{#if this.dismissible}}
Expand Down
33 changes: 16 additions & 17 deletions addon/components/bs-alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { later } from '@ember/runloop';
import usesTransition from 'ember-bootstrap/utils/decorators/uses-transition';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import arg from 'ember-bootstrap/utils/decorators/arg';
import { localCopy } from 'tracked-toolbox';

/**
Implements [Bootstrap alerts](http://getbootstrap.com/components/#alerts)
Expand Down Expand Up @@ -74,12 +73,6 @@ export default class Alert extends Component {
@tracked
hidden = !this.visible;

/**
* This is an unfortunate duplication of the previous property, but this is untracked to avoid causing the dreaded "same computation" assertion in GlimmerVM when reading a tracked property before setting it.
* @private
*/
_hidden = !this.visible;

/**
* This property controls if the alert should be visible. If false it might still be in the DOM until the fade animation
* has completed.
Expand All @@ -92,15 +85,16 @@ export default class Alert extends Component {
* @default true
* @public
*/
@arg
visible = true;
get visible() {
return this._visible ?? true;
}

/**
* @property _visible
* @private
*/
@localCopy('visible')
_visible;
@tracked
_visible = this.args.visible;

/**
* Set to false to disable the fade out animation when hiding the alert.
Expand All @@ -114,7 +108,7 @@ export default class Alert extends Component {
fade = true;

get showAlert() {
return this._visible && this.args.fade !== false;
return this.visible && this.args.fade !== false;
}

/**
Expand Down Expand Up @@ -180,7 +174,7 @@ export default class Alert extends Component {
* @private
*/
show() {
this.hidden = this._hidden = false;
this.hidden = false;
}

/**
Expand All @@ -191,7 +185,7 @@ export default class Alert extends Component {
* @private
*/
hide() {
if (this._hidden) {
if (this.hidden) {
return;
}

Expand All @@ -200,24 +194,29 @@ export default class Alert extends Component {
this,
function () {
if (!this.isDestroyed) {
this.hidden = this._hidden = true;
this.hidden = true;
this.args.onDismissed?.();
}
},
this.fadeDuration
);
} else {
this.hidden = this._hidden = true;
this.hidden = true;
this.args.onDismissed?.();
}
}

@action
showOrHide() {
if (this._visible) {
if (this.visible) {
this.show();
} else {
this.hide();
}
}

@action
updateVisibility() {
this._visible = this.args.visible;
}
}
2 changes: 1 addition & 1 deletion addon/components/bs-modal/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{else}}
{{#if @submitTitle}}
<Button @onClick={{@onClose}}>{{bs-default @closeTitle "Ok"}}</Button>
<Button @type={{bs-default @submitButtonType "primary"}} onClick={{@onSubmit}} disabled={{bs-default @submitDisabled false}}>{{@submitTitle}}</Button>
<Button @type={{bs-default @submitButtonType "primary"}} @buttonType="submit" onSubmit={{@onSubmit}} disabled={{bs-default @submitDisabled false}}>{{@submitTitle}}</Button>

Choose a reason for hiding this comment

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

thought: we should QA this on CRM

{{else}}
<Button @type="primary" @onClick={{@onClose}}>{{bs-default @closeTitle "Ok"}}</Button>
{{/if}}
Expand Down
33 changes: 23 additions & 10 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,58 @@ module.exports = async function () {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.16',
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-source': '~3.16.0',
'ember-source': '~3.28.0',
bootstrap: bootstrapVersion,
},
},
},
{
name: 'ember-lts-3.20',
name: 'ember-lts-4.4',
npm: {
devDependencies: {
'ember-source': '~3.20.5',
'ember-source': '~4.4.0',
bootstrap: bootstrapVersion,
},
},
},
{
name: 'ember-lts-3.24',
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': '~3.24.0',
'ember-source': '~4.8.0',
bootstrap: bootstrapVersion,
},
},
},
{
name: 'ember-lts-3.28',
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': '~3.28.0',
'ember-source': '~4.12.0',
bootstrap: bootstrapVersion,
},
},
env: {
FAIL_ON_DEPRECATION: false,
},
},
{
name: 'ember-lts-4.4',
name: 'ember-lts-5.4',
npm: {
devDependencies: {
'ember-source': '~4.4.0',
'ember-source': '~5.4.0',
bootstrap: bootstrapVersion,
},
},
},
{
name: 'ember-lts-5.8',
npm: {
devDependencies: {
'ember-source': '~5.8.0',
bootstrap: bootstrapVersion,
},
},
Expand Down Expand Up @@ -113,6 +125,7 @@ module.exports = async function () {
npm: {
devDependencies: {
bootstrap: bootstrapVersion,
'ember-source': '~3.28.0',
},
ember: {
edition: 'classic',
Expand Down
Loading
Loading