Thanks for your interest in helping improve the Streamlit Navigation Bar! This guide is for people who want to contribute code to the project. There are other ways to contribute, such as reporting a bug or requesting a feature. You can also just ask a question, or join the discussions in the community forum. Note that we have a code of conduct, please follow it in all your interactions with the project.
If your contribution is more than a few lines of code, then prior to starting to code on it please post in the respective issue saying you want to volunteer, and then wait for a positive response. If there is no issue for it yet, create it first. This helps make sure:
- Two people aren't working on the same thing
- This is something the project's maintainers believe should be implemented or fixed
- Any API, UI, or deeper architectural changes that need to be implemented have been fully thought through by the project's maintainers
- Your time is well spent!
We use Black, with a line length of 80, to format the code. Besides that, Streamlit's oficial style guide is followed throughout the project.
Ensure you have Python 3.8+, Node.js and npm installed.
- Fork the repository via the user interface on GitHub and then do the following:
git clone https://github.com/${YOUR_NAME}/streamlit-navigation-bar.git
cd streamlit-navigation-bar
git remote add remote https://github.com/gabrieltempass/streamlit-navigation-bar.git
git checkout develop
git submodule update --init
git checkout -b ${BRANCH_NAME}
- Go to the
frontend
directory and initialize and run the component frontend:
cd streamlit_navigation_bar/frontend
npm install
npm run dev
- From a separate terminal, go to the repository root directory, create a new Python virtual environment, activate it and install Streamlit, st-theme and the directory as an editable package:
cd streamlit-navigation-bar
python3 -m venv venv
. venv/bin/activate
pip install streamlit
pip install st-theme
pip install -e .
Still from the same separate terminal, run the example Streamlit app:
streamlit run streamlit_navigation_bar/example.py
If all goes well, you should see something like this:
Modify the frontend code at
streamlit_navigation_bar/frontend/src/StNavbar.vue
.
Modify the Python code at streamlit_navigation_bar/__init__.py
.
- Submit your pull request.