From b42e411c0601b4830a263cc28f9df9cdbe1db024 Mon Sep 17 00:00:00 2001 From: Nikalexis Nikos Date: Thu, 9 Apr 2020 20:37:59 +0300 Subject: [PATCH 1/2] Sort also the directory name for proper ordering between css and js plugin folders --- dash/dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/dash.py b/dash/dash.py index 09b0ae61eb..e6acabee63 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -1001,7 +1001,7 @@ def _walk_assets_directory(self): ignore_str = self.config.assets_ignore ignore_filter = re.compile(ignore_str) if ignore_str else None - for current, _, files in os.walk(walk_dir): + for current, _, files in sorted(os.walk(walk_dir)): if current == walk_dir: base = "" else: From 52eb81c50f6646b28aed1dfaf90c4a91bfa63e31 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Fri, 15 May 2020 14:48:44 -0400 Subject: [PATCH 2/2] changelog for asset directory sorting --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 884d5b3757..de8d84ce38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [#1249](https://github.com/plotly/dash/pull/1249) Fixes [#919](https://github.com/plotly/dash/issues/919) so `dash.testing` is compatible with more `pytest` plugins, particularly `pytest-flake8` and `pytest-black`. - [#1248](https://github.com/plotly/dash/pull/1248) Fixes [#1245](https://github.com/plotly/dash/issues/1245), so you can use prop persistence with components that have dict IDs, ie for pattern-matching callbacks. +- [#1185](https://github.com/plotly/dash/pull/1185) Sort asset directories, same as we sort files inside those directories. This way if you need your assets loaded in a certain order, you can add prefixes to subdirectory names and enforce that order. ## [1.12.0] - 2020-05-05 ### Added