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

Improve grammar and paragraph structure in documentation #2620

Merged
merged 4 commits into from Apr 20, 2022

Conversation

WorldSEnder
Copy link
Member

@WorldSEnder WorldSEnder commented Apr 17, 2022

Description

Fixes #2573 @Madoshakalaka maybe you can test the new JetBrains templates and review them
Fixes #2180, i.e. #2178 (comment) (the offending sentence has been removed from the docs. It shall never be seen again. I think I know what it was meant to document, but I'm not sure if that "feature" is intended behaviour at this point)

This also slightly changes the keyed_list example. According to my tests, it did not actually perf-test the time it took for individual renders to happen. This now reports the time it takes from an initial view -> rendered of the wrapper class, which should be more reliable. To see that the current way is absurd, add a few thousand items to the live example and be surprised that it reports <100ms render times even as the browser visibly lags and stops to a crawl.

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code

@WorldSEnder WorldSEnder changed the title Read through the docs and correct spelling and grammar Improve grammar and paragraph structure in documentation Apr 17, 2022
github-actions[bot]
github-actions bot previously approved these changes Apr 17, 2022
github-actions[bot]
github-actions bot previously approved these changes Apr 17, 2022
@github-actions
Copy link

github-actions bot commented Apr 17, 2022

Visit the preview URL for this PR (updated for commit 96f36cb):

https://yew-rs--pr2620-improve-docs-6bp4ze8q.web.app

(expires Wed, 27 Apr 2022 08:25:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Apr 17, 2022

Size Comparison

examples master (KB) pull request (KB) diff
boids 173.225 173.225 0
contexts 110.501 110.501 0
counter 87.184 87.184 0
counter_functional 87.746 87.746 0
dyn_create_destroy_apps 90.268 90.268 0
file_upload 103.117 103.117 0
function_memory_game 167.623 167.623 0
function_router 353.295 353.295 0
function_todomvc 162.514 162.514 0
futures 226.903 226.903 0
game_of_life 108.204 108.204 0
inner_html 83.682 83.682 0
js_callback 113.266 113.266 0
keyed_list 196.121 196.095 -0.026
mount_point 86.707 86.707 0
nested_list 116.218 116.218 0
node_refs 90.077 90.077 0
password_strength 1539.661 1539.661 0
portals 97.286 97.286 0
router 319.138 319.138 0
simple_ssr 500.580 500.580 0
ssr_router 428.699 428.699 0
suspense 111.021 111.021 0
timer 89.899 89.899 0
todomvc 143.865 143.865 0
two_apps 87.772 87.772 0
webgl 87.358 87.358 0

Copy link
Contributor

@Madoshakalaka Madoshakalaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the JetBrains templates and they all work fine.

I was a bit confused when it required a Default trait property when rendered without explicit props, but I guess that's just a breaking behavior compared to 0.19? I didn't follow recent progress~

@WorldSEnder
Copy link
Member Author

I was a bit confused when it required a Default trait property when rendered without explicit props

@Madoshakalaka You might be misremembering, start_app requires COMP::Properties: Default already in 0.19. Thanks for taking the time to try out the macros.

Copy link
Member

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also

  • Rename "Function Components" in sidebar to "Components"
  • Rename "Intro With Basic Web Technologies" in sidebar to "Using Basic Web Technologies In Yew" combine "JavaScript with Rust" with it.
  • Reorder the concepts in the order they should read in
  • Remove use_<hook> page and instead use API docs for those. We shouldn't be documenting the API in the website1

Footnotes

  1. I added them in Add docs for Hooks  #1643. Maybe that wasn't the smartest move ever

website/docs/concepts/agents.mdx Outdated Show resolved Hide resolved
website/docs/concepts/basic-web-technologies/html.mdx Outdated Show resolved Hide resolved
Comment on lines 43 to 44
let combined_html: Html = html!{
<div>{header_html}{counter_html}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let combined_html: Html = html!{
<div>{header_html}{counter_html}</div>
let combined_html: Html = html! {
<div>{ header_html } { counter_html }</div>

Just some formatting

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a space behind html! but the other spaces might suggest spaces in the generated HTML, so I'd leave them out.

website/docs/getting-started/examples.mdx Outdated Show resolved Hide resolved
github-actions[bot]
github-actions bot previously approved these changes Apr 20, 2022
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
github-actions[bot]
github-actions bot previously approved these changes Apr 20, 2022
@WorldSEnder
Copy link
Member Author

  • Remove use_<hook> page and instead use API docs for those. We shouldn't be documenting the API in the website1

I'll leave that for a future PR. I think it would be nice to have the rust docs for master linked here, instead of the rust docs for the most-recently deployed version. That's a bit more effort than I can spend right now.

@hamza1311
Copy link
Member

  • Remove use_<hook> page and instead use API docs for those. We shouldn't be documenting the API in the website1

I'll leave that for a future PR. I think it would be nice to have the rust docs for master linked here, instead of the rust docs for the most-recently deployed version. That's a bit more effort than I can spend right now.

That's fine. I'll do that soon

I'm going to merge it now. If any docs changes are wanted later, those can come in separate PRs

@hamza1311 hamza1311 merged commit cd5b8a5 into yewstack:master Apr 20, 2022
@hamza1311 hamza1311 mentioned this pull request Apr 20, 2022
3 tasks
@WorldSEnder WorldSEnder deleted the improve-docs branch April 20, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra use line in component templates Add docs for html elements reusability
3 participants