Replies: 1 comment 1 reply
-
|
I like this. It seems clean, but also, if you have a User Interface (UI), then the backend implementation can be hidden. Ideally the backend implementation is following a standard and has been thought through. I suppose I'm being as clear as mud, but I'm fine with you keeping Quarto fences as your backend implementation standard and then hiding and simplifying things on the front end. I need to kick the tires on surveydown and the UI to give you a better answer. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Right now we use Quarto fences (
:::) to denote pages in surveydown. You have to denote both the start and end of each page, like this:::: {.sd_page id=page1} This is the page 1 content ```{r} sd_next() ``` ::: ::: {.sd_page id=page2} This is the page 2 content :::In watching people make surveydown surveys, I've noticed two issues:
.sd-pagewith.sd_page, orid: welcomeinstead ofid=welcome:::at the end of the pageWith this in mind, I'm curious how people think about an alternative page syntax, something simpler and more shorthand. Here's an example:
With this syntax, we no longer need to remember the closing page
:::, and we no longer need to remember syntax like:vs=for the page ID. We just put the---followed by the page ID directly.In addition, notice how I included the
sd_next()in the first example, but not in the second. I think we could set it up so that a next button with a default label is always inserted at the end of the page if one is not detected. That way the user can avoid having to keep insertingsd_next()all the time. Most of the time respondents go to the next page anyway. Of course, if you had some custom logic where you wanted to change the next button label or go to a different page, you could still just usesd_next().Overall I think this would be a much simpler UI. The good news is I think we could achieve this while still remaining backwards compatible with the current syntax. We just update the lua filter we currently use to detect this. In fact, I think we could mix and match the two syntaxes and still make it work (though this would not be recommended).
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions