plotly / plotly/dash

Make Pages `dcc.Location` id public

Open
#2,708 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

The id of the dcc.Location component used in Pages is currently marked as non-public. However it's fairly common to see this id used in apps. Are there any issues with making the id public? What is the best practice for using dcc.Location in a Pages app?

Here are some options:

  1. Add your own dcc.Location to the app
  2. Use "_pages_location" in a callback
  3. Import the id variable name:
from dash.dash import _LOCATION_ID
  1. Create a new variable in Dash so it can be used like this:
from dash import <new variable name>

May need to update this example the docs after this is resolved

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Pages app's dcc.Location usage and the current _pages_location and _LOCATION_ID options described in the issue. Compare the four proposed approaches, then update the linked documentation example once a public API and best practice have been decided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.