Skip to content

[Workplace Search] Update personal dashboard#91136

Merged
scottybollinger merged 18 commits intoelastic:masterfrom
yakhinvadim:update-private-dashboard
Feb 11, 2021
Merged

[Workplace Search] Update personal dashboard#91136
scottybollinger merged 18 commits intoelastic:masterfrom
yakhinvadim:update-private-dashboard

Conversation

@yakhinvadim
Copy link
Copy Markdown
Contributor

@yakhinvadim yakhinvadim commented Feb 11, 2021

Summary

This PR updates design of personal dashboard.
It doesn't include:

  • any header changes. We're still waiting for the decision about hiding Kibana chrome.
  • mobile layout. I'm not 100% sure we'll have this layout in 8.0, so I decided not to invest time into it now.

I will add tests in the next PR.

I recommend going commit-by-commit and hiding whitespace changes.


Private sources disabled, no sources connected:

image

Private sources enabled, no sources connected:

image

Private and shared sources connected:

image

Checklist

Different cases:
1 group: You have access to the following sources through the group Default.
2 groups: You have access to the following sources through the groups Default and Engineering. (no comma before 'and')
3+ groups: You have access to the following sources through the groups Default, Marketing, and Engineering. (comma before 'and')
In this commit PrivateSourcesLayout is a full copy of Layout.
It's going to be updated in later commits.
Also moved private_sources_layout styles to sources.scss file. Having separate files for that little amount of custom styles is unnecessary.
by extracting privateSourcesSection that contains common markup.
by extracting sharedSourcesSection that contains common markup.
To match the order the components appear in UI
So it looks good with any number of groups
@yakhinvadim yakhinvadim marked this pull request as ready for review February 11, 2021 14:27
@yakhinvadim yakhinvadim requested a review from a team February 11, 2021 14:27
@yakhinvadim yakhinvadim added v7.12.0 Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes labels Feb 11, 2021
Comment on lines +87 to +92
<ContentSection
className="zero-state__private-sources"
title={PRIVATE_HEADER_TITLE}
description={PRIVATE_HEADER_DESCRIPTION}
action={canAddSources && headerAction}
>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This ensures that we have title and description even in empty state.

Copy link
Copy Markdown
Contributor

@scottybollinger scottybollinger left a comment

Choose a reason for hiding this comment

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

LGTM except one minor suggested change. Great work!

…_search/views/content_sources/private_sources_layout.tsx

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
@yakhinvadim
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@scottybollinger scottybollinger added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 11, 2021
@scottybollinger scottybollinger enabled auto-merge (squash) February 11, 2021 21:16
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1213 1214 +1

Async chunks

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

id before after diff
enterpriseSearch 1.9MB 1.9MB +1.7KB

History

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

@scottybollinger scottybollinger merged commit 7da7b10 into elastic:master Feb 11, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2021
* Remove "Add a private content source" sidebar link

* Update groupsSentence to cover different number of groups

Different cases:
1 group: You have access to the following sources through the group Default.
2 groups: You have access to the following sources through the groups Default and Engineering. (no comma before 'and')
3+ groups: You have access to the following sources through the groups Default, Marketing, and Engineering. (comma before 'and')

* Create PrivateSourcesLayout as a copy of Layout

In this commit PrivateSourcesLayout is a full copy of Layout.
It's going to be updated in later commits.

* Remove unused code from PrivateSourcesLayout

* Update read-only mode warning copy for end-users

* Move copy to constants file

* Add width styles to new sidebar

Also moved private_sources_layout styles to sources.scss file. Having separate files for that little amount of custom styles is unnecessary.

* Move top-level header to sidebar

* Add missing padding to sidebar

* Replace ViewContentHeader with ContentSection props

* Move variables over the components

* Remove unused classnames

* DRY out privateSourcesTable and privateSourcesEmptyState

by extracting privateSourcesSection that contains common markup.

* DRY out sharedSourcesTable and sharedSourcesEmptyState

by extracting sharedSourcesSection that contains common markup.

* Reorder code blocks inside the file

To match the order the components appear in UI

* Add newline to the groups enumeration sentence

So it looks good with any number of groups

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

Backport result

{"level":"info","message":"POST https://api.github.com/graphql (status: 200)"}
{"level":"info","message":"POST https://api.github.com/graphql (status: 200)"}
{"meta":{"labels":["Feature:Plugins","auto-backport","release_note:skip","v7.12.0"],"branchLabelMapping":{"^v8.0.0$":"master","^v7.12.0$":"7.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"},"existingTargetPullRequests":[]},"level":"info","message":"Inputs when calculating target branches:"}
{"meta":["7.x"],"level":"info","message":"Target branches inferred from labels:"}
{"meta":{"killed":false,"code":2,"signal":null,"cmd":"git remote rm kibanamachine","stdout":"","stderr":"error: No such remote: 'kibanamachine'\n"},"level":"info","message":"exec error 'git remote rm kibanamachine':"}
{"meta":{"killed":false,"code":2,"signal":null,"cmd":"git remote rm elastic","stdout":"","stderr":"error: No such remote: 'elastic'\n"},"level":"info","message":"exec error 'git remote rm elastic':"}
{"level":"info","message":"Backporting [{\"sourceBranch\":\"master\",\"targetBranchesFromLabels\":[\"7.x\"],\"sha\":\"7da7b100d2160feb5e9ab8e670c101d492d36329\",\"formattedMessage\":\"[Workplace Search] Update personal dashboard (#91136)\",\"originalMessage\":\"[Workplace Search] Update personal dashboard (#91136)\\n\\n* Remove \\\"Add a private content source\\\" sidebar link\\r\\n\\r\\n* Update groupsSentence to cover different number of groups\\r\\n\\r\\nDifferent cases:\\r\\n1 group: You have access to the following sources through the group Default.\\r\\n2 groups: You have access to the following sources through the groups Default and Engineering. (no comma before 'and')\\r\\n3+ groups: You have access to the following sources through the groups Default, Marketing, and Engineering. (comma before 'and')\\r\\n\\r\\n* Create PrivateSourcesLayout as a copy of Layout\\r\\n\\r\\nIn this commit PrivateSourcesLayout is a full copy of Layout.\\r\\nIt's going to be updated in later commits.\\r\\n\\r\\n* Remove unused code from PrivateSourcesLayout\\r\\n\\r\\n* Update read-only mode warning copy for end-users\\r\\n\\r\\n* Move copy to constants file\\r\\n\\r\\n* Add width styles to new sidebar\\r\\n\\r\\nAlso moved private_sources_layout styles to sources.scss file. Having separate files for that little amount of custom styles is unnecessary.\\r\\n\\r\\n* Move top-level header to sidebar\\r\\n\\r\\n* Add missing padding to sidebar\\r\\n\\r\\n* Replace ViewContentHeader with ContentSection props\\r\\n\\r\\n* Move variables over the components\\r\\n\\r\\n* Remove unused classnames\\r\\n\\r\\n* DRY out privateSourcesTable and privateSourcesEmptyState\\r\\n\\r\\nby extracting privateSourcesSection that contains common markup.\\r\\n\\r\\n* DRY out sharedSourcesTable and sharedSourcesEmptyState\\r\\n\\r\\nby extracting sharedSourcesSection that contains common markup.\\r\\n\\r\\n* Reorder code blocks inside the file\\r\\n\\r\\nTo match the order the components appear in UI\\r\\n\\r\\n* Add newline to the groups enumeration sentence\\r\\n\\r\\nSo it looks good with any number of groups\\r\\n\\r\\n* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx\\r\\n\\r\\nCo-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>\\r\\n\\r\\nCo-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>\\r\\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\",\"pullNumber\":91136,\"existingTargetPullRequests\":[]}] to 7.x"}

Backporting to 7.x:
{"level":"info","message":"Backporting via filesystem"}
{"level":"info","message":"Creating PR with title: \"[7.x] [Workplace Search] Update personal dashboard (#91136)\". kibanamachine:backport/7.x/pr-91136 -> 7.x"}
{"level":"info","message":"POST /repos/elastic/kibana/pulls - 201 in 1114ms"}
{"level":"info","message":"Adding assignees to #91219: yakhinvadim"}
{"level":"info","message":"POST /repos/elastic/kibana/issues/91219/assignees - 201 in 738ms"}
{"level":"info","message":"Adding labels: backport"}
{"level":"info","message":"POST /repos/elastic/kibana/issues/91219/labels - 200 in 366ms"}
View pull request: https://github.com/elastic/kibana/pull/91219

scottybollinger added a commit that referenced this pull request Feb 11, 2021
* Remove "Add a private content source" sidebar link

* Update groupsSentence to cover different number of groups

Different cases:
1 group: You have access to the following sources through the group Default.
2 groups: You have access to the following sources through the groups Default and Engineering. (no comma before 'and')
3+ groups: You have access to the following sources through the groups Default, Marketing, and Engineering. (comma before 'and')

* Create PrivateSourcesLayout as a copy of Layout

In this commit PrivateSourcesLayout is a full copy of Layout.
It's going to be updated in later commits.

* Remove unused code from PrivateSourcesLayout

* Update read-only mode warning copy for end-users

* Move copy to constants file

* Add width styles to new sidebar

Also moved private_sources_layout styles to sources.scss file. Having separate files for that little amount of custom styles is unnecessary.

* Move top-level header to sidebar

* Add missing padding to sidebar

* Replace ViewContentHeader with ContentSection props

* Move variables over the components

* Remove unused classnames

* DRY out privateSourcesTable and privateSourcesEmptyState

by extracting privateSourcesSection that contains common markup.

* DRY out sharedSourcesTable and sharedSourcesEmptyState

by extracting sharedSourcesSection that contains common markup.

* Reorder code blocks inside the file

To match the order the components appear in UI

* Add newline to the groups enumeration sentence

So it looks good with any number of groups

* Update x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/private_sources_layout.tsx

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Vadim Yakhin <yakhin.v@gmail.com>
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
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 Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants