Display official badge throughout the application (#17125)
* Add getCollectionIcon function * Add isRegularCollection function * Display official badge in collections sidebar * Don't dim official badge icon in collections sidebar * Show root collection icon * Use `CollectionsList.Icon` for "All personal collections" * Fix CollectionBadge icon color * Display official collection badge in search results * Test official badge displayed correctly in sidebar * Test official badge is shown throughout the app * Show official badge icon in SavedQuestionPicker * Use existing isPersonalCollection utility * Show official badge icon in QuestionPicker * Show official badge icon in CollectionPicker * Minor CollectionIcon refactoring * Use function declaration for isRegularCollection * Add editCollection test helper * Add changeCollectionTypeTo helper * Remove duplicated assertions * Add helper to create official collection * Add testOfficialBadgeInSearch helper
Showing
- enterprise/frontend/src/metabase-enterprise/collections/index.js 8 additions, 0 deletions...ise/frontend/src/metabase-enterprise/collections/index.js
- frontend/src/metabase/collections/components/CollectionIcon.jsx 18 additions, 0 deletions...nd/src/metabase/collections/components/CollectionIcon.jsx
- frontend/src/metabase/collections/components/CollectionLink.jsx 13 additions, 3 deletions...nd/src/metabase/collections/components/CollectionLink.jsx
- frontend/src/metabase/collections/components/CollectionList.styled.js 24 additions, 0 deletions.../metabase/collections/components/CollectionList.styled.js
- frontend/src/metabase/collections/components/CollectionsList.jsx 10 additions, 7 deletions...d/src/metabase/collections/components/CollectionsList.jsx
- frontend/src/metabase/collections/containers/CollectionSidebar/CollectionSidebarFooter/CollectionSidebarFooter.jsx 3 additions, 1 deletion...debar/CollectionSidebarFooter/CollectionSidebarFooter.jsx
- frontend/src/metabase/collections/containers/CollectionSidebar/Collections/Collections.jsx 0 additions, 1 deletion.../containers/CollectionSidebar/Collections/Collections.jsx
- frontend/src/metabase/collections/containers/CollectionSidebar/RootCollectionLink/RootCollectionLink.jsx 2 additions, 0 deletions...llectionSidebar/RootCollectionLink/RootCollectionLink.jsx
- frontend/src/metabase/components/Badge.jsx 16 additions, 2 deletionsfrontend/src/metabase/components/Badge.jsx
- frontend/src/metabase/components/select-list/SelectListItem.jsx 3 additions, 1 deletion...nd/src/metabase/components/select-list/SelectListItem.jsx
- frontend/src/metabase/components/select-list/SelectListItem.styled.jsx 4 additions, 4 deletions...metabase/components/select-list/SelectListItem.styled.jsx
- frontend/src/metabase/components/tree/TreeNode.jsx 3 additions, 2 deletionsfrontend/src/metabase/components/tree/TreeNode.jsx
- frontend/src/metabase/containers/ItemPicker.jsx 5 additions, 2 deletionsfrontend/src/metabase/containers/ItemPicker.jsx
- frontend/src/metabase/dashboard/components/add-card-sidebar/QuestionPicker.jsx 21 additions, 10 deletions.../dashboard/components/add-card-sidebar/QuestionPicker.jsx
- frontend/src/metabase/entities/collections.js 16 additions, 1 deletionfrontend/src/metabase/entities/collections.js
- frontend/src/metabase/nav/components/SearchBar.jsx 5 additions, 1 deletionfrontend/src/metabase/nav/components/SearchBar.jsx
- frontend/src/metabase/plugins/index.js 1 addition, 0 deletionsfrontend/src/metabase/plugins/index.js
- frontend/src/metabase/query_builder/components/saved-question-picker/utils.js 12 additions, 18 deletions...e/query_builder/components/saved-question-picker/utils.js
- frontend/src/metabase/questions/components/CollectionBadge.jsx 3 additions, 1 deletion...end/src/metabase/questions/components/CollectionBadge.jsx
- frontend/src/metabase/search/components/SearchResult.jsx 22 additions, 3 deletionsfrontend/src/metabase/search/components/SearchResult.jsx
Please register or sign in to comment