posit-dev / posit-dev/py-shiny

Feature request: set priority for events

Open
#916 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Description

Hi!

I think it would be helpful if we could pass priority as a kwarg to the @reactive.event decorator, much like it is currently implemented for reactive.Effect. This way, a user would be able to define a chain of reactions in a specific order to trigger on a single event.

Let's say an action button is clicked, a loading spinner is rendered, then some data are preprocessed, then some analyses are done, then a visualization is created and rendered, etc.

Contributor guide

No contributing guide indexed for this repository

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 comparing the reactive.event and reactive.Effect decorator entry points, focusing on how Effect currently accepts and applies priority. Trace the event-triggering flow and existing ordering behavior. Done means reactive.event accepts a priority kwarg and reactions triggered by one event run in the requested order, with coverage for the ordering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.