-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Palette swap for accessibility / kibana 6 #12085
Conversation
Weird functional test failure:
jenkins, test this |
@cjcenizal Still working through dark mode and some small stuff around the panels within the tables, but feel free to start poking at this. |
You should be able to rebase master onto this branch to get the tests passing. Shouldn't be any conflicts this time! But if there are... you know what to do. 💥 🔫 |
Link contrastWhen someone is fully color-blind, it's pretty tough to differentiate links from regular text. The obvious solution is to add an underline, but if we can't do that maybe we can change the lightness. Dark themeThe query bar doesn't contrast very well against the background. Maybe we should use an outline treatment, similar to the light theme? The text and other inputs also looks a little low-contrast. Maybe we bump up the contrast on the text and add outlines around the inputs. The "Set to now" buttons look a little weird, and maybe we can create a dark theme version of checkboxes to use in the Datepicker? Looks like the focus state of the Datepicker button is also incorrect: SpyLooks like the spy puts gray text on gray background in a couple places: DiscoverThe color highlighting of the JSON view looks a little desaturated. Maybe we can try matching the colors in Console? The existing treatment of the field names in the table applies a semi-transparent background colors so it blends with the blue highlight of the row in the Context Log. We should probably preserve something like that to avoid this kind of vibrating contrast (btw the +/- button backgrounds are being fixed by @weltenwort in #11819): VisualizeThe index pattern bar really stands out! Can we make this a little more subdued? I'm not sure why it needs to be so high in the visual hierarchy. There's quite a bit of vertical white-space between some sections. Maybe it can be reduced? Does the vertical line denoting sections need to be blue? It seems like this is our attention-getting color (sidebar, primary buttons). Might be better to make this gray instead? TSVBThe axis labels and legend labes in TSVB are really light and hard to read. DashboardsYou mentioned this already, that there's some weirdness with the way our tables appear when they have a feedback message. On a semi-related note, I love how you treated the "dashboard is empty" message. How would you feel about turning this into a component in the UI Framework, and reusing it in tables? Dev ToolsThe light blue (#40b0d3) on gray (#dbdcdd) fails the WebAIM Contrast Checker: Looks like this color scheme is reused in the history: |
One thing I'd like to urge here is separating feedback into "must have to make this as good if not better than what we have now" and "must be done for compliance reasons". We can continue to iterate on the latter after this PR gets merged, whereas we don't want things to get worse when we merge this PR. Progress over perfection, etc. etc. |
jenkins, test this |
@cjcenizal Think I got most of these. I'd like to avoid styling our syntax highlighters just yet. We use quite a few different ones and it would probably take me a bit to get that stuff where I'm happy with it. TSVB uses canvas and while I'd love to dig deep into @simianhacker's codebase it would likely similarly take me awhile to get those visuals consistent with everything else. I'll schedule out a review with him later and I can tackle that in a separate PR. Think since we label that one with "experimental" right now anyway it's OK to wait on. I wouldn't mind spending time working on that UI as a full PR of work. As it is now I've left it mostly unchanged. |
Looks like the Visualize functional tests are failing because it can't find some elements. My guess is that some of the selectors in the page object use CSS class names to find elements, but those class names changed? I can take a closer look tomorrow. |
DiscoverLocalNavWhen the query bar has focus state, the "Uses lucene query syntax" link is invisible. The "Add filter" link doesn't have a very clear focus state. TableThe tooltip in the chart has labels that are pretty hard for me to read. This is backed up by the WebAIM contrast checker, which fails AAA for #3394b7 on #00090C. Why use blue in this situation? Can we use white with a bold treatment, like the way the rest of our labels are treated? Context LogThe backgrounds of the +/- icons are white. I think this is fixed by #11819, so we're semi-blocked by that PR. |
The all white coloring isn't enough definition between the elements. It passes AA, which is what is our goal was. Gonna leave that one as is, or possibly lighten the blue. I'll fix the focus on the filter. Looks like someone added an overflow on the surrounding block (which hides the shadow). Can't see any other reason other than they wanted to avoid dealing with a vertical height issue. Will also fix the query syntax focus. Good catch. |
@cjcenizal Issues are fixed outside of that one outside PR. |
display: flex; | ||
flex-direction: column; | ||
|
||
height: 482px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't figure out why this rule existed and where such a specific number came from. I made some changes to the overflow / height states of the spy to make it actually usable within discovery. I checked that this doesn't effect the spy within dashboard and the visualize creation itself, but wanted to pass it by you just in case there's some part of Kibana I missed that actually requires this to exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it was just old code.
This is looking fantastic! Thanks for improving the legibility of the tooltip labels. As a user, I don't have such a hard time reading them now. I've organized the things I've found into "Blockers", "Nice-to-have", and "Do later" buckets, based on @epixa's comment above. Blockers
This is caused by
Referring to the "logstash-*" button below the "Create index pattern" button. This focus state is easy to see in master.
Referring to the "round to the minute/second" checkbox. I think this a blocker because they're visible in master.
This is a global thing so we should probably address this in the UI Framework. I think it's a blocker because the focus states are visible in master.
The states are visible on master so it's a blocker. Nice-to-have
As a user, it's easier for me to see the lighter blue in master. Didn't look up the math.
It seems like their classes have focus states, but they're also inheriting a global Do later
They're just barely different so I think we can just do this later.
They already have this weird focus state so I think we can address it later.
Blue on dark gray is difficult to read. We probably just need better dark theme styles for the hollow button.
This exists in master already.
This behavior exists in master already and also be addressed by #11094. |
@cjcenizal All blockers are addressed (and a couple non-blockers as well). I couldn't replicate the toaster one. You'll need to provide the pattern to get to it. |
4b57f8c
to
495af49
Compare
@epixa Rebased. Unfortunately this branch touches so much it slips into conflict pretty regularly anytime css is changed. Side note, would love to not commit compiled CSS into master for this reason. Be nice if that was just a part of our build process. |
@snide Understood. All the more reason to get this thing in asap. Keeping it open is a drain. I completely agree about not checking in the css. The current build system muddies the water between what is a behavior in release builds and what is a behavior for development, so the only way to not commit the css would be to ship sass with releases, but that's not doable since sass is a native module and thus needs to be compiled on the OS that it is intended to run on. The new build system will address this. |
Looks like there was a network error in CI when trying to get the latest node builds. jenkins, test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are minor style details here and there that we should improve upon, but I didn't see anything that warrants blocking this PR in particular. With a PR like this, far more issues will surface when people start using it than they will in a single PR review.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful work @snide. I know you think the CSS actually got worse, but I think the addition of new variables and the new rules which tie certain parts of the UI is a step in the right direction.
I had a few very minor comments and then I think we're good to go. I'll start moving the unaddressed visual items into their own issues.
<a class="vis-editor-subnav-link vis-editor-subnav-link--danger"> | ||
<span class="kuiIcon fa-warning"></span> | ||
<a class="kuiButton kuiButton--danger navbar-btn-link"> | ||
<i class="fa fa-warning"></i> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be <span>
since <i>
is non-semantic.
margin-left: -@vis-editor-agg-editor-spacing; | ||
// margin-bottom: -@vis-editor-agg-editor-spacing - 1; // extra one pixel covers the aggs bottom border | ||
// margin-right: -@vis-editor-agg-editor-spacing; | ||
// margin-left: -@vis-editor-agg-editor-spacing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can delete this entire class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also remove it from the markup on line 93 of agg.html
.
data-test-subj="docTableRowAction" | ||
ng-href="{{ getContextAppHref() }}" | ||
ng-if="indexPattern.isTimeBased()" | ||
> | ||
View surrounding documents | ||
</a> | ||
<a | ||
class="kuiLink documentTableRow__action" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete the .documentTableRow__action
class on line 15 of table_row.less
?
border-radius: 4px; | ||
} | ||
|
||
.kuiSideBarSection .kuiSideBarSection .kuiSideBarSection{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we either create a class for this and update the markup, or create a brief ticket so we don't forget? I think this one stands out because the solution seems pretty trivial, and the existing selector is potentially pretty confusing for people.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather do this in a separate refactor. Currently those three tabs are all using different markup and I'm faking them all to look the same with separate css. This whole bit needs a lot of work and because of the way these templates sub nested each other I didn't have enough angular to better specify the classes (if I recall correctly).
* Using a random color generator presented awful colors and unpredictable color schemes. | ||
* So we needed to come up with a color scheme of our own that creates consistent, pleasing color patterns. | ||
* The order allows us to guarantee that 1st, 2nd, 3rd, etc values always get the same color. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this comment?
} | ||
|
||
.kuiPanel--withHeader { | ||
// border-top: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can delete this class.
Also, we need to replace kuiPanel--withHeader
with kuiPanel--withToolbar
in two places:
- Line 15 of
src/core_plugins/kibana/public/management/landing.html
- Line 1 of
src/ui/public/table_info/table_info.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the border for the Panel is #E4E4E4 but the border for the ToolBar is #D9D9D9. We should probably use the same value for both.
// border-top: none; | ||
} | ||
|
||
.kuiPanel--withToolbar { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this kuiPanel--withToolBar
(capital B) to be consistent with the casing of the ToolBar component?
@@ -26,6 +26,7 @@ const buttonTypeToClassNameMap = { | |||
danger: 'kuiButton--danger', | |||
warning: 'kuiButton--warning', | |||
primary: 'kuiButton--primary', | |||
secondary: 'kuiButton--secondary', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you're updating the React components too! On line 8 we need to make a change to match the change you've made here. Line 8 needs to be updated to be:
const BUTTON_TYPES = [
'basic',
'hollow',
'danger',
'warning',
'primary',
'secondary',
];
This defines the allowed values, so now "secondary" will be accepted as a valid type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks so frickin' good dude!
Just a couple last things and then let's merge this sucker:
- We can delete the
.kuiPanel--withHeader
class from the UI Framework. - We need to update
components/empty_table_prompt/empty_table_prompt_panel.js
to use thekuiPanel--withToolBar
class instead of the old withHeader class.
Also you need to run |
@cjcenizal Done. We should find one more commit for good luck. |
jenkins, test this |
@epixa Fixed the management panels. The tabbing stuff is more of design problem that exists in master as well. Nothing really changed there (agree it's really awkward though). |
Replaces #11610
Description
This PR reskins a decent portion of Kibana to be mostly AA accessibility compatible in regards to coloring of major navigation elements.
A note on our less / sass and variables
Kibana has a pretty messy css compile path with both less and sass in play. Right now we have a couple parallel build processes that don't talk to each other all that well. The best way I could think to uniformly style them all was to add some global variables to the less and sass files and then carry that through the existing structure. In general I think this method is a band-aid to get the job done. I think a decent portion of the core css systems need to be rebuilt, and at that time, a proper variable / theming structure should be put in place.
A note to reviewers
I tried to avoid touching the template layer when possible, and tried to keep my changes to the css layer only. There are a few cases where I had to touch templates though, and since I'm not as familiar with the areas I'm touching please take a look at those first.
I'd also mention that these color changes may look more minimal than they actually are. Again, I don't know every corner of Kibana, so if you notice a color problem, please take a screen shot and give me a short note on how to recreate it.
Addresses #11521
Release Note: We re-skinned a decent portion of Kibana to be mostly AA accessibility compatible in regards to coloring of major navigation elements.