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

[4/5] Adding an object that tracks the scrolling state. #35

Merged
merged 13 commits into from
May 27, 2018

Conversation

mum4k
Copy link
Owner

@mum4k mum4k commented May 14, 2018

Works on #4

@mum4k mum4k self-assigned this May 14, 2018
@mum4k mum4k requested a review from chipmunkie May 14, 2018 21:40
@coveralls
Copy link

coveralls commented May 14, 2018

Pull Request Test Coverage Report for Build 61

  • 197 of 215 (91.63%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.9%) to 85.653%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/scroll.go 63 65 96.92%
widgets/text/text.go 134 150 89.33%
Totals Coverage Status
Change from base Build 52: 3.9%
Covered Lines: 1791
Relevant Lines: 2091

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 24

  • 63 of 65 (96.92%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 82.689%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/scroll.go 63 65 96.92%
Totals Coverage Status
Change from base Build 18: 0.5%
Covered Lines: 1605
Relevant Lines: 1941

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 24

  • 63 of 65 (96.92%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 82.689%

Changes Missing Coverage Covered Lines Changed/Added Lines %
widgets/text/scroll.go 63 65 96.92%
Totals Coverage Status
Change from base Build 18: 0.5%
Covered Lines: 1605
Relevant Lines: 1941

💛 - Coveralls

Copy link
Collaborator

@chipmunkie chipmunkie left a comment

Choose a reason for hiding this comment

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

This package is slightly abstract to follow. I believe some comment improvements would remove that issue.
Feel free to do this in a different change.

// scrollPage stores user requests to scroll up (negative) or down
// (positive) by a page of content. E.g. -1 means up by one page and 2
// means down by two pages.
scrollPage int
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is not clear to me is how the scroll and scrollPage are maintained. If you scroll 2 lines up then scroll = -2. But if you scroll 2 pages and 1 line up does scroll = -1 and scrollPage = -2?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I have expanded the comment for the object itself which now hopefully covers this.

return rollingPaused
}

// lastLineVisible returns true if the last line is visible given drawing that
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we re-write this comment to clarify what the last line means. Is it the last line in the buffer?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Comment rewritten. Please let me know if this doesn't help.

@mum4k mum4k merged commit a211d11 into text-widget/3/line-scanner May 27, 2018
@mum4k mum4k deleted the text-widget/4/scroll-tracker branch May 27, 2018 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants