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

Idea: Linking to custom lessons #210

Open
Cannedfood opened this issue Jan 15, 2025 · 1 comment
Open

Idea: Linking to custom lessons #210

Cannedfood opened this issue Jan 15, 2025 · 1 comment

Comments

@Cannedfood
Copy link

For custom lesson authors, creating links that directly open a custom lesson on typey type would be very useful.

Example usecase:
I've been learning steno using lapwing theory, which has a short practice lesson at the end of every section.

The way you use those practice lessons is:

  • You click on the link, which leads to a text file
  • You navigate to typey-type, and search for the "custom lessons" section
  • Paste the content of the text file into the field
  • Set sort to random
  • Do the lesson

If the links could lead directly to the lesson on typey type, this would be much more ergonomic

Suggested solution:
Add an URL parameter for specifying a link to a text file, from which the lesson is loaded:

https://didoesdigital.com/typey-type/lessons/custom?some-url-parameter=https://lapwing.aerick.ca/practice/5-test.txt

Or the lesson could be specified in the url:

https://didoesdigital.com/typey-type/lessons/custom?words=32awefulblobofdataohno2356...

But I imagine this could run into some URL length limits.

Also, it might be good to have a user-friendly way to create these links. If the entire lesson is encoded in the URL, this could be as simple as adding a new button to the custom lesson text box:
image

@didoesdigital
Copy link
Owner

Thanks @Cannedfood, I think linking to custom lessons could be really powerful and interesting.

For the specific use case you've cited—Lapwing lessons—I think it will be better to add official Lapwing lessons to Typey Type. I've just opened an issue to capture where Lapwing support is at: #211

For the more general case of linking to custom lessons, I've seen good evidence that people like to keep their own custom lessons in spreadsheets and it would be good to reduce the friction for them to quickly start their favourite lessons. I also expect that it would be useful for people to share custom lessons with each other directly using links.

For the scenario of people quickly starting their own favourite lessons, we could also consider bookmarks, saving up to 10 named custom lessons using local storage (or indexeddb), and so on.

I'm keen to start with a small experiment using custom links and explore from there. Regarding your suggested solutions, I'd like to avoid trying to download files directly from other sites. Let's focus on specifying lessons in the URL.

While we could run into URL length limits, I think lessons that are long enough to hit URL limits are already likely to crash Typey Type. We could impose an arbitrary limit to start with like 500 words. In practice, I've found most people don't like doing long lessons (even if they end up typing more words, it seems like most people prefer to break it up, e.g. doing 100 words at a time instead of a 300-word lesson). Because these links will be long and visible, we might start even shorter like 100 words.

I can imagine two approaches to where the links might go:

  1. Linking directly to the lesson page so you can immediately start doing the lesson e.g. /typey-type/lessons/custom?words=hello
  2. Linking to the custom lesson setup page so you can see/edit the material then start it e.g. /typey-type/lessons/custom/setup?words=hello

The links themselves might also go to either just a word list or a full lesson of words and hints e.g.:

  1. http://localhost:3000/typey-type/lessons/custom/setup?words=hello,world
  2. http://localhost:3000/typey-type/lessons/custom/setup?material=hello%09H-L,world%09WORLD

I think the easiest place to start prototyping would be to focus on the setup page. It let's us experiment without affecting too much of the app.

Like the Lessons index page, editing the field could update the URL with a debounce. For words, that could look like this:

Setup page with test in the words field and words?=test in the address bar

This means that just to try out the flow as a proof of concept, we wouldn't need to add any buttons initially.

For material, that could look like this:

Setup page with hello H-L in the material field and material?=hello%09H-L in the address bar

Just a note, there's a related issue here #209 and there's also active work affecting the Lesson page here #208

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

2 participants