Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More examples for widgets and apps #224

Open
KronosTheLate opened this issue Jun 8, 2023 · 3 comments
Open

More examples for widgets and apps #224

KronosTheLate opened this issue Jun 8, 2023 · 3 comments

Comments

@KronosTheLate
Copy link
Contributor

The app and widget functionality looks pretty awesome. However, in testing, I keep running into problems doing what I want. I think more examples would be helpful. Perhaps a grid containing one of each predefined widget?

@KronosTheLate
Copy link
Contributor Author

One of the specific things I am having issue with is defining multiple menus. I currently only get the selection from the final menu if I include multi-select and simplemenu in one.

@KronosTheLate
Copy link
Contributor Author

Below is a more complicated example of the type I am looking for (only that it does not work xD)

App(
    :(a(10, 0.2) * b(10, 0.2) * c(10, 0.2) * (d1(5, 0.2)/d2(5, 0.5))); 
    widgets = Dict(
        :a => MultiSelectMenu(["Option 1", "Option 2", "Option 3"]),
        :b => ButtonsMenu(["Option 1", "Option 2", "Option 3"]),
        :c => SimpleMenu(["Option 1", "Option 2", "Option 3"]),
        :d1 => ToggleButton("ToggleButton"),
        :d2 => Button("Button"),
    ), transition_rules = Dict(
        ArrowRight() => Dict(:a => :b, :b=>:c),
        ArrowLeft() => Dict(:c => :b, :b=>:a),
    )
) |> play

A full gallery would actually be super-cool.

@KronosTheLate
Copy link
Contributor Author

Another specific thing I would love to see an example of is something that updates live, like a plot, based on some parameter that is changable in real-time, such as a multi-select menu or button. One of my use-cases is to make a terminal-based oscilloscope and function generator interface, where I want to change frequencies, amplitudes, etc, and have visual feedback (current parameters of generated waveform, a live updating oscilloscope trace, etc). Particularily a Sixel-based integrated and live-updating plot would be nice. Perhaps updating with the passage of time, with a frequency settable by arrow up/down.

I know I am just asking for a lot of work here, and I do not expect it for free. This is why I put significant time into figuring out the transition rules myself, and contribute a PR instead. But that work is a lot easier if there was some set of examples that show how to perform the individual tasks I am looking for, which is what this issue is all about. I want to say that I am psyked by the potential of terminal apps, which is why I am going a little overboard with issues and PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant