Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add avatar and split up TabHeaderView #2325
Description of the Change
Canonical Pr: #2308
This is an MVP of the avatar, and in a following Pr I will add the onClick actions, however show name hovering is supported via the title tag on the avatar img tag.
Note: currently on the github tab header if the query fails it uses a null user until the component is rerendered, and it does not provide a method for retrying after the original query fails. Same for invalid tokens too.
Note: this currently implements a separate query for the GitHub avatar. A sibling component (Remote container) also requests a query and I am wondering about if we and how in terms of component structure and naming one should combine those queries.
See Tests for testing changes.
This gives a visual identity for users to understand what git email they are using for committing.
@smashwilson I added in an avatar that only comes from the git config, but I think I have added to much state to the component compared to other components in this code base. I believe I now need to separate
The other parts begin with
As it stands, this PR looks nice, is ready, is passing (minus that flake), and accomplishes the task (except for using the github user, this only uses the git config user), but I feel like it doesn't fit into the code base, which I haven't used Ruby, but it seems like its a similar structure here.
Please confirm if you agree though. (Went ahead and began the change, but if necessary I can revert)
Also unrelated note, should I still only be mentioning you, as I have seen 2 other atom developers merge new changes to the master branch.
The pieces you've described match exactly how we try to split up functionality among different kinds of components:
Just out of curiosity, had you read that already, or did you pick this up from the existing codebase?
I believe I still have the most history and context and Opinions
Really you shouldn't have to ping anyone specifically though... I'm watching the repo, and I tend to shelve "things to review / respond to" until I get the chance to go through and respond to a bunch at once.
I read it during my first pull request but shelved it because it said views could have some state and I didn't understand why you had it separated. Ironically I was going through ruby's official tutorial/interactive playground, and it mentioned this architecture, and instantly i was like "Github uses ruby", "atom github is made by github, most of them probably know ruby", "ooooooh they are using this idea but just in js". But also in this PR the file grew clearly way to large, and it looked nothing like the code base when I was referencing how things are already done.