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

Add example to ViewSwitcher #1822

Merged
merged 2 commits into from
Jun 19, 2021
Merged

Add example to ViewSwitcher #1822

merged 2 commits into from
Jun 19, 2021

Conversation

arifd
Copy link
Contributor

@arifd arifd commented Jun 7, 2021

Let me know if you don't like it, I should modify anything? I'm hoping to add examples to many more areas of Druid that could benefit from them.

@arifd
Copy link
Contributor Author

arifd commented Jun 8, 2021

I have been thinking and talking about this here

And it is maybe worth considering that a proper documenting strategy should be born.

Tbh, even though it's kind of common sense, as per Rust's guidelines, I think the current PR fails [at least one code example that users can copy/paste to try it] Because it cannot be copy/pasted without the user knowing that he has to lens onto Foo. Also, Foo does not offer any meaningful example. Thus it is not realworld, it is ugly, and was lazy of me (sorry) truth be told.

@jneem
Copy link
Collaborator

jneem commented Jun 12, 2021

Did you reach a conclusion about this? FWIW, I don't think it's necessary to have a main, because if you repeat that for every example, it's a lot of boilerplate...

@arifd
Copy link
Contributor Author

arifd commented Jun 12, 2021

There has been no feedback to date. And so it's kind of stuck.

@jneem
Copy link
Collaborator

jneem commented Jun 15, 2021

Well in that case I suggest we just merge it. Having an example is clearly better than not having one, so there's no point in being stuck on it. Any objections? (edited to add: if there aren't any by tomorrow, I'll merge it)

@maan2003
Copy link
Collaborator

the example should be in top level docs of ViewSwitcher not ViewSwitcher::new?

@arifd
Copy link
Contributor Author

arifd commented Jun 16, 2021 via email

@maan2003
Copy link
Collaborator

Merging, as no objections

@maan2003 maan2003 merged commit dfd105e into linebender:master Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants