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

Streamlit Dark mode accessibility issue #14

Open
netnem opened this issue Apr 22, 2024 · 5 comments
Open

Streamlit Dark mode accessibility issue #14

netnem opened this issue Apr 22, 2024 · 5 comments

Comments

@netnem
Copy link

netnem commented Apr 22, 2024

image

Repo steps:

set .streamlit config.toml:

[theme]
base = 'dark'

Use default example for tree_select.

# Create nodes to display
nodes = [
    {"label": "Folder A", "value": "folder_a"},
    {
        "label": "Folder B",
        "value": "folder_b",
        "children": [
            {"label": "Sub-folder A", "value": "sub_a"},
            {"label": "Sub-folder B", "value": "sub_b"},
            {"label": "Sub-folder C", "value": "sub_c"},
        ],
    },
    {
        "label": "Folder C",
        "value": "folder_c",
        "children": [
            {"label": "Sub-folder D", "value": "sub_d"},
            {
                "label": "Sub-folder E",
                "value": "sub_e",
                "children": [
                    {"label": "Sub-sub-folder A", "value": "sub_sub_a"},
                    {"label": "Sub-sub-folder B", "value": "sub_sub_b"},
                ],
            },
            {"label": "Sub-folder F", "value": "sub_f"},
        ],
    },
]

return_select = tree_select(nodes)
st.write(return_select['checked'])

At least in this case, text should be white or to "follow streamlit theme"

@AndrewTruett
Copy link

It looks like they fixed this in #8, ~6 months ago, however the version on PyPi was released nearly 2 years ago. @Schluca do you think you could make a new release including the changes from #8?

@eleazargc
Copy link

Hi @Schluca loved the component however I would love to use it in dark mode. Could you please release the fix in PyPi. 🙏

@sumittongya
Copy link

replacing the file (https://github.com/Schluca/streamlit_tree_select/blob/main/streamlit_tree_select/frontend/public/react-checkbox-tree.css) at local under ../site-packages/streamlit_tree_select/frontend/build fixed issue of dark mode for me.

@alscjf1329
Copy link

@sumittongya

I hope there is no one who doesn't know this...

@BlueGob
Copy link
Contributor

BlueGob commented Feb 2, 2025

hello, i created a fork for this repo where i updated the dark mode problem and added the html parsing and i'm planning on maintaining the package
repo: https://github.com/BlueGob/streamlit_tree_selector
also i have uploaded the new package : https://pypi.org/project/streamlit-tree-selector/
just pip install streamlit-tree-selector and you can use it as the previous version

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

No branches or pull requests

6 participants