Repository navigation
Show: refuse a show.start from that is not a slide - #1228
Conversation
show.start {from} turned a negative or fractional index into slide 0 and an index past the end into a show that opened on the end screen, over the command and the control channel alike. Both now refuse it, as the slide commands do since storytold#1063; a hidden slide still plays.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Landed on main — thank you for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft |
show.startnow refuses afromthat is not a slide of the deck instead of quietly playing something else.Before,
{"from": -1},{"from": 1.5}or{"from": "1"}started the show on slide 0, and afrompast the end opened a show already on the end screen, with an ok answer both through the command and the control channel. Both paths now go through one check and answer with an error (`from` is not a valid index: -1,no slide 3), the same way the slide commands reject a bad index since #1063. A hidden slide is still accepted, since From Current Slide plays a hidden slide.from: nullnow means "nofrom" (the first slide of the show order) rather than slide 0; happy to switch if you'd rather keep that. With no document open,{"from": 0}now answersno slide 0instead of an ok that did nothing;show.start {}is unchanged. An unknowncustomshow name still does nothing silently; I left that alone here.Validation:
tests::show_start_refuses_a_from_that_is_not_a_slide: fails on main (show.start {"from": -1}answers ok and starts at slide 0), passes here{"ok":true,"result":null}for -1)cargo test -p deckcraft-ui-egui --lib -- show texture_limit slide_size,cargo clippy -p deckcraft-ui-egui --all-targets -- -D warnings,cargo fmt --all -- --checkSummary by CodeRabbit
Bug Fixes
Documentation