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

How-to Guides #516

Open
bencroker opened this issue Jan 23, 2025 · 4 comments
Open

How-to Guides #516

bencroker opened this issue Jan 23, 2025 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@bencroker
Copy link
Collaborator

bencroker commented Jan 23, 2025

Dear community, we need HELP transforming the Examples section of the Datastar website into How-to guides.

Image

While the existing examples cover a lot of use-cases, they are unstructured, incomplete, poorly explained, and they would provide much more value as goal-oriented “recipes” that guide the reader towards a result.

Examples converted to How-to guides might read something like:

Click to Edit → Inline editing on click
Bulk Update → Bulk updating an item list
Click to Load → Load more results on click
Delete Row → Deleting a row in a table
...
Polling → Polling the backend at regular intervals
Bind Keys → Binding keydown events to specific keys
Classes → Toggling classes based on expressions
CSRF → Sending a CSRF token via a request header

Inspiration for this is taken from Diátaxis, specifically the section on How-to guides (please read before deciding to contribute).

If you would like to contribute, first check out the file changes in PR #517. You can propose a how-to guide that you’d like to write in a comment in this issue (not in the PR). Please propose one how-to guide at a time, and only propose a guide that you are willing to contribute a complete PR for.

To discuss ideas for how-to guides, please use the #documentation channel in the Datastar Discord server.

You should ideally be familiar with Datastar v1.0.0-beta.x and have already used it to build something. You should be comfortable writing markdown and willing to write some Go code for examples that require requests to the backend.

Proposals must follow this format:


TITLE: The title of the how-to guide you are proposing
SUMMARY: A brief summary of what it will cover
CODE SAMPLE: A code sample that it might use


If the proposal adheres to these key principles and generally aligns with the goal of this initiative, a file will be added to the PR and assigned to you. You can then fork the PR and work on your how-to guide in your own forked branch. When you feel it is ready for review, submit a pull request to PR #517.

Here is an example of a how-to guide that is a work in progress, for reference.

Please note that in the spirit of FOSS (free and open-source software), we reserve the freedom to decline suggestions and pull requests.

@bencroker bencroker added the enhancement New feature or request label Jan 23, 2025
@bencroker bencroker added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jan 23, 2025
@bencroker bencroker changed the title Community contributed How-to Guides How-to Guides Jan 26, 2025
@td0m
Copy link
Contributor

td0m commented Jan 26, 2025

I'm happy to contribute one for redirects :)

@bencroker
Copy link
Collaborator Author

bencroker commented Jan 26, 2025

I'm happy to contribute one for redirects :)

Sounds great, @td0m! I created How to redirect the page from the backend for you at https://github.com/starfederation/datastar/pull/517/files

@SpiralOSS
Copy link
Contributor

In for Hello World.

TITLE: Setting up the Hello World example
SUMMARY: A simple example that demonstrates streaming ServerSideEvents and reading signals.

@bencroker
Copy link
Collaborator Author

bencroker commented Jan 29, 2025

Excellent, @SpiralOSS! I created How to stream SSE events with a user-defined delay for you at https://github.com/starfederation/datastar/pull/517/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants