Skip to content

[Content]: Remove the useSubmission/useSubmissions section in the action reference #1003

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

Open
amirhhashemi opened this issue Jan 3, 2025 · 2 comments
Assignees
Labels
help wanted Looking for assistance on this issue solid-router Related to Solid Router

Comments

@amirhhashemi
Copy link
Collaborator

amirhhashemi commented Jan 3, 2025

📚 Subject area/topic

Reference

📋 Page(s) affected (or suggested, for new content)

https://docs.solidjs.com/solid-router/reference/data-apis/action

📋 Description of content that is out-of-date or incorrect

I think the section on useSubmission/useSubmissions in the action reference page is a bit unnecessary for a few reasons:

  1. Both useSubmission and useSubmissions already have their own detailed reference pages.
  2. The description there doesn’t really do them justice. They're not just for optimistic updates; they can also handle errors and show pending UI. It’d make more sense to put that info in other guides or reference pages.
  3. I checked out the Diataxis Reference Guide (which I assume you use it a reference for writing reference pages), and it says not to mix explanations in reference pages. This section feels more like an explanation to me.

So, I suggest we just remove this section.

Feel free to assign this task to me if you wish.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@amirhhashemi amirhhashemi added the pending review Awaiting review by team members. label Jan 3, 2025
@LadyBluenotes LadyBluenotes added help wanted Looking for assistance on this issue solid-router Related to Solid Router and removed pending review Awaiting review by team members. labels Mar 8, 2025
@LadyBluenotes
Copy link
Member

Coming back to this issue, I think the intention was to create a guide more tailored to useSubmission/useSubmissions (correct me if I'm wrong). I believe addressing #1024 is also related to this,

I think in creating a guide tailored for this (as well as updating the useSubmission(s) pages), we could effectively address both of these issues and the concerns within them. I know that we introduced the Actions page but I don't feel it adequately addresses either issue much (if at all) and therefore having something a bit more intentional might help fix it.

I'd be curious to know what your thoughts are on this, and I'm happy to defer to your judgement, too!

@amirhhashemi
Copy link
Collaborator Author

amirhhashemi commented May 2, 2025

You are correct. We have three related issues to address: this one, #1024, and #1026.

The reference pages for useSubmission and useSubmissions do not align well with the Diataxis framework and contain a mix of explanations and how-to guides. Particularly the sections on Optimistic Updates and Error Handling. I think we should move these sections into a dedicated guide about submissions. This change would allow us to rewrite the content to focus more on actions instead of forms and align it better with the Diataxis framework.

I believe the best placement for this guide is actually on the Actions page. We could expand it to include information about useAction, as well as guidance on performing optimistic updates and handling errors.

Once we make these changes, we can easily close this issue.

I would be happy to start working on it.

For clarification, when I refer to a "guide" in this context, I don't mean the "how-to guides" defined in the Diataxis framework. An "explanation" would be more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Looking for assistance on this issue solid-router Related to Solid Router
Projects
None yet
Development

No branches or pull requests

2 participants