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

[Security Solution] Responsive styling fixes #131951

Merged
merged 9 commits into from
May 17, 2022

Conversation

stephmilovic
Copy link
Contributor

@stephmilovic stephmilovic commented May 10, 2022

Summary

Various style fixes. See before screenshots here: #131405

More details in comments made in the Files section. Apologies that my "After" screenshots don't have data, oblt-edge is down

Screen Shot 2022-05-10 at 10 15 18 AM

Screen Shot 2022-05-10 at 9 50 52 AM

@stephmilovic stephmilovic added release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. auto-backport Deprecated - use backport:version if exact versions are needed Team:Threat Hunting:Explore v8.3.0 v8.2.1 labels May 10, 2022
@stephmilovic stephmilovic requested review from a team as code owners May 10, 2022 16:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@@ -40,7 +40,7 @@ const DraggableLegendItemComponent: React.FC<{

return (
<EuiText size="xs">
<EuiFlexGroup alignItems="center" gutterSize="none">
<EuiFlexGroup alignItems="center" gutterSize="none" responsive={false}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before:
Screen Shot 2022-05-10 at 10 20 19 AM

After:
Screen Shot 2022-05-10 at 10 22 04 AM

`.header-section-titles {
margin-top: ${theme.eui.paddingSizes.m};
}`}
.no-margin {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

better alignment when toggle closed

{children}
{!hideSubtitle && toggleStatus && (
<EuiFlexItem>
<Subtitle data-test-subj="header-section-subtitle" items={subtitle} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the jsx changes here are in service of this fix:
Before:
Screen Shot 2022-05-10 at 10 23 19 AM
After:
Screen Shot 2022-05-10 at 10 23 27 AM

@@ -36,7 +36,7 @@ interface StackedBySelectProps {
}

export const StackByComboBoxWrapper = styled.div`
width: 400px;
max-width: 400px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was causing the entire overview page to overflow at certain screen sizes.
Before:
Screen Shot 2022-05-10 at 10 26 08 AM

After:
Screen Shot 2022-05-10 at 10 25 50 AM

@@ -37,7 +37,10 @@ const ID = 'alertsByCategoryOverview';
const DEFAULT_STACK_BY = 'event.module';

const StyledLinkButton = styled(EuiButton)`
margin-left: ${({ theme }) => theme.eui.paddingSizes.l};
margin-left: 0;
@media only screen and (min-width: ${(props) => props.theme.eui.euiBreakpoints.m}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no button margin on smaller sizes.
Before:
Screen Shot 2022-05-10 at 10 27 10 AM

After:
Screen Shot 2022-05-10 at 10 27 29 AM

@@ -135,7 +135,6 @@ const OverviewHostComponent: React.FC<OverviewHostProps> = ({
<EuiPanel hasBorder>
<HeaderSection
id={OverviewHostQueryId}
height={!toggleStatus ? 30 : undefined}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed by the .no-margin class in header_section/index.tsx

isLoading={loading}
max={statsForGroupCount}
/>
<MoveItLeft>
Copy link
Contributor Author

@stephmilovic stephmilovic May 10, 2022

Choose a reason for hiding this comment

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

better alignment on sub stats.

Before:
Screen Shot 2022-05-10 at 10 31 57 AM
After:
Screen Shot 2022-05-10 at 10 31 41 AM

@@ -40,7 +40,7 @@ const StatValueComponent: React.FC<{
}, [isLoading, isInitialLoading, setIsInitialLoading]);

return (
<EuiFlexGroup alignItems="center" gutterSize="none">
<EuiFlexGroup alignItems="center" gutterSize="none" responsive={false}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Puts the number and bar on same line on small screens.
Before:
Screen Shot 2022-05-10 at 10 33 45 AM
After:
Screen Shot 2022-05-10 at 10 33 50 AM

@@ -258,7 +258,7 @@ export const StatItemsComponent = React.memo<StatItemsProps>(
<EuiPanel hasBorder>
<EuiFlexGroup gutterSize={'none'}>
<EuiFlexItem>
<EuiFlexGroup gutterSize={'none'}>
<EuiFlexGroup gutterSize={'none'} responsive={false}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixes stat item query toggle.
Before:
Screen Shot 2022-05-10 at 10 30 56 AM

After:
Screen Shot 2022-05-10 at 10 30 31 AM

@stephmilovic stephmilovic requested a review from a team as a code owner May 10, 2022 16:39
@@ -39,7 +39,12 @@ import { HoverVisibilityContainer } from '../hover_visibility_container';
import { LensAttributes } from '../visualization_actions/types';
import * as i18n from '../../containers/query_toggle/translations';
import { UserskKpiStrategyResponse } from '../../../../common/search_strategy/security_solution/users';

const FlexGroup = styled(EuiFlexGroup)`
.no-margin {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes closed alignment on stat items.
Before:
Screen Shot 2022-05-10 at 10 43 20 AM

After:
Screen Shot 2022-05-10 at 10 42 51 AM

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

Hey Steph! It looks way better! 👏 👏
Thanks for the screenshots. They are very helpful.

We need some changes here to group the lines visually. For example, if you look at "Package" it is visually closer to the number 108. That gives the wrong impression that there are 108 packages instead of 948.

Screenshot 2022-05-11 at 11 22 47


This might be unrelated, but the network map collapse button is the only one on the right side.

Screenshot 2022-05-11 at 11 26 01


This is unrelated: The alert table grid selector breaks on mobile.
@elastic/security-detections-response-alerts team, are you aware of it? Let me know if I should create a bug for it.

Screenshot 2022-05-11 at 11 28 09

@stephmilovic
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 5.0MB 5.0MB +1.1KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream


const NoMarginTopFlexItem = styled(EuiFlexItem)`
@media only screen and (max-width: ${({ theme }) => theme.eui.euiBreakpoints.m}) {
margin-top: -10px !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering if there's a conflict somewhere that !important overrides, or is this just ot make sure it doesn't get overridden in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes there is an important we're overwriting

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Thanks, pulled down and tested the overview, alerts, hosts, and network views LGTM! Also, do you know if there was ever conversation about making the alert table collapsible?

@stephmilovic stephmilovic merged commit a8e8d35 into elastic:main May 17, 2022
@stephmilovic
Copy link
Contributor Author

Thanks, pulled down and tested the overview, alerts, hosts, and network views LGTM! Also, do you know if there was ever conversation about making the alert table collapsible?

Nope, I think because it was outside of Explore.

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.2 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.2:
- Add host risk tab to Hosts page (#122980)

Manual backport

To create the backport manually run:

node scripts/backport --pr 131951

Questions ?

Please refer to the Backport tool documentation

academo pushed a commit to XavierM/kibana that referenced this pull request May 17, 2022
XavierM added a commit that referenced this pull request May 17, 2022
* wip I

* add alert table state in case

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add new API to get FeatureID form registrationContext and update UI to use this new API

* rm dead code

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* remove unnecessary memo

* adds tests for case view helpers

* Move http call to API and add tests for getFeatureIds

* fix type + unit test

* add unit tests + cleanup

* add new api integration test for _feature_ids

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Fix small type creating typescript slowness

* remove console log

* use import type for validfeatureId

* force any to improve typescript performance

* Update APM (#132270)

Co-authored-by: Renovate Bot <[email protected]>

* [ResponseOps][Docs] Updating ServiceNow docs with OAuth setup instructions (#131344)

* Updating ServiceNow docs. Need screenshots

* Adding screenshots

* Fix nested screenshots and lists

* Tweaks and screenshots

* Updates

* blergh

* Apply suggestions from code review

Co-authored-by: Lisa Cawley <[email protected]>

* Apply suggestions from code review

Co-authored-by: Mike Côté <[email protected]>

Co-authored-by: lcawl <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Mike Côté <[email protected]>

* Show polling options when 'Data streams' option is selected in the Console Settings modal. (#132277)

* [Osquery] Make Osquery All with All base privillege (#130523)

* [XY] Add normalizeTable function to correct works with esdocs (#131917)

* Add normalizeTable function to correct works with esdocs

* Fix types

* Fix types

* Fix CI

* Fix CI

* Some fixes

* Remove fallback with min/max value for domain

* Added tests

* Some refactoring

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Yaroslav Kuznietsov <[email protected]>

* [Osquery] Add default osquery_saved_query objects (#129461)

* [Unified Search] Show error message for invalid date filter value (#131290)

* feat: added show error message for invalid date

* refact: move logic in HOC

* feat: refactoring code and added translation

* refact show error

* refact: show error message

* refact: remove translation

* refactor: changed menu for show FilterEdit

* fix: open/close popover

* feat: field.type => KBN_FIELD_TYPES

* feat: remove extra code with with input check and refactored filter item

* feat: added tests and refactoring code

* refact: getFieldValidityAndErrorMessage

* feat: return isInvalid checking in valur input type for string, ip

* Update navigation landing pages to use appLinks config (#132027)

* Update navigation landing pages to use appLinks config

* Please code review

* align app links changes

* Update links descriptions

* Rollback title changes

* Fix wrong links descriptions

* Fix unit tests

* Fix description

Co-authored-by: semd <[email protected]>

* [Cloud Posture] add resource findings page flyout  (#132243)

* [Discover] Add a tour for Document Explorer (#131125)

* [Discover] Add "Take a tour" button to the Document Explorer callout

* [Discover] Tmp

* [Discover] Add a first Document Explorer tour step

* [Discover] Add other Document Explorer tour steps

* [Discover] Update tour steps positioning

* [Discover] Add gifs to tour steps

* [Discover] Refactor how tour steps are registered

* [Discover] Add new step to the tour. Update tour steps text.

* [Discover] Improve steps positioning

* [Discover] Fix positioning for Add field step

* [Discover] Add icons to tour steps

* [Discover] Reorganize components

* [Discover] Skip Columns step when it's not available

* [Discover] Rename components

* [Discover] Add some tests

* [Discover] Fix positioning

* [Discover] Fix props

* [Discover] Render steps only if the tour is active

* [Discover] Update gifs

* [Discover] Add image alt text for gifs

* [Discover] Tag the Take tour button

* [Discover] Update text and tests

* [Discover] Add more tests

* [Discover] Rename assets directory

* [Discover] Fix tour in mobile view. Improve steps positioning and animation.

* [Discover] Update text in tour steps

* [Discover] Update sort.gif

* [Discover] Update image width

* Update src/plugins/discover/public/components/discover_tour/discover_tour_provider.tsx

Co-authored-by: gchaps <[email protected]>

* Update src/plugins/discover/public/components/discover_tour/discover_tour_provider.tsx

Co-authored-by: gchaps <[email protected]>

* [Discover] Update sort.gif

* [Discover] Fix code style

Co-authored-by: gchaps <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

* [XY] Add `minTimeBarInterval` arg (#128726)

* Added `xAxisInterval` arg

* Add validation

* Add tests

* Rename xAxisInterval to minTimeBarInterval and add validation

* Fix imports

* Add tests to validation

* Fix conflicts

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Fix tests

Co-authored-by: Kibana Machine <[email protected]>

* do not use barrel imports

* do not use barrel import

* do not use barrel import

* do not use barrel imports

* do not use barrel import

* import types

* Add tests

* Fix cases bundle size

* Add more tests

* [Fleet] Add new API to get current upgrades (#132276)

* Add support of Data View switching for Agg-Based visualizations (#132184)

* Add support of Data View switching for Agg-Based visualizations

* fix CI

* add use_date_view_updates

* implement sync with state

* cleanup

* cleanup

* cleanup

* Update index.ts

* fix PR comments

* Update use_data_view_updates.ts

* Update use_data_view_updates.ts

Co-authored-by: Kibana Machine <[email protected]>

* [Security Solution] Responsive styling fixes (#131951)

* [Discover] Add Analytics No Data Page (#131965)

* [Discover] Add Analytics No Data Page

* Make showEmptyPrompt parameter optional

* Remove unused import

* Remove unnecessary test

* Fix test

* Update failing test?

* Update failing test

* Changing the order of functional tests

* Fix error handling

* Addressing PR comments

Co-authored-by: Kibana Machine <[email protected]>

* Remove barrel export from public index file

* remove barrel export

* Re-export missing exports

* Turn off feature flag

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Esteban Beltran <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Ying Mao <[email protected]>
Co-authored-by: lcawl <[email protected]>
Co-authored-by: Mike Côté <[email protected]>
Co-authored-by: CJ Cenizal <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
Co-authored-by: Uladzislau Lasitsa <[email protected]>
Co-authored-by: Yaroslav Kuznietsov <[email protected]>
Co-authored-by: Nodir Latipov <[email protected]>
Co-authored-by: Pablo Machado <[email protected]>
Co-authored-by: semd <[email protected]>
Co-authored-by: Or Ouziel <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: gchaps <[email protected]>
Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Nicolas Chaulet <[email protected]>
Co-authored-by: Alexey Antonov <[email protected]>
Co-authored-by: Steph Milovic <[email protected]>
Co-authored-by: Maja Grubic <[email protected]>
stephmilovic added a commit that referenced this pull request May 17, 2022
* resolve merge conflicts

* resolve merge conflicts

* fix snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.2.1 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants