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

Deprecate Bootstrap CSS, fonts, and theme import #2063

Open
jelhan opened this issue Jan 8, 2024 · 0 comments
Open

Deprecate Bootstrap CSS, fonts, and theme import #2063

jelhan opened this issue Jan 8, 2024 · 0 comments
Labels

Comments

@jelhan
Copy link
Contributor

jelhan commented Jan 8, 2024

Ember Bootstrap currently supports importing Bootstrap's CSS, fonts, and theme into the consuming app. It is controlled by configuration options importBootstrapCSS, importBootstrapFonts, and importBootstrapTheme.

We decided to drop this functionality when migrating to a v2 addon (#1980). To prepare that migration and give users some time to refactor, we should deprecate it as soon as possible.

When Bootstrap's CSS, fonts, or theme is imported, Ember Bootstrap should log a deprecation message at build-time. The logic can be added at the respective places of index.html. E.g. for importing Bootstrap's CSS it can go here:

ember-bootstrap/index.js

Lines 92 to 98 in c963f59

if (options.importBootstrapCSS) {
this.needsBootstrapStyles = true;
this.import(path.join(vendorPath, 'bootstrap.css'));
this.import(path.join(vendorPath, 'bootstrap.css.map'), {
destDir: 'assets',
});
}

The deprecation message should educate the developer about the recommended path forward. It should at least include Ember's recommended way today. It may additionally mention best practices for Embroider apps. Additionally it should include required configuration changes to Ember Bootstrap. For importing Bootstrap's CSS a deprecation message may be like the following:

Importing Bootstrap CSS through Ember Bootstrap is deprecated. Application should import Bootstrap's CSS explicitly. Please find information how to do so in the Ember guides: https://guides.emberjs.com/release/addons-and-dependencies/#toc_css Additionally set importBootstrapCSS configuration of Ember Bootstrap in your app's ember-cli-build.js to false. Please find more information about Ember Bootstrap's configuration here: https://www.ember-bootstrap.com/getting-started/setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant