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 the "keyed_list" example #1650

Merged
merged 10 commits into from
Nov 22, 2020
Merged

Improve the "keyed_list" example #1650

merged 10 commits into from
Nov 22, 2020

Conversation

titaneric
Copy link
Contributor

Description

This PR aim to improve all possible improvements listed in the README.
This work is done by adding new crate and bootstrap css template, not sure is it suitable or not, but I'm pretty sure the time duration is valid task (takes me LOTS of time).
Not a professional UI designer, I try my best to decorate the prior example.
Still new in Yew and Rust, hope this PR will help everyone.

Checklist

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

@siku2 siku2 added the A-examples Area: The examples label Nov 21, 2020
examples/keyed_list/src/main.rs Outdated Show resolved Hide resolved
</div>
<p>{ "Number of persons: " }{ self.persons.len() }</p>
<p>{ "Ids: " }{ ids }</p>
<p class="h5">{ "Number of persons: " }{ self.persons.len() }</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this depends on which version of English you use.

Suggested change
<p class="h5">{ "Number of persons: " }{ self.persons.len() }</p>
<p class="h5">{ "Number of people: " }{ self.persons.len() }</p>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure here, I leave it unchanged temporarily.

Co-authored-by: Teymour Aldridge <[email protected]>
Copy link
Member

@siku2 siku2 left a comment

Choose a reason for hiding this comment

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

The example looks great, love the use of the fake crate to generate better data!

examples/keyed_list/src/random.rs Outdated Show resolved Hide resolved
examples/keyed_list/src/person.rs Outdated Show resolved Hide resolved
examples/keyed_list/Cargo.toml Outdated Show resolved Hide resolved
examples/keyed_list/src/main.rs Outdated Show resolved Hide resolved
@titaneric
Copy link
Contributor Author

Already updated the code, please check

Copy link
Member

@siku2 siku2 left a comment

Choose a reason for hiding this comment

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

Looking good, just a few more formatting issues.

examples/keyed_list/src/main.rs Outdated Show resolved Hide resolved
examples/keyed_list/src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@siku2 siku2 left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot!
Our automatic deployment to examples.yew.rs broke a few days ago and I want to fix that before merging this. There's nothing you need to do though, just a heads up.

@siku2 siku2 merged commit 6ed5365 into yewstack:master Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-examples Area: The examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants