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

[Controls] Fix left padding in view mode #192229

Closed
Heenawter opened this issue Sep 5, 2024 · 1 comment · Fixed by #192319
Closed

[Controls] Fix left padding in view mode #192229

Heenawter opened this issue Sep 5, 2024 · 1 comment · Fixed by #192319
Assignees
Labels
bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@Heenawter
Copy link
Contributor

Describe the bug:
Now that we are using compressed styling for controls, the small EuiIcon that we were using to simulate left padding in view mode (see #184533) is too large.

Image

EuiIcon doesn't have an xs option, so we might be forced to just do an empty div with an enforced width of 8px instead (to match the right padding that is now 8px from switching to compressed styling instead of the previous 16px).

Here's what that would look like:

Sep-05-2024 09-59-50

cc @cqliu1 @rshen91

See #192094 (comment) for the discussion around this.

@Heenawter Heenawter added bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Sep 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@andreadelrio andreadelrio self-assigned this Sep 6, 2024
gergoabraham pushed a commit to gergoabraham/kibana that referenced this issue Sep 13, 2024
## Summary

Closes elastic#192229

<img width="1190" alt="Frame 547"
src="https://github.com/user-attachments/assets/ce074602-6fe0-4889-8cd8-575800d222b3">

### Changes

- Fixes padding in the `prepend` in all control types, in both modes
(i.e. `view` and `edit`) and in both label positions (i.e. `inline` and
`above`)
- Removes the empty icon in view mode introduced by elastic#184533. After
thinking about this is some more I think this is unnecessary given the
shift in the UI that already exists for Dashboards when switching back
and forth between `View` and `Edit` Mode.
- For better control, this creates and passes custom class names to
`controlFrame__formControlLayout`.

> [!NOTE]  
> We will be able to do a further clean up these styles when we are done
with [elastic#192005](elastic#192005).

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
markov00 pushed a commit to markov00/kibana that referenced this issue Sep 18, 2024
## Summary

Closes elastic#192229

<img width="1190" alt="Frame 547"
src="https://github.com/user-attachments/assets/ce074602-6fe0-4889-8cd8-575800d222b3">

### Changes

- Fixes padding in the `prepend` in all control types, in both modes
(i.e. `view` and `edit`) and in both label positions (i.e. `inline` and
`above`)
- Removes the empty icon in view mode introduced by elastic#184533. After
thinking about this is some more I think this is unnecessary given the
shift in the UI that already exists for Dashboards when switching back
and forth between `View` and `Edit` Mode.
- For better control, this creates and passes custom class names to
`controlFrame__formControlLayout`.

> [!NOTE]  
> We will be able to do a further clean up these styles when we are done
with [elastic#192005](elastic#192005).

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants