Skip to content

Conversation

rafawendel
Copy link
Member

@rafawendel rafawendel commented Mar 9, 2021

What type of PR is this? (check all applicable)

  • Feature

Description

This PR is a split on #5409
It is the third step to fix issues on standardization, interactivity and improve keyboard accessibility.

Initially, some elements that would not have focus styles had some added and some tag restricted styles (particularly anchor) were replaced by more general approaches. Besides that, some syntax was improved.

Summary of changes

*Other than :focus and :active

Before After
20f678d - Particularly for focus feedback
No change on hover Kapture 2021-03-10 at 13 26 01
(hover -> click) [focus not available] 157243e (hover -> click, focus -> click)
Kapture 2021-03-10 at 13 32 03 Kapture 2021-03-10 at 13 30 59
(no feedback) 52e7ba6 (hover -> click, focus)
Kapture 2021-03-10 at 14 03 50 Kapture 2021-03-10 at 14 03 24

@rafawendel rafawendel force-pushed the improve-css-add-focus-styles branch from 1c2d8f1 to 47016db Compare March 9, 2021 19:08
.clickable {
cursor: pointer;

button&:disabled {

Choose a reason for hiding this comment

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

Why & here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The output should be button.clickable:disabled, because the <button>is the clickable, not a child of it

Copy link

@thielium thielium left a comment

Choose a reason for hiding this comment

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

Code-wise, just a couple comments 🎉 . Screenshots of what changed would be super helpful, otherwise it's just relying on Percy (which is still pretty good).

background: @redash-yellow;
border-radius: @redash-radius;
}
.editable {

Choose a reason for hiding this comment

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

👍

.fa-star {
color: @yellow-darker;
.fa-star {
filter: saturate(75%);

Choose a reason for hiding this comment

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

Is there a screenshot or link for what this change does?

Copy link
Member Author

Choose a reason for hiding this comment

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

Now there is 😉

@@ -0,0 +1,9 @@
.ant-list-item {

Choose a reason for hiding this comment

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

This is unscoped, so it'll interact with all ant-list-item components. Is that intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably it's a behavior we can make use of elsewhere, but I'll scope it for now.


a {
a,
button {

Choose a reason for hiding this comment

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

This is a pretty broad change -- it might be right, but I want to confirm: in this context, will there ever be button's that we don't want to match this style (e.g. button's that aren't styled like links, such as antd's Button)? If so, just switch button to some classname and we're all good.

Choose a reason for hiding this comment

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

(This also happens here)

Copy link
Member Author

Choose a reason for hiding this comment

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

It shouldn't become a problem, but I agree we're safer having a class.

}

.tags-control a {
.tags-control > .label-tag {

Choose a reason for hiding this comment

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

👍 for good selectors!

}

.ant-table-row {
height: 1px;

Choose a reason for hiding this comment

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

That's a surprising one. Why is that? Also, this looks like an unqualified selector -- will these three classnames impact all ant-table-cells, ant-table-rows, etc.?

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently it had unwanted side effects, but this pattern is sort of a workaround to make the item contained by the cell fulfill all the available cell space, regardless of the other cells. This is interesting for links and buttons, and also provides space for future improvements in focus states. Hence, I think all tables could benefit from it. Let's scope it for now, though.

}
}

.delete-visualization-button {
Copy link
Member Author

Choose a reason for hiding this comment

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

All this does is properly centralize the icon, instead of the padding workaround

@rafawendel rafawendel force-pushed the improve-css-add-focus-styles branch from 9c38fc6 to d9e1c82 Compare March 10, 2021 19:16
@rafawendel rafawendel force-pushed the improve-css-add-focus-styles branch 4 times, most recently from ae18425 to fe6347c Compare March 10, 2021 22:22
@rafawendel rafawendel mentioned this pull request Mar 12, 2021
1 task
Copy link

@thielium thielium left a comment

Choose a reason for hiding this comment

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

Code LGTM!

You may need to rebase -- it looks like the plainbutton commits are being duplicated in your history.

rafawendel and others added 5 commits March 17, 2021 11:40
* Add plain button

* Minor syntax improvements
* Refactor of link component

* Applied anchor-is-valid to Link component

* Fixed Eslint error

* Removed improper anchor uses

* Fixed TS errors
* reset failure counter when query completes successfully via adhoc

* Use "query_id" in metadata, but still allow "Query ID" for transition/legacy support
* Add setting to identify email block domain

ref: #5368

* rename

Co-authored-by: Levko Kravets <[email protected]>

* rename and add comment

Co-authored-by: Levko Kravets <[email protected]>

* Update redash/handlers/users.py

Co-authored-by: Levko Kravets <[email protected]>

* Update redash/handlers/users.py

Co-authored-by: Levko Kravets <[email protected]>

* Add more comment to settting

Co-authored-by: Levko Kravets <[email protected]>
* feat: add trino logo

* feat: add trino
@rafawendel rafawendel force-pushed the improve-css-add-focus-styles branch from b83de3e to 52552f6 Compare March 17, 2021 14:40
@rafawendel rafawendel merged commit 0560e24 into master Mar 17, 2021
@rafawendel rafawendel deleted the improve-css-add-focus-styles branch March 23, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants