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

[docsite] Break up first Maybe() example into three lines #161

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

cllns
Copy link
Member

@cllns cllns commented Jan 18, 2022

On medium (laptop-sized) screens, these lines break in a way that's hard to read. Since this is likely the very first time readers are seeing dry-monads in action, we should take particular attention to showing that the code is more readable and elegant than the procedural option shown before it.

The reason this happens is that the only space in the line is after the id:.

Before this PR:
image

After this PR:
image

On tiny (phone) screens, this long line of .maybe(&:method)s still breaks in a weird way. We could 'fix' that by putting each .maybe() on its own line and I'd be happy to do that, but we should do that uniformly across the docsite (all of the dry-rb docsites, ideally 😬 ) rather than just this one.

On smaller (laptop-sized) screens, these lines break
in a way that's hard to read. Since this is likely
the very first time readers are seeing dry-monads in
action, we should take particular attention to
showing that the code is _more_ readable and
elegant than the procedural option shown before it
@cllns cllns requested a review from solnic as a code owner January 18, 2022 14:57
@cllns cllns changed the title Break up first Maybe() example into three lines [docsite] Break up first Maybe() example into three lines Jan 18, 2022
@flash-gordon flash-gordon merged commit 46cc7b7 into dry-rb:master Jan 19, 2022
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.

2 participants