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

Listing page papercuts part 1 #205914

Conversation

paulinashakirova
Copy link
Contributor

@paulinashakirova paulinashakirova commented Jan 8, 2025

Summary

This PR fixes Annotation groups Listing Page Papercuts and Dashboard Listing Page Papercuts issues.

  1. Changed the name of the first column
  2. Fixed edit icon being invisible while editing functionality is available.
    In the past the logic was different - hiding of icon was happening based on isEditable(item) property, and in the [Managed content] readonly in library views PR the logic was changed to depend on adding a key { edit: { enabled: false } if there is a need to hide the Edit button. What happened is that the logic should be -> If you don't want to show the Edit icon, add { edit: { enabled: false }, but in the current code, although there is no such key, the pencil stays invisible, because the Boolean(tableItemsRowActions[item.id]?.edit?.enabled) resolved to false when it is undefined (when the Edit functionality isn't disabled.) In this PR I propose an adjustment to this line of code.
  3. Changed the View Details icon.
  4. Show Reload page toast when a user changes preferred savedObjects:perPage in Advanced Settings.
  5. Fix sorting algorithm that was sorting incorrectly if the preferred savedObjects:perPage was less than 10.
Screenshot 2025-01-09 at 13 44 39 Screenshot 2025-01-09 at 13 43 30

@paulinashakirova paulinashakirova added release_note:fix Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) papercut Small "burr" in the product that we should fix. labels Jan 8, 2025
@paulinashakirova paulinashakirova self-assigned this Jan 8, 2025
@paulinashakirova paulinashakirova marked this pull request as ready for review January 8, 2025 17:05
@paulinashakirova paulinashakirova requested a review from a team as a code owner January 8, 2025 17:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@paulinashakirova paulinashakirova requested a review from a team as a code owner January 8, 2025 23:22
@paulinashakirova paulinashakirova removed request for a team and dplumlee January 9, 2025 12:22
@paulinashakirova paulinashakirova requested a review from a team as a code owner January 9, 2025 12:41
@elasticmachine
Copy link
Contributor

💚 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
dashboard 666.5KB 666.5KB +13.0B
eventAnnotationListing 231.0KB 231.0KB +13.0B
filesManagement 122.3KB 122.4KB +13.0B
graph 414.3KB 414.3KB +13.0B
maps 3.0MB 3.0MB +13.0B
visualizations 327.4KB 327.4KB +13.0B
total +78.0B

History

cc @paulinashakirova

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Code-only review, savedObjects:perPage change LGTM.

@@ -23,6 +23,7 @@ export const uiSettings: Record<string, UiSettingsParams> = {
description: i18n.translate('savedObjectsFinder.advancedSettings.perPageText', {
defaultMessage: 'Number of objects to show per page in the load dialog',
}),
requiresPageReload: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious because I didn't see it mentioned in the linked issues, but what prompted this change? Were SO tables not getting the updated value without a reload?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @davismcphee! 👋🏻
Yes, this is what I found to be the case. 😊
I was working on the part that says "table paging should respect savedObjects:perPage advanced setting." in the parent Meta issue, and that point made me research why this was even the question. And those 2 things I found - fixed the issue.

Copy link
Contributor

@Dosant Dosant 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.

This is a different issue for potentially another PR, but I noticed it because of a fixed edit icon that is now visible. I think this gap that is coming from EUI is a bit too large:

Screenshot 2025-01-10 at 10 57 40

I wonder if we should override and remove it:

Screenshot 2025-01-10 at 10 59 34

@ek-so wdyt?

@paulinashakirova paulinashakirova merged commit 86e8a2f into elastic:main Jan 10, 2025
8 checks passed
@paulinashakirova paulinashakirova deleted the annotation-group-listing-page-papercuts branch January 10, 2025 13:38
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12710599148

@paulinashakirova paulinashakirova changed the title [VisLibrary] AnnotGroup listing page papercuts Listing page papercuts part 1 Jan 10, 2025
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 10, 2025
## Summary
This PR fixes [Annotation groups Listing Page
Papercuts](elastic#198731) and
[Dashboard Listing Page
Papercuts](elastic#198728) issues.

1. Changed the name of the first column
2. Fixed edit icon being invisible while editing functionality is
available.
In the past the logic was different - hiding of icon was happening based
on `isEditable(item)` property, and in the [[Managed content] readonly
in library
views](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)
PR the logic was changed to depend on adding a key `{ edit: { enabled:
false }` if there is a need to hide the Edit button. What happened is
that the logic should be -> If you don't want to show the Edit icon, add
`{ edit: { enabled: false }`, but in the current code, although there is
no such key, the pencil stays invisible, because the
`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved to
`false` when it is `undefined` (when the Edit functionality isn't
disabled.) In this PR I propose an adjustment to this line of code.
3. Changed the View Details icon.
4. Show Reload page toast when a user changes preferred
`savedObjects:perPage` in Advanced Settings.
5. Fix sorting algorithm that was sorting incorrectly if the preferred
`savedObjects:perPage` was less than 10.

<img width="237" alt="Screenshot 2025-01-09 at 13 44 39"
src="https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9"
/>

<img width="243" alt="Screenshot 2025-01-09 at 13 43 30"
src="https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd"
/>

(cherry picked from commit 86e8a2f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 10, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[VisLibrary] AnnotGroup listing page papercuts
(#205914)](#205914)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Paulina
Shakirova","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-10T13:38:00Z","message":"[VisLibrary]
AnnotGroup listing page papercuts (#205914)\n\n## Summary\nThis PR fixes
[Annotation groups Listing
Page\nPapercuts](#198731)
and\n[Dashboard Listing
Page\nPapercuts](#198728)
issues.\n\n1. Changed the name of the first column\n2. Fixed edit icon
being invisible while editing functionality is\navailable.\nIn the past
the logic was different - hiding of icon was happening based\non
`isEditable(item)` property, and in the [[Managed content] readonly\nin
library\nviews](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)\nPR
the logic was changed to depend on adding a key `{ edit: {
enabled:\nfalse }` if there is a need to hide the Edit button. What
happened is\nthat the logic should be -> If you don't want to show the
Edit icon, add\n`{ edit: { enabled: false }`, but in the current code,
although there is\nno such key, the pencil stays invisible, because
the\n`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved
to\n`false` when it is `undefined` (when the Edit functionality
isn't\ndisabled.) In this PR I propose an adjustment to this line of
code.\n3. Changed the View Details icon.\n4. Show Reload page toast when
a user changes preferred\n`savedObjects:perPage` in Advanced
Settings.\n5. Fix sorting algorithm that was sorting incorrectly if the
preferred\n`savedObjects:perPage` was less than 10.\n\n<img
width=\"237\" alt=\"Screenshot 2025-01-09 at 13 44
39\"\nsrc=\"https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9\"\n/>\n\n<img
width=\"243\" alt=\"Screenshot 2025-01-09 at 13 43
30\"\nsrc=\"https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd\"\n/>","sha":"86e8a2fceeb24c83f52d421c18600811ac028ef4","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:SharedUX","backport:prev-minor","papercut"],"title":"[VisLibrary]
AnnotGroup listing page
papercuts","number":205914,"url":"https://github.com/elastic/kibana/pull/205914","mergeCommit":{"message":"[VisLibrary]
AnnotGroup listing page papercuts (#205914)\n\n## Summary\nThis PR fixes
[Annotation groups Listing
Page\nPapercuts](#198731)
and\n[Dashboard Listing
Page\nPapercuts](#198728)
issues.\n\n1. Changed the name of the first column\n2. Fixed edit icon
being invisible while editing functionality is\navailable.\nIn the past
the logic was different - hiding of icon was happening based\non
`isEditable(item)` property, and in the [[Managed content] readonly\nin
library\nviews](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)\nPR
the logic was changed to depend on adding a key `{ edit: {
enabled:\nfalse }` if there is a need to hide the Edit button. What
happened is\nthat the logic should be -> If you don't want to show the
Edit icon, add\n`{ edit: { enabled: false }`, but in the current code,
although there is\nno such key, the pencil stays invisible, because
the\n`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved
to\n`false` when it is `undefined` (when the Edit functionality
isn't\ndisabled.) In this PR I propose an adjustment to this line of
code.\n3. Changed the View Details icon.\n4. Show Reload page toast when
a user changes preferred\n`savedObjects:perPage` in Advanced
Settings.\n5. Fix sorting algorithm that was sorting incorrectly if the
preferred\n`savedObjects:perPage` was less than 10.\n\n<img
width=\"237\" alt=\"Screenshot 2025-01-09 at 13 44
39\"\nsrc=\"https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9\"\n/>\n\n<img
width=\"243\" alt=\"Screenshot 2025-01-09 at 13 43
30\"\nsrc=\"https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd\"\n/>","sha":"86e8a2fceeb24c83f52d421c18600811ac028ef4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205914","number":205914,"mergeCommit":{"message":"[VisLibrary]
AnnotGroup listing page papercuts (#205914)\n\n## Summary\nThis PR fixes
[Annotation groups Listing
Page\nPapercuts](#198731)
and\n[Dashboard Listing
Page\nPapercuts](#198728)
issues.\n\n1. Changed the name of the first column\n2. Fixed edit icon
being invisible while editing functionality is\navailable.\nIn the past
the logic was different - hiding of icon was happening based\non
`isEditable(item)` property, and in the [[Managed content] readonly\nin
library\nviews](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)\nPR
the logic was changed to depend on adding a key `{ edit: {
enabled:\nfalse }` if there is a need to hide the Edit button. What
happened is\nthat the logic should be -> If you don't want to show the
Edit icon, add\n`{ edit: { enabled: false }`, but in the current code,
although there is\nno such key, the pencil stays invisible, because
the\n`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved
to\n`false` when it is `undefined` (when the Edit functionality
isn't\ndisabled.) In this PR I propose an adjustment to this line of
code.\n3. Changed the View Details icon.\n4. Show Reload page toast when
a user changes preferred\n`savedObjects:perPage` in Advanced
Settings.\n5. Fix sorting algorithm that was sorting incorrectly if the
preferred\n`savedObjects:perPage` was less than 10.\n\n<img
width=\"237\" alt=\"Screenshot 2025-01-09 at 13 44
39\"\nsrc=\"https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9\"\n/>\n\n<img
width=\"243\" alt=\"Screenshot 2025-01-09 at 13 43
30\"\nsrc=\"https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd\"\n/>","sha":"86e8a2fceeb24c83f52d421c18600811ac028ef4"}}]}]
BACKPORT-->

Co-authored-by: Paulina Shakirova <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary
This PR fixes [Annotation groups Listing Page
Papercuts](elastic#198731) and
[Dashboard Listing Page
Papercuts](elastic#198728) issues.

1. Changed the name of the first column
2. Fixed edit icon being invisible while editing functionality is
available.
In the past the logic was different - hiding of icon was happening based
on `isEditable(item)` property, and in the [[Managed content] readonly
in library
views](https://github.com/elastic/kibana/pull/176263/files#diff-e442682471f1021a9126ddcad7e00a0d334e57ac8db512c1c3268e14ecac0074L552)
PR the logic was changed to depend on adding a key `{ edit: { enabled:
false }` if there is a need to hide the Edit button. What happened is
that the logic should be -> If you don't want to show the Edit icon, add
`{ edit: { enabled: false }`, but in the current code, although there is
no such key, the pencil stays invisible, because the
`Boolean(tableItemsRowActions[item.id]?.edit?.enabled)` resolved to
`false` when it is `undefined` (when the Edit functionality isn't
disabled.) In this PR I propose an adjustment to this line of code.
3. Changed the View Details icon.
4. Show Reload page toast when a user changes preferred
`savedObjects:perPage` in Advanced Settings.
5. Fix sorting algorithm that was sorting incorrectly if the preferred
`savedObjects:perPage` was less than 10.

<img width="237" alt="Screenshot 2025-01-09 at 13 44 39"
src="https://github.com/user-attachments/assets/77a6fd45-8845-4b06-818c-0af0dc01ede9"
/>

<img width="243" alt="Screenshot 2025-01-09 at 13 43 30"
src="https://github.com/user-attachments/assets/3d9e03da-94dd-4e31-b33a-eb81e71b69dd"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) papercut Small "burr" in the product that we should fix. release_note:fix Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotation groups Listing Page Papercuts
5 participants