Skip to content

Commit 8aa9ef3

Browse files
glsdowntcbegley
andauthored
Upgrade Icon Packages (#837)
* Add new CDN link for 6.1.1 * Update FA documentation links * Update demos to use inbuilt FA * Bump Bootstrap Icons to v1.8.1 Co-authored-by: Tom Begley <tomcbegley@gmail.com>
1 parent 2b04494 commit 8aa9ef3

File tree

8 files changed

+20
-16
lines changed

8 files changed

+20
-16
lines changed

R/icons.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#' @export'
22
dbcIcons <- list(
3-
BOOTSTRAP = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",
4-
FONT_AWESOME = "https://use.fontawesome.com/releases/v5.15.4/css/all.css"
3+
BOOTSTRAP = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css",
4+
FONT_AWESOME = "https://use.fontawesome.com/releases/v6.1.1/css/all.css"
55
)

dash_bootstrap_components/icons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BOOTSTRAP = (
2-
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/"
2+
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/"
33
"font/bootstrap-icons.css"
44
)
5-
FONT_AWESOME = "https://use.fontawesome.com/releases/v5.15.4/css/all.css"
5+
FONT_AWESOME = "https://use.fontawesome.com/releases/v6.1.1/css/all.css"

docs/content/docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ See the [Dash docs](https://dash.plotly.com/external-resources) for details on l
7070

7171
### Why aren't my icons appearing?
7272

73-
The CDN links for icons we include are for [Bootstrap Icons v1.5.0](https://icons.getbootstrap.com/) and [Font Awesome v5.15.4](https://fontawesome.com/). With either library, if you are trying to use an icon, and it simply isn't appearing, then please check which icon documentation version you are using. Both libraries add new icons regularly, and it may be that the icon you want has been renamed or isn't included in the versions we include listed above.
73+
The CDN links for icons we include are for [Bootstrap Icons v1.8.1](https://icons.getbootstrap.com/) and [Font Awesome v6.1.1](https://fontawesome.com/). With either library, if you are trying to use an icon, and it simply isn't appearing, then please check which icon documentation version you are using. Both libraries add new icons regularly, and it may be that the icon you want has been renamed or isn't included in the versions we include listed above.
7474

7575
### How do I create a multi-select?
7676

docs/content/docs/icons.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ There are a number of different icon libraries available, which you can link to
1212

1313
## Packaged CDN links
1414

15-
_dash-bootstrap-components_ contains CDN links for [Bootstrap Icons v1.5.0](https://icons.getbootstrap.com/) and [Font Awesome v5.15.4](https://fontawesome.com/), two libraries of icons you can use in your apps. You can use either of them by adding them to `external_stylesheets` when instantiating your app.
15+
_dash-bootstrap-components_ contains CDN links for [Bootstrap Icons v1.8.1](https://icons.getbootstrap.com/) and [Font Awesome v6.1.1](https://fontawesome.com/), two libraries of icons you can use in your apps. You can use either of them by adding them to `external_stylesheets` when instantiating your app.
1616

1717
Bootstrap Icons was developed by the Bootstrap team specifically for use with Bootstrap. There is excellent documentation on how to use them on the [Bootstrap website](https://icons.getbootstrap.com/#usage), and a small example below.
1818

19-
Font Awesome is perhaps the most widely used icon library and is very commonly used with Bootstrap. Usage is similar to Bootstrap Icons, check [their documentation](https://fontawesome.com/v5.15/how-to-use/on-the-web/referencing-icons/basic-use) for more details.
19+
Font Awesome is perhaps the most widely used icon library and is very commonly used with Bootstrap. Usage is similar to Bootstrap Icons, check [their documentation](https://fontawesome.com/docs/web/add-icons/how-to#add-icons-to-html) for more details.
2020

2121
With either library, if you are trying to use an icon, and it simply isn't appearing, then please check which icon documentation version you are using. Both libraries add new icons regularly, and it may be that the icon you want has been renamed or isn't included in the versions we include listed above.
2222

docs/demos/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .theme_explorer import app as theme_explorer
77

88
SERVE_LOCALLY = os.getenv("DBC_DOCS_MODE", "production") == "dev"
9-
FA = "https://use.fontawesome.com/releases/v5.15.3/css/all.css"
109

1110
SHEETS = [
1211
("bootstrap", dbc.themes.BOOTSTRAP),
@@ -43,7 +42,11 @@ def register_apps():
4342

4443
for name, sheet in SHEETS:
4544
new_theme_explorer = dash.Dash(
46-
external_stylesheets=[FA, sheet, "/static/loading.css"],
45+
external_stylesheets=[
46+
dbc.icons.FONT_AWESOME,
47+
sheet,
48+
"/static/loading.css",
49+
],
4750
requests_pathname_prefix=f"/docs/themes/explorer/{name}/",
4851
suppress_callback_exceptions=True,
4952
serve_locally=SERVE_LOCALLY,

examples/python/templates/multi-page-apps/collapsible-sidebar-with-icons/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
import dash_bootstrap_components as dbc
1717
from dash import Input, Output, dcc, html
1818

19-
FA = "https://use.fontawesome.com/releases/v5.15.1/css/all.css"
2019
PLOTLY_LOGO = "https://images.plot.ly/logo/new-branding/plotly-logomark.png"
2120

22-
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP, FA])
21+
app = dash.Dash(
22+
external_stylesheets=[dbc.themes.BOOTSTRAP, dbc.icons.FONT_AWESOME]
23+
)
2324

2425
sidebar = html.Div(
2526
[

examples/python/templates/multi-page-apps/sidebar-with-submenus/sidebar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
from dash import Input, Output, State, dcc, html
1616

1717
# link fontawesome to get the chevron icons
18-
FA = "https://use.fontawesome.com/releases/v5.8.1/css/all.css"
19-
20-
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP, FA])
18+
app = dash.Dash(
19+
external_stylesheets=[dbc.themes.BOOTSTRAP, dbc.icons.FONT_AWESOME]
20+
)
2121

2222
# the style arguments for the sidebar. We use position:fixed and a fixed width
2323
SIDEBAR_STYLE = {

jl/icons.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export dbc_icons
22

33
dbc_icons = (
4-
BOOTSTRAP = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",
5-
FONT_AWESOME = "https://use.fontawesome.com/releases/v5.15.4/css/all.css",
4+
BOOTSTRAP = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css",
5+
FONT_AWESOME = "https://use.fontawesome.com/releases/v6.1.1/css/all.css",
66
)

0 commit comments

Comments
 (0)