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 code examples to the docs of TextBox #2284

Merged
merged 11 commits into from
Dec 1, 2022

Conversation

ThomasMcandrew
Copy link
Contributor

Hey all,
I am new to Druid and fairly new to rust in general but I like this UI framework the best. I wanted some documentation so I figured I could just write it.
I can do it for all of them but I wanted to get one done and get feedback on how you want the documentation to look.
I think examples are the most helpful for myself so I focused on that the most.

Please give feedback I want to make the documentation best that it can be and I am new-ish to writing documentation for others, so critiques are helpful.

@jneem jneem added the 0.8 label Nov 27, 2022
@xStrom xStrom added docs concerns documentation S-needs-review waits for review labels Nov 27, 2022
@xStrom
Copy link
Member

xStrom commented Nov 27, 2022

Thank you for your effort!

I haven't looked at the substance of this PR yet, but please do the following:

  • Rebase on master so that we can run the tests (The errors seen here are fixed in master)
  • Define the links at the bottom of CHANGELOG.md, i.e. your name and the issue number (These aren't automatic ☹️)

@ThomasMcandrew
Copy link
Contributor Author

@xStrom thanks for helping me! I think I did it all good with the change log, let me know if there is more to add or if I put something in an incorrect place!

CHANGELOG.md Outdated
@@ -150,6 +150,7 @@ You can find its changes [documented below](#070---2021-01-01).
- Update docs of `RawLabel`: does not require `ArcStr`([#1886] by [@Maan2003])
- Fix `Controller` links for `Click` ([#2158] by [@yrns])
- Delete inaccurate line for `KeyEvent` ([#2247] by [@amtep])
- Added examples in `TextBox` ([#2284] by [@ThomasMcAndrew])
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm actually not sure if github markdown's links are case sensitive. But probably "andrew" is better just to be safe...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jneem Good catch, Thanks!

@jneem jneem removed the S-needs-review waits for review label Nov 30, 2022
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

I have one little nitpick but otherwise looks good.

///
/// //will wrap for each line
/// let wrap_multi_line_text_box = TextBox::multiline()
/// .with_line_wrapping(true) // this is default can be removed for the same result
Copy link
Member

Choose a reason for hiding this comment

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

Let's add either a comma or and after the word default

@xStrom xStrom changed the title Docs/textbox Add code examples to the docs of TextBox Dec 1, 2022
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Thanks! This is now good to merge.

@xStrom xStrom merged commit 7d24b55 into linebender:master Dec 1, 2022
@xStrom xStrom removed the 0.8 label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs concerns documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants