Skip to content

Add new parameter assets_path_ignore for dash.Dash() #3077

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 11 commits into
base: dev
Choose a base branch
from

Conversation

CNFeffery
Copy link
Contributor

Add new parameter assets_path_ignore to dash.Dash(), for the static resource directory, set several folders that need to be ignored during the initial automatic loading of static resources.

closes #3076

@gvwilson gvwilson added feature something new community community contribution P2 considered for next cycle labels Nov 15, 2024
@gvwilson gvwilson added P1 needed for current cycle and removed P2 considered for next cycle labels Mar 20, 2025
@CNFeffery
Copy link
Contributor Author

@T4rk1n Should I resubmit a PR for this feature to adapt to the latest version of Dash? This feature is very useful for those who want to quickly load static resources such as js on demand in a Dash application. For example, when building an online spreadsheet feature based on Univer in Dash, there are requirements for the loading order of relevant js dependencies. By adding the assets_path_ignore parameter, it is convenient to ensure that the js in the relevant static file directory will not be automatically loaded in a disorderly manner in advance during application initialization.

@@ -0,0 +1,3 @@
#normal-test-target {
background-color: rgba(255, 0, 0, 1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing endline at the end in the new assets files.

@T4rk1n
Copy link
Contributor

T4rk1n commented May 30, 2025

@T4rk1n Should I resubmit a PR for this feature to adapt to the latest version of Dash? This feature is very useful for those who want to quickly load static resources such as js on demand in a Dash application. For example, when building an online spreadsheet feature based on Univer in Dash, there are requirements for the loading order of relevant js dependencies. By adding the assets_path_ignore parameter, it is convenient to ensure that the js in the relevant static file directory will not be automatically loaded in a disorderly manner in advance during application initialization.

Yes, I want to include this in next release 3.1, up to you if you want to resolve the conflicts in this PR or a new one.

@T4rk1n
Copy link
Contributor

T4rk1n commented Jun 3, 2025

Look like the format check failed:

ERROR: "private::lint.black" exited with 1.

I changed the pre-commit hook to only lint staged files and should runs almost instantly for these cases now.

@CNFeffery
Copy link
Contributor Author

Look like the format check failed:

ERROR: "private::lint.black" exited with 1.

I changed the pre-commit hook to only lint staged files and should runs almost instantly for these cases now.

I can't figure out exactly what caused the code format check to fail 😢, I've used ruff to format related .py files.

@T4rk1n
Copy link
Contributor

T4rk1n commented Jun 3, 2025

Look like the format check failed:

ERROR: "private::lint.black" exited with 1.

I changed the pre-commit hook to only lint staged files and should runs almost instantly for these cases now.

I can't figure out exactly what caused the code format check to fail 😢, I've used ruff to format related .py files.

That is because we use black not ruff 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for ignoring specific folders under the assets directory
3 participants