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

Add "prefill" query parameter #43

Open
greenlucid opened this issue Sep 6, 2022 · 0 comments
Open

Add "prefill" query parameter #43

greenlucid opened this issue Sep 6, 2022 · 0 comments

Comments

@greenlucid
Copy link
Contributor

greenlucid commented Sep 6, 2022

The idea is to facilitate shipping decent-UX PoCs that are fast to build.
Some use cases (examples below) could really benefit from this.
The gist of it is: the query parameter(s) can be used to prefill some forms in the frontend, to make the experience seamless for those apps that didn't get time to fully implement Stake Curate functionality, like signing Stake Curate transactions, which is non-trivial (due to complexities like editions, etc)
This could also be a deliberate decision. e.g. app lives on a different chain than Stake Curate, app doesn't want to handle the complexity, etc.

Examples

Social Media App

User is in curated social media app. User reads a post that doesn't belong to a certain topic (e.g. contains spam). User clicks the tag in the post, because that's how you challenge. A text field pops right below, to prompt the user into writing the reason for the challenge. Like, quoting one of the rules of the topic.
After filling the stuff and clicking "Challenge in Stake Curate", the reason (this is, the link/identifier to the offender post, and the rule that is broken) is passed as a query parameter. The user finds himself in Stake Curate frontend, but all he has to do is connect to the Stake Curate chain if he hadn't yet, and click on "Challenge".

Whitelist Telegram

Similar flow. User sees offending message in group, that infringes one of the badges. User types
/challenge #noscam rule 1
And the bot replies with the link to Stake Curate frontend that automatically challenges the item (in this case, a badge) and prefills the reason.

This is not ideal (in this example, any chat user could see the challenge intent and frontrun it to snatch the reward)

Not just reason

This is not restricted to reasons. Prefill query parameters can be used to fill arbitrary fields to submit / edit items, for example.

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