Renamed MySquads to MyGroups
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
'@backstage/plugin-org': patch
|
||||
---
|
||||
|
||||
Introduced a new MySquads SidebarItem that links to one or more groups based on the logged in user's membership.
|
||||
Introduced a new MyGroups SidebarItem that links to one or more groups based on the logged in user's membership.
|
||||
|
||||
To use MySquads you'll need to add it to your `Root.tsx` like this:
|
||||
To use MyGroups you'll need to add it to your `Root.tsx` like this:
|
||||
|
||||
```diff
|
||||
// app/src/components/Root/Root.tsx
|
||||
+ import { MySquads } from '@backstage/plugin-org';
|
||||
+ import { MyGroups } from '@backstage/plugin-org';
|
||||
+ import GroupIcon from '@material-ui/icons/People';
|
||||
|
||||
<SidebarPage>
|
||||
@@ -18,7 +18,7 @@ To use MySquads you'll need to add it to your `Root.tsx` like this:
|
||||
{/* Global nav, not org-specific */}
|
||||
//...
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
+ <MySquads
|
||||
+ <MyGroups
|
||||
+ singularTitle="My Squad"
|
||||
+ pluralTitle="My Squads"
|
||||
+ icon={GroupIcon}
|
||||
|
||||
@@ -47,7 +47,7 @@ import {
|
||||
SidebarScrollWrapper,
|
||||
SidebarSpace,
|
||||
} from '@backstage/core-components';
|
||||
import { MySquads } from '@backstage/plugin-org';
|
||||
import { MyGroups } from '@backstage/plugin-org';
|
||||
import GroupIcon from '@material-ui/icons/People';
|
||||
|
||||
const useSidebarLogoStyles = makeStyles({
|
||||
@@ -94,7 +94,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
<MySquads
|
||||
<MyGroups
|
||||
singularTitle="My Squad"
|
||||
pluralTitle="My Squads"
|
||||
icon={GroupIcon}
|
||||
|
||||
@@ -64,10 +64,10 @@ export const MembersListCard: (_props: {
|
||||
pageSize?: number;
|
||||
}) => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "MySquads" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
// Warning: (ae-missing-release-tag) "MyGroups" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const MySquads: ({
|
||||
export const MyGroups: ({
|
||||
singularTitle,
|
||||
pluralTitle,
|
||||
icon,
|
||||
|
||||
+8
-8
@@ -16,16 +16,16 @@
|
||||
|
||||
import { renderInTestApp, TestApiProvider } from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { MySquads } from '.';
|
||||
import { MyGroups } from '.';
|
||||
import GroupIcon from '@material-ui/icons/People';
|
||||
import { IdentityApi, identityApiRef } from '@backstage/core-plugin-api';
|
||||
import { CatalogApi } from '@backstage/catalog-client';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { catalogApiRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
describe('MySquads Test', () => {
|
||||
describe('MyGroups Test', () => {
|
||||
describe('For guests or users with no groups', () => {
|
||||
it('MySquads should be empty', async () => {
|
||||
it('MyGroups should be empty', async () => {
|
||||
const identityApi: Partial<IdentityApi> = {
|
||||
getBackstageIdentity: async () => ({
|
||||
type: 'user',
|
||||
@@ -46,7 +46,7 @@ describe('MySquads Test', () => {
|
||||
[catalogApiRef, catalogApi],
|
||||
]}
|
||||
>
|
||||
<MySquads
|
||||
<MyGroups
|
||||
singularTitle="My Squad"
|
||||
pluralTitle="My Squads"
|
||||
icon={GroupIcon}
|
||||
@@ -59,7 +59,7 @@ describe('MySquads Test', () => {
|
||||
});
|
||||
|
||||
describe('For users that are members of a single group', () => {
|
||||
it('MySquads should display a single item that links to their group', async () => {
|
||||
it('MyGroups should display a single item that links to their group', async () => {
|
||||
const identityApi: Partial<IdentityApi> = {
|
||||
getBackstageIdentity: async () => ({
|
||||
type: 'user',
|
||||
@@ -94,7 +94,7 @@ describe('MySquads Test', () => {
|
||||
[catalogApiRef, catalogApi],
|
||||
]}
|
||||
>
|
||||
<MySquads
|
||||
<MyGroups
|
||||
singularTitle="My Squad"
|
||||
pluralTitle="My Squads"
|
||||
icon={GroupIcon}
|
||||
@@ -110,7 +110,7 @@ describe('MySquads Test', () => {
|
||||
});
|
||||
|
||||
describe('For users that are members of multiple groups', () => {
|
||||
it('MySquads should display a sub-menu with all their groups and a link to each group', async () => {
|
||||
it('MyGroups should display a sub-menu with all their groups and a link to each group', async () => {
|
||||
const identityApi: Partial<IdentityApi> = {
|
||||
getBackstageIdentity: async () => ({
|
||||
type: 'user',
|
||||
@@ -171,7 +171,7 @@ describe('MySquads Test', () => {
|
||||
[catalogApiRef, catalogApi],
|
||||
]}
|
||||
>
|
||||
<MySquads
|
||||
<MyGroups
|
||||
singularTitle="My Squad"
|
||||
pluralTitle="My Squads"
|
||||
icon={GroupIcon}
|
||||
+1
-1
@@ -28,7 +28,7 @@ import {
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog-react';
|
||||
|
||||
export const MySquads = ({
|
||||
export const MyGroups = ({
|
||||
singularTitle,
|
||||
pluralTitle,
|
||||
icon,
|
||||
+1
-1
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { MySquads } from './MySquads';
|
||||
export { MyGroups } from './MyGroups';
|
||||
@@ -15,4 +15,4 @@
|
||||
*/
|
||||
|
||||
export * from './Cards';
|
||||
export { MySquads } from './MySquads';
|
||||
export { MyGroups } from './MyGroups';
|
||||
|
||||
Reference in New Issue
Block a user