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

Overlay & Styled-components 4.4.0 #20

Closed
wants to merge 4 commits into from

Conversation

luckylwk
Copy link
Owner

@luckylwk luckylwk commented Dec 12, 2019

DONE:

  • Overlay component for Full page overlay and in-side parent overlay
  • Styled Components 4.4.0

Because of issues that nextjs has in development (not in production!) with the server-side-rendering. See:

image

TODO:

  • Test in NextJS setup
  • Test in App
  • Bump to v1.0.1

@luckylwk luckylwk self-assigned this Dec 12, 2019
@luckylwk luckylwk added the bug Something isn't working label Dec 12, 2019
@luckylwk luckylwk added the enhancement New feature or request label Dec 13, 2019
@luckylwk
Copy link
Owner Author

@jonashaefele can you have a look at my Overlay component? I am still getting my head around the hooks (useContext) but I like how it works and how we have the Expandable ability. Not sure if I used it correctly in the Readme for the Overlay

@luckylwk luckylwk changed the title Updated Styled-components and Styled-system Overlay & Styled-components 4.4.0 Dec 13, 2019
Copy link
Collaborator

@jonashaefele jonashaefele left a comment

Choose a reason for hiding this comment

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

This is great.

Left a comment re: Overlay/Navigation organisation. Otherwise great. A sentence or two where it says TODO and we're all set.

Just FYI, I branched off last week to port HDS to docz 2.0. It's a manual job, lots of imports need to change, etc, so will have to port these new components over when I'm done. Just help me check which bits were added, so we don't forget any changes. I'm pretty much done, just tried to make it prettier, but it's not that pretty to look at yet.

NavCenter.displayName = 'NavCenter';

// ---------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

guess these are a thing you like to separate sibling components in one file?


import Color from 'color';

// ---------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

Trying to figure out when to add them and when not to?


// ---------------------------

const NavOverlay = styled(Overlay)`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only thing that annoys me a bit is that part of Nav is now in this new Overlay file... I like the re-usable Overlay, but it's hard to find all the bits that belong to Navigation now.

I'd probably define NavOverlay where it was before.

As in keep it in Navigation.js, you can still import { Overlay } from ../Overlay and then define NavOverlay just as you did here...

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'll update that

z-index: ${({ theme }) => theme.zIndices.overlay - 1};

background-color: ${({ theme }) =>
Color(theme.colors.whiteout.lightest)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes overlays always white. Is there a case to make this a prop? bg='primary.lighter' or do we want them to be white always? (Could actually be nice)

ExpandableBody,
// ExpandableContext
} from '../Expandable';
import { HeartLoader } from 'components/Loader';
Copy link
Collaborator

Choose a reason for hiding this comment

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

for docz 2.2:
import { HeartLoader } from '../Loader';

Copy link
Collaborator

Choose a reason for hiding this comment

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

think that's the only realy change you need to make it work with master/docz2.2

then just run yarn run build && yarn run prettier:all again and the rest of the conflicts should be resolved.

Copy link
Collaborator

@jonashaefele jonashaefele left a comment

Choose a reason for hiding this comment

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

messed up the comment order. see above.

@luckylwk luckylwk closed this Dec 17, 2019
@luckylwk luckylwk deleted the luuk/styled-components-440 branch December 17, 2019 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants