nilbuild / nilbuild/driver.js

Purely programmatic step?

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
26.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I would like to be able to include in my steps a step which doesn't render any popover, but only calls a function I've defined in the step (similar to onHighlightStarted or onDeselected). Is this possible in Driver 1.x? I would like to use this for setting up or tearing down application state.

I've read some tips about doing such work in my onHighlightStarted or onDeselected functions, but doing this will cause unwanted coupling between my steps. My steps list is dynamic (defined by admins) and could look like this:

...
- highlight a button
- open panel & highlight it
- highlight panel-part-1 
- highlight panel-part-2 [optional]
- highlight panel-part-3 [optional]
- close panel
- highlight another button
...

So it's for the close panel step that I want this purely programmatic step, because I cannot safely close it in the outgoing function of the panel-part-1|2|3 steps.

I only need a synchronous function today, but it would make sense for it to support async work for flexibility.

I would also be willing to help contribute a feature like this, if it doesn't exist yet.

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

Review the Driver 1.x step API and the existing onHighlightStarted and onDeselected callbacks first. Define how a step with no popover should invoke its function, including whether asynchronous work is supported, and verify that dynamic steps can use it to close the panel without coupling neighboring steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
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.