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

Docs homepage rework, colors guideline + misc fixes #494

Merged
merged 15 commits into from
Mar 13, 2018

Conversation

snide
Copy link
Contributor

@snide snide commented Mar 11, 2018

Homepage + colors guideline

  • Homepage is now more inviting.
    • Links to often used components. Likely up for debate, but easy to change.
    • Links to a download for the latest sketch libraries. Right now this is a manual link, but I can likely figure out a better way to manage this.
  • New guideline page Colors does a better job of highlighting our color accessibility.
    • This utilizes a new devDependency of sass-vars-to-js-loader which allows me to pull in sass variables as JS vars.
  • Adds two new color services
    • calculateContrast returns the contrast value of any two colors passed.
    • rgbToHex will convert the color system of a passed rgba value. This bookends nicely against our existing hexToRgb services function.

Misc fixes

  • Changed the wrapping element of EuiBadge to be a span instead of a div. This allows it to sit within paragraphs.
  • Adds icons for logoGithub and logoSketch
  • EuiCard now accepts a href prop. isClickable is now also a distinct prop in case you need to wrap using React's Link or have other reasons for the hover effect.
  • Fix bug in EuiFlex where nested flexgroups wouldn't respond to the responsive={false} prop.
  • Replaced EuiImage doc images with something more random / permissions friendly.

Todo

  • Move color documentation.
  • Cleanup styling.

Todo in a later PR

  • Add some form of near term roadmap.
  • Make spacing documentation.

image

image

@snide snide added the documentation Issues or PRs that only affect documentation - will not need changelog entries label Mar 11, 2018
@snide snide changed the title Docs homepage rework + misc fixes Docs homepage rework, colors guideline + misc fixes Mar 12, 2018
@snide snide requested a review from cchaos March 12, 2018 18:33
@snide
Copy link
Contributor Author

snide commented Mar 12, 2018

OK. Think this one should be good to go. No hurry, but if you have time @cchaos to spin this up and just do a visual check I'd appreciate it. Based on the accessibility values I was seeing from the tests, I had to bump up the contrast on euiColorSecondary and euiColorWarning.

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Overall I think this is a more helpful landing page. I do want to tweak the block form images a bit (there's some size inconsistencies I wanna twiddle with). But that isn't necessary to get this PR in.

image="https://i.imgur.com/UfigGiQ.png"
title="Tables"
isClickable
description="Example of a card's description. Stick to one or two sentences."
Copy link
Contributor

Choose a reason for hiding this comment

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

Still using placeholder text here.

the <a href="https://www.elastic.co/guide/en/kibana/current/kibana-plugins.html">plugin-specific section</a> for
help developing Kibana plugins. You can find the source for the <a href="https://github.com/elastic/eui">Elastic UI Framework on GitHub</a>.
The Elastic UI framework (EUI) is a design library in use at Elastic to
build internal products that need to share our branding and look and
Copy link
Contributor

@cchaos cchaos Mar 13, 2018

Choose a reason for hiding this comment

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

Change "branding and aesthetics"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

</Link>
</EuiFlexItem>
<EuiFlexItem>
<Link to="/navigation/button">
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we link them to the buttons guidelines page instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think people will want the code first? I'd want the code first? haha. I dunno. I'll leave it for now and we can change as we see what people want.

$euiColorAccent: #DD0A73 !default;
$euiColorHighlight: #FFFBF1 !default;
$euiColorGhost: #FFF !default;

// Status
$euiColorSuccess: $euiColorSecondary !default;
$euiColorDanger: #A30000 !default;
$euiColorWarning: #E5830E !default;
$euiColorWarning: #C34A1E !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about #D43900 instead? It's just slightly more saturated than what you have here and I think helps to separate it a bit more from the danger color.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to darken your color by a smidge to get it to pass AA on euiColorLightestShade. I'm using that as our minimum contrast color combo because it normally means the color will work on things like callouts as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Either way, feel free to adjust this once its in. I'm not super happy with some of these myself, but at least they are one-liner changes and we can test them quick.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok.

@snide
Copy link
Contributor Author

snide commented Mar 13, 2018

@cchaos feedback addressed. I put the blockforms on sketch. Feel free to adjust them however you see fit. For some reason I had trouble exporting SVGs, but that would help them scale a little better in the page. Right now they get a bit crushed depending upon your browser window.

@snide snide merged commit 43a2319 into elastic:master Mar 13, 2018
@snide snide deleted the docs/home branch March 13, 2018 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants