Refined-github: show-names no longer shows names

Created on 18 Apr 2019  路  6Comments  路  Source: sindresorhus/refined-github

Names no longer show up next to a person's username on discussions.
Disabled:
Screen Shot 2019-04-18 at 12 28 42 PM
Enabled:
Screen Shot 2019-04-18 at 12 29 28 PM
Expected:
Screen Shot 2019-04-18 at 12 31 02 PM

bug help wanted

Most helpful comment

This was likely broken by some of my changes in #1783, you can see how it was before that PR: https://github.com/sindresorhus/refined-github/tree/5d66c95516e6f5f4ea4943acbe96c168be517910

All 6 comments

@dotconnor It requires the personal authentication token. You can generate one from here and add it from extension options.

I have a token and it is still broken at the moment. I'm looking into it.

@HardikModha I have a token set, I even confirm it by creating a new token with all permissions; I can also see the network request made for the feature and it does, in fact, return the correct data.

@dotconnor @Phrynobatrachus I've debugged the issue.

    1.
<span className="css-truncate-target" style={{maxWidth: '200px'}}>
    {name} // This should be `names[userKey].name`
</span>
  1. Even after replacing {name} with the names[userKey].name it is broken.

For the currently logged in user, the name is not present in the names array returned from the API. That's where it is breaking. You can test it by visiting an issue which is not created by you and you'll see the names.

Yeah I have it working locally. I'm not sure how it was working before with the {name} interpolation since that's not defined from what I see? I also don't know why your own username wasn't included before, I'm just adding it to the set after the getUsername() and it seems to work ok.

This was likely broken by some of my changes in #1783, you can see how it was before that PR: https://github.com/sindresorhus/refined-github/tree/5d66c95516e6f5f4ea4943acbe96c168be517910

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arcanemagus picture Arcanemagus  路  3Comments

mischah picture mischah  路  3Comments

hkdobrev picture hkdobrev  路  3Comments

olso picture olso  路  3Comments

alexanderadam picture alexanderadam  路  3Comments