opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
42 stars 0 forks source link

onboarding flow after setup #10

Closed samuelstroschein closed 6 months ago

samuelstroschein commented 6 months ago

Problem

Users are overwhelmed on how to get started with paraglide JS after setting it up.

Proposal

Create an example code file after paraglide init that shows the user how to use paraglide js.

<script lang="ts">
  import * as m from "./paraglide/messages.js";

  // This is how you would use the messages in your code
  // (User will see sherlock inline annotations in action here providing an instant aha moment)
  m.happy_felix_elephant()

</script>

<!-- You can extract messages with Sherlock by highlighting the text  -->
<h1>About</h1>

cc @niklas.buchfink

linear[bot] commented 6 months ago

PARJS-22 onboarding flow after setup

NilsJacobsen commented 6 months ago

This could lead to a great wow moment when you get the example. 👍 Helps me understand how to replace hard-coded stuff.

For me when working with paraglide, the adapter setup was always the hardest bit. Could these examples help there, too?

LorisSigrist commented 6 months ago

What would you like to see from the Adaper setups? How could I make them clearer?

NilsJacobsen commented 6 months ago

I think the adapter pages/guides do an ok job (Lots of reading required). But the strategy of this issue is a show don't tell way, right? I was just wondering if the example can somehow help me with that too.

LorisSigrist commented 6 months ago

I'll see if I can do that for the adapters. I just implemented this suggestion on the Paraglide page & was also able to reduce the text significantly. The same can probably be done on the Adapter pages. Good Suggestion!