Skip to content

[Docs]: navset_card, navset_card_tab, and navset_tab_card #2037

@lachlansimpson

Description

@lachlansimpson

Type

Other

Location

https://shiny.posit.co/py/layouts/tabs/#card-with-a-tabbed-tabset

Issue

Outdated

Suggested Changes

Not sure which of navset_card, navset_card_tab, and navset_tab_card is true any more?

Looks like it was originally navset_tab_card, but was changed to navset_card_tab in this commit, August 2023.
57f6ba5

It then looks like navset_card_tab was changed to navset_card in this commit from December 2023
0c03567

There are still a large number of references to navset_card_tab in the documentation:
https://github.com/search?q=repo%3Aposit-dev%2Fpy-shiny+navset_card&type=code

This is also true of the py-shiny-site:
https://github.com/search?q=repo%3Aposit-dev%2Fpy-shiny-site%20navset_card&type=code

Motivation (Optional)

Customer wrote in after a Connect migration asking why their app wasn't starting. The error is:

2025/07/18 19:24:48.044037160 [rsc-session] Content GUID: 0910e7c4-a792-4069-bafe-774b191dca4d
2025/07/18 19:24:48.044092009 [rsc-session] Content ID: 2754
2025/07/18 19:24:48.044108114 [rsc-session] Bundle ID: 24365
2025/07/18 19:24:48.044120118 [rsc-session] Job Key: PGJdsd2l2HPY5yF9
2025/07/18 19:24:48.159011512 Running on host: HOSTNAME
2025/07/18 19:24:48.164497501 Linux distribution: Red Hat Enterprise Linux release 8.10 (Ootpa)
2025/07/18 19:24:48.167202458 Running as user: uid=495(rstudio-connect) gid=494(rstudio-connect) groups=494(rstudio-connect)
2025/07/18 19:24:48.167210540 Connect version: 2024.02.0
2025/07/18 19:24:48.167254752 LANG: en_US.UTF-8
2025/07/18 19:24:48.167258259 Working directory: /opt/rstudio-connect/mnt/app
2025/07/18 19:24:48.167304683 Bootstrapping environment using Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18) [GCC 10.3.0] at /opt/python/3.8.13/bin/python3.8
2025/07/18 19:24:48.167435260 Running content with the Python virtual environment /opt/rstudio-connect/mnt/app/python/env (/opt/rstudio-connect/mnt/python-environments/pip/3.8.13/08yKSMoAbmoSb5z0dmgkdA)
2025/07/18 19:24:49.068997834 Running content using Python "3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:18)  [GCC 10.3.0]" at "/opt/rstudio-connect/mnt/app/python/env/bin/python"
2025/07/18 19:24:49.069107488 Loading code from "App"
2025/07/18 19:24:50.254075121 [WARN] pyarrow is not installed by default since databricks-sql-connector 4.0.0,any arrow specific api (e.g. fetchmany_arrow) and cloud fetch will be disabled.If you need these features, please run pip install pyarrow or pip install databricks-sql-connector[pyarrow] to install
2025/07/18 19:24:51.413642719 /opt/rstudio-connect/python/connect_fastapi_runtime.py:9: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
2025/07/18 19:24:51.413656680   from pkg_resources import parse_version
2025/07/18 19:24:51.413746055 Unexpected error while running Python API: module 'shiny.ui' has no attribute 'navset_tab_card'
2025/07/18 19:24:51.413747564 Traceback (most recent call last):
2025/07/18 19:24:51.413779837   File "/opt/rstudio-connect/python/connect_fastapi_runtime.py", line 544, in <module>
2025/07/18 19:24:51.413785839     main(sys.argv)
2025/07/18 19:24:51.413857992   File "/opt/rstudio-connect/python/connect_fastapi_runtime.py", line 470, in main
2025/07/18 19:24:51.413861507     user_app = import_app(entrypoint, app_mode)
2025/07/18 19:24:51.413907188   File "/opt/rstudio-connect/python/connect_common_runtime.py", line 124, in import_app
2025/07/18 19:24:51.413918679     module = import_module(module_name)
2025/07/18 19:24:51.413919840   File "/opt/python/3.8.13/lib/python3.8/importlib/__init__.py", line 127, in import_module
2025/07/18 19:24:51.413948845     return _bootstrap._gcd_import(name[level:], package, level)
2025/07/18 19:24:51.413950662   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2025/07/18 19:24:51.413980693   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2025/07/18 19:24:51.413994678   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2025/07/18 19:24:51.413996144   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2025/07/18 19:24:51.414016895   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
2025/07/18 19:24:51.414017554   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2025/07/18 19:24:51.414035504   File "/opt/rstudio-connect/mnt/app/App.py", line 57, in <module>
2025/07/18 19:24:51.414036124     ui.navset_tab_card(
2025/07/18 19:24:51.414052843 AttributeError: module 'shiny.ui' has no attribute 'navset_tab_card'

Shiny Version (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions