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

Always keep hunk-view header visible #1642

Merged
merged 1 commit into from Aug 14, 2018

Conversation

Projects
None yet
3 participants
@fredden
Contributor

fredden commented Aug 14, 2018

Description of the Change

This change will ensure that the "hunk view" header is always visible by making use of the CSS property position: sticky

Currently, the header scrolls out of the viewport when the hunk is particularly long. This causes a problem when attempting to stage/unstage only certain lines - the user needs to scroll back up until the header comes into view again, being sure to look for the relevant header for this hunk.

Alternate Designs

n/a

Benefits

Better user experience when dealing with large hunks.

Possible Drawbacks

Potentially confusing when two hunk headers are visible/adjacent (one from previous hunk with very few or no more of its lines showing, another from the next hunk).

Applicable Issues

n/a

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Aug 14, 2018

Coverage Status

Coverage decreased (-0.009%) to 80.19% when pulling 824ae18 on fredden:sticky-hunk-header into 9785a8a on atom:master.

coveralls commented Aug 14, 2018

Coverage Status

Coverage decreased (-0.009%) to 80.19% when pulling 824ae18 on fredden:sticky-hunk-header into 9785a8a on atom:master.

@fredden

This comment has been minimized.

Show comment
Hide comment
@fredden

fredden Aug 14, 2018

Contributor

I don't know how to write a test for a CSS change such as this. If the maintainers can link me to a guide or existing test, I'll have a look.

Contributor

fredden commented Aug 14, 2018

I don't know how to write a test for a CSS change such as this. If the maintainers can link me to a guide or existing test, I'll have a look.

@smashwilson

This comment has been minimized.

Show comment
Hide comment
@smashwilson

smashwilson Aug 14, 2018

Member

No tests for CSS changes, just visual inspection. LGTM 👍

Member

smashwilson commented Aug 14, 2018

No tests for CSS changes, just visual inspection. LGTM 👍

@smashwilson smashwilson merged commit d3bc707 into atom:master Aug 14, 2018

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.009%) to 80.19%
Details
@smashwilson

This comment has been minimized.

Show comment
Hide comment
@smashwilson

smashwilson Aug 14, 2018

Member

Thanks, this is cool 🙇

Member

smashwilson commented Aug 14, 2018

Thanks, this is cool 🙇

@smashwilson smashwilson referenced this pull request Aug 14, 2018

Open

Render file patches with a decorated Editor #1512

88 of 92 tasks complete

@fredden fredden deleted the fredden:sticky-hunk-header branch Aug 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment