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

The examples are slightly bit rotten :) #1289

Closed
1 task done
numerodix opened this issue Jun 6, 2020 · 11 comments · Fixed by #1559
Closed
1 task done

The examples are slightly bit rotten :) #1289

numerodix opened this issue Jun 6, 2020 · 11 comments · Fixed by #1559
Labels
A-examples Area: The examples bug

Comments

@numerodix
Copy link
Contributor

numerodix commented Jun 6, 2020

Problem
I'm perusing the examples (and there are many!) finding that it's a bit hard to get them to run. A number of examples are missing a README that explains what is being demonstrated, and some are missing an appropriate index.html to easily run them (or the index.html inside static/ doesn't match the code properly etc). The ones that do are missing style sheets, which makes them appear "broken" (in the sense that they don't look the way the author probably intended?) and don't demonstrate their use case effectively.

This is all based on running ./build.sh <example_name> as instructed by the README.

Environment:

  • Yew version: master
  • Rust version: rustc 1.45.0-nightly (5fd2f06e9 2020-05-31)

Questionnaire

  • I'd be happy to fix some of them (the examples I can figure out myself), but I'd like to know if there are any other plans/efforts for them at this time?

Also: What do you think about adding some stylesheets (eg. bootstrap) to the examples to make them easier to look at?

@numerodix numerodix added the bug label Jun 6, 2020
@numerodix numerodix changed the title The example are slightly bit rotten :) The examples are slightly bit rotten :) Jun 6, 2020
@jstarry
Copy link
Member

jstarry commented Jun 8, 2020

@numerodix indeed they are a bit rotten! 👃 🤮

Fixes would be welcome, @ZainlessBrombie started on something quite similar here: #1016 so it would be nice to see if they have anything to share first before styling it all

In the meantime..

missing a README that explains what is being demonstrated

the index.html inside static/ doesn't match the code properly etc

Fixes for stuff like this would be awesome!

@jstarry jstarry added the A-examples Area: The examples label Jun 8, 2020
@jstarry
Copy link
Member

jstarry commented Jun 8, 2020

And by the way, I wouldn't be opposed to combining the micro-examples into a mono-example 😉 Preferably in a single cargo project

@teymour-aldridge
Copy link
Contributor

Should these two issues be combined into a single tracking issue to make things clearer?

@numerodix
Copy link
Contributor Author

Yeah, they probably should. I opened this issue without knowing about @ZainlessBrombie's initiative. It looks like zainless has bigger plans anyway, so I'm happy to let zainless take care of it.

I was just planning to make some minor fixes to make the examples work in the event that noone else was doing the same.

@teymour-aldridge
Copy link
Contributor

There's a lot of examples, so I'm sure if you want to contribute to them you can!

@ZainlessBrombie
Copy link
Collaborator

Hey there! Sorry for being away some time, I had a bit of a tough time but I'm back on track now (Though on a business trip for another week) :)
Just wanted to give y'all a life sign ;)

PS: Really happy about the survey results ☺️

@jstarry
Copy link
Member

jstarry commented Jun 14, 2020

@numerodix feel free to make incremental improvements in the meantime! We can always resolve merge conflicts, not a big deal :)

@numerodix
Copy link
Contributor Author

Thanks for the encouragement!

I'd like to make some incremental improvements just to get the examples working and make it obvious what they are trying to demonstrate.

@EvanCarroll
Copy link

yewstack/docs#105

@EvanCarroll
Copy link

Do any of the examples work and demonstrate best practices?

@numerodix
Copy link
Contributor Author

I'd say about half of them work out of the box (when I first tried a couple of weeks ago). The plan is to make them all work.

jstarry pushed a commit that referenced this issue Jun 26, 2020
* Update run instructions

`python3 -m http.server --directory` flag was added in Python 3.7.
Change instructions to cd into static and skip the flag instead -
makes it work with earlier Pythons too.

* Add visual feedback for button click

The minimal example has a button, but clicking it does nothing. This
makes it hard to tell whether the example works or not.

This adds a label that is update when the button is clicked.

* Small improvements to crm example

* Add a heading to each scene to make it more obvious what the page is
for.

* Improve layout of input form by stack the inputs vertically.

* Add a little space between entries when displaying the list.

* Add a hint to the Description input that Markdown can be used.

* Add an explanation to the file_upload example

* Clarify purpose of var in fragments example

* Improve futures_wp example

* Add a second button that demonstrates an unsuccessful fetch.

* Render the markdown document (since we're fetching markdown after
all).

* Remove vague comment that's not really helping.

* Improve inner_html example

* Include a textual explanation of what the example is doing.

* Run cargo fmt

* Remove 'static lifetime for constant

* Improve suggestion in inner_html example

* move markdown.rs to a common crate

* add description to common Cargo.toml

* PR feedback

* PR feedback

* remove static lifetime annotation
@siku2 siku2 mentioned this issue Sep 15, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-examples Area: The examples bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants