-
- Downloads
Fix archived items tooltip that's missing the item type (#33970)
* Make archived item rely on the `model` for its type The `type` prop doesn't exist in the list of items. `models` on the other hand exists and it shows the underlying item model, which almost 1:1 matches the desired type. Almost, because we can questions "card" in the code. That will be accounted for in the next commit. * Handle `card` and `dataset` models Show "question` and "model" in the UI instead. * Move `getTranslatedEntityName` to the common utils * Use translated entities for the archived item tooltip * Switch back to the implicit return * Lowercase the translated model name * Add missing string translation * Add unit test for `getTranslatedEntityName`
Showing
- frontend/src/metabase-types/api/collection.ts 1 addition, 1 deletionfrontend/src/metabase-types/api/collection.ts
- frontend/src/metabase/archive/containers/ArchiveApp.tsx 1 addition, 1 deletionfrontend/src/metabase/archive/containers/ArchiveApp.tsx
- frontend/src/metabase/common/utils/model-names.ts 1 addition, 1 deletionfrontend/src/metabase/common/utils/model-names.ts
- frontend/src/metabase/common/utils/model-names.unit.spec.ts 15 additions, 0 deletionsfrontend/src/metabase/common/utils/model-names.unit.spec.ts
- frontend/src/metabase/components/ArchivedItem/ArchivedItem.tsx 15 additions, 4 deletions...end/src/metabase/components/ArchivedItem/ArchivedItem.tsx
- frontend/src/metabase/nav/components/RecentsList.jsx 1 addition, 1 deletionfrontend/src/metabase/nav/components/RecentsList.jsx
- frontend/src/metabase/nav/utils/index.js 0 additions, 1 deletionfrontend/src/metabase/nav/utils/index.js
- frontend/src/metabase/search/components/InfoText.tsx 1 addition, 1 deletionfrontend/src/metabase/search/components/InfoText.tsx
- frontend/src/metabase/search/components/SearchFilterModal/filters/TypeFilter.tsx 1 addition, 1 deletion...earch/components/SearchFilterModal/filters/TypeFilter.tsx
Loading
Please register or sign in to comment