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

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ function TableListViewTableComp<T extends UserContentCommonSchema>({
pageIndex: 0,
totalItemCount: 0,
pageSize: initialPageSize,
pageSizeOptions: uniq([10, 20, 50, initialPageSize]).sort(),
pageSizeOptions: uniq([10, 20, 50, initialPageSize]).sort((a, b) => Number(a) - Number(b)),
},
tableSort: initialSort.tableSort,
sortColumnChanged: !initialSort.isDefault,
Expand Down Expand Up @@ -606,7 +606,7 @@ function TableListViewTableComp<T extends UserContentCommonSchema>({
name:
titleColumnName ??
i18n.translate('contentManagement.tableList.mainColumnName', {
defaultMessage: 'Name, description, tags',
paulinashakirova marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage: 'Name',
}),
sortable: true,
render: (field: keyof T, record: T) => {
Expand Down Expand Up @@ -696,7 +696,7 @@ function TableListViewTableComp<T extends UserContentCommonSchema>({
),
icon: 'pencil',
type: 'icon',
available: (item) => Boolean(tableItemsRowActions[item.id]?.edit?.enabled),
available: (item) => tableItemsRowActions[item.id]?.edit?.enabled !== false,
enabled: (v) => !(v as unknown as { error: string })?.error,
onClick: editItem,
'data-test-subj': `edit-action`,
Expand All @@ -722,7 +722,7 @@ function TableListViewTableComp<T extends UserContentCommonSchema>({
defaultMessage: 'View details',
}
),
icon: 'iInCircle',
icon: 'controlsVertical',
type: 'icon',
onClick: inspectItem,
'data-test-subj': `inspect-action`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

schema: schema.number(),
},
[LISTING_LIMIT_SETTING]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
"contentManagement.tableList.listing.userFilter.errorMessage": "Échec de chargement des utilisateurs",
"contentManagement.tableList.listing.userFilter.filterLabel": "Créé par",
"contentManagement.tableList.listing.userFilter.noCreators": "Aucun créateur",
"contentManagement.tableList.mainColumnName": "Nom, description, balises",
"contentManagement.tableList.mainColumnName": "",
paulinashakirova marked this conversation as resolved.
Show resolved Hide resolved
"contentManagement.tableList.managedItemNoEdit": "Elastic gère cet objet. Clonez-le pour effectuer des modifications.",
"contentManagement.tableList.tabsFilter.allTabLabel": "Tous",
"contentManagement.tableList.tabsFilter.favoriteTabLabel": "Éléments avec étoiles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
"contentManagement.tableList.listing.userFilter.errorMessage": "ユーザーの読み込みに失敗しました",
"contentManagement.tableList.listing.userFilter.filterLabel": "作成者",
"contentManagement.tableList.listing.userFilter.noCreators": "作成担当なし",
"contentManagement.tableList.mainColumnName": "名前、説明、タグ",
"contentManagement.tableList.mainColumnName": "",
"contentManagement.tableList.managedItemNoEdit": "Elasticはこの項目を管理します。変更するには、複製してください。",
"contentManagement.tableList.tabsFilter.allTabLabel": "すべて",
"contentManagement.tableList.tabsFilter.favoriteTabLabel": "スター付き",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@
"contentManagement.tableList.listing.userFilter.errorMessage": "无法加载用户",
"contentManagement.tableList.listing.userFilter.filterLabel": "创建者",
"contentManagement.tableList.listing.userFilter.noCreators": "无创建者",
"contentManagement.tableList.mainColumnName": "名称、描述、标签",
"contentManagement.tableList.mainColumnName": "",
"contentManagement.tableList.managedItemNoEdit": "Elastic 将管理此项目。进行克隆以做出更改。",
"contentManagement.tableList.tabsFilter.allTabLabel": "全部",
"contentManagement.tableList.tabsFilter.favoriteTabLabel": "带星标",
Expand Down