refactor: migrate events screen to styled-components#687
refactor: migrate events screen to styled-components#687housseindjirdeh merged 3 commits intogitpoint:masterfrom ZahraTee:styled-components-events-screen
Conversation
chinesedfan
left a comment
There was a problem hiding this comment.
@ZahraTee Thanks for your continuous PRs! Left some comments to you.
| flex: 1; | ||
| margin-left: 10; | ||
| color: ${colors.primaryDark}; | ||
| font-family: ${fonts.fontPrimaryLight.fontFamily}; |
There was a problem hiding this comment.
For styled components fonts, try to import from "src/config/styled-fonts.js".
There was a problem hiding this comment.
@ZahraTee Yes, I see two kinds of codes. How about choosing any one but don't creating the 3rd one? 😄
${fonts.fontPrimaryLight};font-family: ${styledFonts.fontPrimaryLight};
| ); | ||
| case 'ReleaseEvent': | ||
| return `${userEvent.payload.release.id}`; | ||
| return `888 ${userEvent.payload.release.id}`; |
There was a problem hiding this comment.
888? Seems like you mistyped something.
There was a problem hiding this comment.
Oops. Forgotten remnants of my pro debugging technique... 😅
| > | ||
| {userEvent.repo.name} | ||
| </Text> | ||
| 999 {userEvent.repo.name} |
| font-family: ${fonts.fontCode.fontFamily}; | ||
| `; | ||
|
|
||
| const Date = styled.Text` |
There was a problem hiding this comment.
"Date" sounds too general. It usually reminds me "new Date()" in Javascript. How about "DateText" or something else?
| <LinkBranchDescription> | ||
| {userEvent.payload.ref.replace('refs/heads/', '')} | ||
| </Text> | ||
| </LinkBranchDescription> |
There was a problem hiding this comment.
Nice catch! Then we can update together to resolve #521.
|
I'm all for dropping styledFonts and using {...fonts.xxxx}. |
housseindjirdeh
left a comment
There was a problem hiding this comment.
Thanks again @ZahraTee - you've helped SO much already converting to styled-components and I can't thank you enough 🙏
I also noticed the branch name (see first event) wasn't getting the LinkBranchDescription code style as it does in 'create events' despite the fact GH also has that styling for 'push events'. So I added that.
(Part of #532)