Skip to content
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

chore(www): Refactor homepage-logo-banner #25348

Merged
merged 7 commits into from
Jun 27, 2020

Conversation

fk
Copy link
Contributor

@fk fk commented Jun 27, 2020

Switch from template literal/string styles to sx and object styles.

@fk fk requested a review from a team as a code owner June 27, 2020 07:25
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 27, 2020
@fk fk added topic: website bot: merge on green Gatsbot will merge these PRs automatically when all tests passes and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 27, 2020
fk added 4 commits June 27, 2020 09:40
not bored enough for responsive array things tho ;)
@fk
Copy link
Contributor Author

fk commented Jun 27, 2020

OK this is GTG 😅

@fk
Copy link
Contributor Author

fk commented Jun 27, 2020

Hey YouTuuuuube link missing
https://www.youtube.com/watch?v=yVEgxDad0_w

Copy link
Contributor

@tesseralis tesseralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this and the other PRs, I think it would be better to do instead something like:

const logoStyles = {
  position: `relative`,
  // other styles
}

export default function HomePageLogoBanner() {
  return <div sx={logoStyles}>
    {/* more stuff */}
  </div>
}

As I said in another issue, making a component for each thing we want to style adds indirection and makes it harder to reason if html is semantic or not.

@fk
Copy link
Contributor Author

fk commented Jun 27, 2020

Yeah, thanks for calling it — I was kinda telling myself this would make the review easier, but … lemme fix this one now.
A bit short on time, but happy to do so with the two other PRs later today, too.

display: none;
}
`
const LogoGroup = props => (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw. I feel like up to this object length I'd go inline without even thinking about it.
So … what are your thoughts re:"responsive arrays" @tesseralis?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you leave more details on this? I'm not sure what "responsive arrays" are

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[null, null, null, "20px"]https://theme-ui.com/sx-prop/#responsive-values

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhhhhhh. Yeah they're great :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me there are cases where I prefer to not use them, … and also the more nulls, the more torn I am :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw. did you see the v1 roadmap?
system-ui/theme-ui#832

<Title>
<section
sx={{
borderBottom: t => `1px solid ${t.colors.ui.border}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do:

Suggested change
borderBottom: t => `1px solid ${t.colors.ui.border}`,
borderBottom: t => `1px solid ${t.colors.ui.border}`,
borderBottom: 1,
borderColor: `ui.border`,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha just pushed right after you merged — needed a borderStyle: "solid" to make that work

Copy link
Contributor

@tesseralis tesseralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, there's one thing you can simplify with the border.

@gatsbybot gatsbybot merged commit c1368c0 into master Jun 27, 2020
@delete-merged-branch delete-merged-branch bot deleted the fk/lit2obj/homepage-logo-banner branch June 27, 2020 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants