Skip to content
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

Update for ember 4.12 #2

Open
wants to merge 25 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
25 commits
Select commit Hold shift + click to select a range
6e9c5ca
enable github workflows for all branches
Gaurav0 Nov 6, 2024
110114d
update node version
Gaurav0 Nov 6, 2024
a655880
reroll yarn.lock
Gaurav0 Nov 6, 2024
f5e45f8
test on ember 4.8, 4.12
Gaurav0 Nov 6, 2024
c7385c1
update embrodier dependencies
Gaurav0 Nov 6, 2024
430f1ec
drop support for ember < 3.28
Gaurav0 Nov 6, 2024
3de4a02
update to Ember 3.28 with ember-cli-update
Gaurav0 Nov 6, 2024
7b35b9a
<auto> run yarn lint:fix
Gaurav0 Nov 6, 2024
364beef
manually fix remaining eslint errors
Gaurav0 Nov 6, 2024
afbae73
fix bug exposed by eslint fix
Gaurav0 Nov 6, 2024
22b38c9
fix missing @ember/string dependency
Gaurav0 Nov 6, 2024
1966d66
pin ember-cli-fastboot-testing to 0.6.1
Gaurav0 Nov 7, 2024
0461366
fix peerDependency warnings
Gaurav0 Nov 7, 2024
9363191
update ember-element-helper
Gaurav0 Nov 7, 2024
0e464be
Update dependency ember-focus-trap to v1
renovate-bot Jan 28, 2022
c25f954
Fix test
simonihmig Jan 28, 2022
c8f44f9
fix bs5 tests
Gaurav0 Nov 8, 2024
bde82fd
do not fail on @ember/string deprecation in Ember 4.12
Gaurav0 Nov 8, 2024
48ccacd
test on Ember 5.4, 5.8
Gaurav0 Nov 8, 2024
51b0265
allow failures for ember-release, ember-beta, ember-canary
Gaurav0 Nov 8, 2024
a23f927
upgrade ember-element-helper
Gaurav0 Nov 8, 2024
fe95c91
Refactor bs-alert to remove @localCopy and avoid mutation after consu…
SanderKnauff Nov 20, 2023
4f4a7ba
Skip failing tests in Embroider
simonihmig Nov 6, 2021
83affa3
update ember-modifier to v3 and dependents
Gaurav0 Nov 9, 2024
e9fa9e2
bump version
Gaurav0 Nov 9, 2024
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',
},
},
],
};
89 changes: 70 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ name: CI
on:
push:
branches:
- master
- '*'
tags:
- '*'
pull_request:
branches:
- '*'

jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 16
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Lint
Expand All @@ -33,11 +37,13 @@ jobs:
- test
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 16
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
Expand All @@ -58,14 +64,12 @@ jobs:
allow-failure:
- false
scenario:
- ember-lts-3.16
- ember-lts-3.20
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-release
- ember-beta
- ember-canary
- ember-lts-4.8
#- ember-lts-4.12 # fails due to bug: https://github.com/emberjs/ember.js/issues/20377
- ember-lts-5.4
- ember-lts-5.8
- ember-default-with-jquery
- ember-classic
- embroider-safe
Expand All @@ -86,23 +90,70 @@ jobs:
- scenario: ember-lts-3.28
browser: Firefox
bootstrap: 5
- scenario: ember-lts-4.4
- scenario: ember-lts-4.8
browser: Firefox
bootstrap: 3
- scenario: ember-lts-4.8
browser: Firefox
bootstrap: 4
- scenario: ember-lts-4.8
browser: Firefox
bootstrap: 5
- scenario: ember-lts-5.8
browser: Firefox
bootstrap: 3
- scenario: ember-lts-4.4
- scenario: ember-lts-5.8
browser: Firefox
bootstrap: 4
- scenario: ember-lts-4.4
- scenario: ember-lts-5.8
browser: Firefox
bootstrap: 5
- scenario: node-tests
- scenario: ember-release
browser: Chrome
bootstrap: 3
allow-failure: true
- scenario: ember-release
browser: Chrome
bootstrap: 4
allow-failure: true
- scenario: ember-release
browser: Chrome
bootstrap: 5
allow-failure: true
- scenario: ember-beta
browser: Chrome
bootstrap: 3
allow-failure: true
- scenario: ember-beta
browser: Chrome
bootstrap: 4
allow-failure: true
- scenario: ember-beta
browser: Chrome
bootstrap: 5
allow-failure: true
- scenario: ember-canary
browser: Chrome
bootstrap: 3
allow-failure: true
- scenario: ember-canary
browser: Chrome
bootstrap: 4
allow-failure: true
- scenario: ember-canary
browser: Chrome
bootstrap: 5
allow-failure: true
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 16
- name: Setup yarn
run: npm install -g yarn
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Test
Expand Down
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}}
>
{{#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>
{{else}}
<Button @type="primary" @onClick={{@onClose}}>{{bs-default @closeTitle "Ok"}}</Button>
{{/if}}
Expand Down
Loading