Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Hunks for staging are not visible in 'Unstaged Changes' tab #1074

Closed

Description

@DavidCarpus

Description

When I select a file in the git panel it displays the existence of multiple hunks (only a line or two for each hunk) but does not display the hunk lines themselves.

The only 'non core' package I have not disabled at this point is emmet.

Expected behavior:
The screenshots I have seen showing the git integration seem to indicate I should see the actual modified lines.

Actual behavior:
The hunk 'data' is displayed but not the actual lines of code

Reproduces how often:
100%

Versions

Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0

Ubuntu 16.04.3 LTS
Linux E6420 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Additional Information

gitdiffnotvisible

Activity

  1. BinaryMuse commented on Aug 2, 2017

    @BinaryMuse
    Contributor

    Hey @DavidCarpus — does this reproduce for you in Safe Mode?

  2. DavidCarpus commented on Aug 2, 2017

    @DavidCarpus
    Author

    Yes.

  3. BinaryMuse commented on Aug 2, 2017

    @BinaryMuse
    Contributor

    This is really interesting — I can see bits of green in the screenshot (added lines are colored in green) and some odd looking pixels to the left of the green that looks like it might be trying to display text? Wonder if it could be a font rendering thing.

    @DavidCarpus If you open the developer tools and use the element selector, do you actually see the HunkView-line elements in the DOM? If so, does changing the font or font size help at all? I assume regular text editors appear normally?

    github-package-diff-inspect

  4. BinaryMuse commented on Aug 2, 2017

    @BinaryMuse
    Contributor

    Also: do you have any custom styles in your user stylesheet that might be affecting layout?

  5. DavidCarpus commented on Aug 2, 2017

    @DavidCarpus
    Author

    I found a hunkview for some added text and it does indeed have a span in the DOM with the text.
    Interestingly the font-size for .github-HunkView-line is 1px.
    When I disable that particular style element the code shows up.

    gitdifffont-size

  6. BinaryMuse commented on Aug 7, 2017

    @BinaryMuse
    Contributor

    Okay, thanks for digging into that. Looks like something weird is going on here with how we watch the editor font size setting.

  7. DavidCarpus commented on Aug 11, 2017

    @DavidCarpus
    Author

    image

    Not sure if needs to be logged separately or not but I tried to 'force' the font size by adding to my style.less but apparently the github-package-styles seems to be loaded later than the 'user' stylesheet?

  8. DavidCarpus commented on Dec 18, 2017

    @DavidCarpus
    Author

    It appears at some point something was changed between 1.18.0 and 1.22.1 that appears to have fixed this.
    .github-HunkView-line {font-size} now seems to be pulling the font size from the editor settings in preferences.
    It might still be nice if the user stylesheet could override this setting but not nice enough at this point if it requires any significant re-architecture work.

  9. simurai commented on Jan 18, 2018

    @simurai
    Contributor

    but apparently the github-package-styles seems to be loaded later than the 'user' stylesheet?

    This seems like a bug and styles.less should be loaded last. In the meantime you might can try to add a higher specificity. Like repeating the class name:

    .github-HunkView-line.github-HunkView-line {
      font-size: 0.9em;
    }

    or use !important:

    .github-HunkView-line {
      font-size: 0.9em !important;
    }

    that should override the styles from the github package even if loaded before.

  10. self-assigned this
    on Jan 19, 2018
  11. kuychaco commented on Jan 19, 2018

    @kuychaco
    Contributor

    I'm going to go ahead and close this since the original issue has been resolved. I've opened a separate issue to capture the stylesheet priority issue (#1292)

    Thanks for the report and help digging into this @DavidCarpus!

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions