plotly / plotly/dash

Allow broadcasting single value over props matched in ALL wildcard

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

Nobody has claimed this yet.

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

Description

Thanks so much for your interest in Dash!

Before posting an issue here, please check the Dash community forum to see if the topic has already been discussed. The community forum is also great for implementation questions. When in doubt, please feel free to just post the issue here :)
Nothing relevant found when searching for ALL or broadcast.

Is your feature request related to a problem? Please describe.
Sometimes I want to output the same value to every prop matched by the ALL wildcard (for example cleaning a form with Nones after submission). Right now I either have to hardcode the number of props, or use something like len(dash.ctx.outputs_list[0]) to obtain it, which instead hard-codes the order of the Output in the callback signature. Both of these approaches are prone to breakage when either the layout or callback signature changes. The second one also feels like an unnecessary boiler plate. More so, unnecessary data are transmitted.

Describe the solution you'd like
The output could be wrapped in something like a Broadcast wrapper, which would signal to dash that the outputted value should be broadcasted to every matched prop instead of being treated as an array with one value per prop.

Describe alternatives you've considered
New wildcard, perhaps called ALLBROADCAST, could be used for this. But this has the problem that it is not possible to chose whether to broadcast or not based on logic within the callback.

Additional context
None

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

No files, tests, or entry points are named in the issue. Start by tracing Dash's handling of callback outputs matched by the ALL wildcard, then define and test a callback-level way to broadcast one value without transmitting redundant data or depending on output order.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.