-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
docs: refactor (WIP) #840
docs: refactor (WIP) #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this pull request! A maintainer will review it soon.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Pull Request Test Coverage Report for Build 7308254324
💛 - Coveralls |
Check this out, please @aidenybai, @SukkaW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a more fine-toothed run through of some other pages and here's some comments from there:
"Virtualization"
- I would replace
plays very well
- what do you mean to say by this? - I see
div
just under the heading "Example" that should be wrapped in backticks
Internals -> block()
- when referring to
props
, make sure that you whenever you're referring to it you are wrapping it in backticks. - Some sentences read choppy. I would try and find a way to avoid redundancy and make it a bit more straightforward. As an example:
The props are filled with `Hole` values. These `Hole` values are replaced with the actual values when the `block()` is called. The `Hole` values are immutable and cannot be derived with other values.
Internals - "Patch"
- Can shorten the following to something like what I wrote:
Always try to keep Blocks of the same shape (derived from the same function) when using patch in order to maintain good performance.
// to
Blocks must be derived from the same function when using `patch()`. This ensures performance is not negatively impacted.
Some comments I may've missed last time:
- When you are talking about something that may have it's own page, you should interlink it. This helps with SEO and it can provide users with a direct link to where they need to go should they have any further questions.
- With the few Internals you have, the warning should be a bit more specific (I listed the one I'm referring to before. The reason I say this is that users may come across this and be confused by what you mean. Are there any situations someone may be using the specific Internal API function's in an app? If not, the "should" can be removed in lieu of something a bit more specific:
This function is part of the internal API. You should only be using this if you are making your own framework.
// if you need to tell them explicitly "DONT USE"
This function is part of the internal API. It is intended for developers creating their own frameworks. It is not recommended for general use.
Again, let me know if you have any questions :)
website/pages/docs/guide.mdx
Outdated
); | ||
}) | ||
``` | ||
|
||
Blocks can be used just like a normal React component: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocks can be used just like a normal React component: | |
A block can be used within your application like a normal React component: |
website/pages/docs/guide.mdx
Outdated
); | ||
}) | ||
``` | ||
|
||
Blocks can be used just like a normal React component: | ||
|
||
```jsx {5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In thinking about this page I'm not sure how introducing a basic example here helps. Maybe once you start getting into describing what is happening after creating a block, bringing in this info can be helpful.
For example, with this being a tutorial you want to introduce concepts as you go. Remember that Diataxis offers the suggestion that a Tutorial's purpose is to give the user basic competency. This includes throwing in a bit of info here and there that can help comprehension.
If you want this to be a guide, however, you're taking the user through a series of instructions on how to achieve a final outcome (eg. how to create a block out of an existing application). You don't really need to add any further information than is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might suggest rethinking what you want out of this page (tutorial vs guide) and restructuring it based on that 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LadyBluenotes this is the one that prompted me to ask if we could have a meeting or just an async conversation around everything that needs major restructuring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
I'll make a separate comment regarding all the questions.
website/pages/docs/rules.mdx
Outdated
@@ -10,7 +10,7 @@ import { AutomaticModeWarning } from '../../components/automatic-mode-warning'; | |||
|
|||
<AutomaticModeWarning /> | |||
|
|||
You are probably here because you got a warning message in your console. | |||
When working with blocks, there are 3 common reasons you may encounter errors: | |||
|
|||
<Callout type="warning"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this needs to be an aside / what the purpose of this is.
If you want to show what an error message looks like, might be better to show what the console errors may look like.
website/pages/docs/rules.mdx
Outdated
3. You've entered **unsupported behavior.** | ||
1. Breaking [rules of blocks](/docs/rules#breaking-rules-of-blocks) | ||
2. Not [adding the compiler](/docs/rules#using-the-compiler) | ||
3. Encountering [unsupported behavior](/docs/rules#unsupported-behavior) | ||
|
||
## Breaking Rules of Blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments regarding this page:
- The Error messages are probably better suited for code blocks vs asides. This makes them look (imo) out of place, whereas a snippet of what the error message looks like in the console could be better.
A pattern you can follow:
When you have a block that is not declared as a variable, you may encounter an error message (or warning?):
`[Million.js] Block needs to be defined as a variable declaration.`
This message tells you that the compiler can not analyze the block correctly and ... [explain examples of why]
[insert examples of errors & corrections here]
- I tend to follow this example vs telling someone to "look above" because I want a page to have flow. Meaning you read it top to bottom. Now this is more personal preference, but I find having moving up and down the page to get context can be disorientating
- There's still some emojis on this page outside of code blocks I would remove. Using ❌ and ✅ are nice to emphasize points in code where italics and bolds can't be used
Hmm, thank you very much for these @LadyBluenotes, I'm gonna be adding these feedbacks soon to make the necessary updates. |
Thank you very much for the Google resource! |
Much appreciated. Thanks for this. |
You answered perfectly. Could you maybe forward those talks and maybe expatiate on the one-line thing? Thanks |
So re: structure of the pages. Tutorial & Guides Tutorials and guides are hard to distinguish (IMO) but they serve two very different things. They both, as an example of how they're similar, provide directions for the user to follow. They're used as a means to tell the user what to do more than what they need to know. They do, however, serve different needs. Tutorial
Guides
What I meant by the For example, you could split the page up because right now there is a lot happening within the one page and it's hard to follow. What I might do if I were you was:
I think this better represents Million and provides users an easier place to navigate. References: Now with regards to the With regards to internals: These are supposed to act as the source of truth for Million. For people who just want to get into the details of certain things, they can go here. This can include typing (if relevant), use cases, and possibly any edge cases that they may run into. These aren't intended to I think that you should introduce a general Regarding structure of them, they should all follow the same "recipe", if you will. I do think you do a pretty good job of this but you want to make sure that you add a bit more information, if possible. I know Solid has some pretty short pages, but having a good reference section can eliminate a lot of questions people ask. This can, hopefully, be shown when people are asking more specific / niche questions vs having to point them to different areas. I believe right now your Wrap up Now all of this is to say, I don't think what you have is bad by any stretch of the imagination, this is simply an observation from what I have seen. If I were to propose a layout change, I might suggest the following (this is just an idea you don't need to follow the names at all lol) _Getting Started_
Intro
Installation
_Basics_
How Million works
Block rules
Automatic Mode
Using with TypeScript
_Tutorial_
Integrate million into your existing project
_Guides_
Creating a block
Optimizing list rendering
Virtualized lists
_Reference_
`block`
`<For>`
`mount`
`patch`
`mapArray`
`renderToTemplate`
Again this is a very rough structure, so let me know if you have any specific questions on why. It might be a bit more work upfront, but I find it can help in the long run by making it easier to update the docs and, if you need to, remove things if you end up deprecating something. |
Hmm, thank you very much for this, Sarah. I really appreciate this. I'm gonna be making the updates this night after all my activities. Thank you very much for real @LadyBluenotes; you're super awesome! |
I'll be tackling this in tomorrow's stream!! Live |
Finally, the docs is done thanks to this live stream with I and @Drex72: https://www.youtube.com/watch?v=4YCwRDB8q70 So, we've been able to make updates to the docs and shipped a new and improved documentation for users of Million's tooling. Thank you @LadyBluenotes for being the best, @Drex72, @ricardonunez-io, @aidenybai! I'll merge this now |
This reverts commit f55b656.
* docs: refactor * chore: rearrange landing page to match astro * chore: make updates to introduction * chore: make website homepage update * chore: make website homepage update * chore: make updates to docs * chore: make docs updates * chore: make docs updates * chore: make docs updates * chore: make docs updates * chore: make docs updates * chore: make docs updates * fix: ugly cta on homepage * chore: add feedback from Sarah to docs updates * chore: pulling * chore: make updates on homepage and internals * chore: make changes to automatic mode, installation and index of docs * docs(refactor): make final docs updates
Please describe the changes this PR makes and why it should be merged:
This here will contain changes to the docs based on feedback gotten from Sarah Kim (From Solidjs)
Status
Semantic versioning classification: