From b1cc10696f2f23033430997bba9e808b35035dfe Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Mon, 12 Jun 2023 20:47:10 +0300 Subject: [PATCH 01/38] =?UTF-8?q?=E2=9C=A8Make=20incremental=20event=20han?= =?UTF-8?q?dler=20to=20be=20both=20explicity=20and=20async?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The point of the event hook is to map incoming changes into catalog deltas. However, this is not always a synchronous process, and might require accessing other resources to get the actual delta. This just converts the hook into an async function and awaits it on the other end. This also cleans up the API a little bit by not relying on `undefined` to indicate that the event was ignored, but by explicitly forcing the event handler to indicate that the event is to be ignore by returning { type: "ignored" }. Since ignoring events is a perfectly acceptable outcome, the warning if the event was dropped is just ignored. If there is an error, it should be propagated as an exception. This is purely an aesthetic change designed to communicate via usage how to use the API. Signed-off-by: Charles Lowell --- .changeset/rotten-colts-decide.md | 5 ++++ .../api-report.md | 22 +++++++++----- .../src/engine/IncrementalIngestionEngine.ts | 21 ++++++-------- .../src/index.ts | 1 + .../src/types.ts | 29 ++++++++++++++----- 5 files changed, 50 insertions(+), 28 deletions(-) create mode 100644 .changeset/rotten-colts-decide.md diff --git a/.changeset/rotten-colts-decide.md b/.changeset/rotten-colts-decide.md new file mode 100644 index 0000000000..9fddafe6f8 --- /dev/null +++ b/.changeset/rotten-colts-decide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-incremental-ingestion': minor +--- + +Allow incremental event handlers to be async; Force event handler to indicate if it made a change diff --git a/plugins/catalog-backend-module-incremental-ingestion/api-report.md b/plugins/catalog-backend-module-incremental-ingestion/api-report.md index c2fad4576c..4088b05bb5 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/api-report.md +++ b/plugins/catalog-backend-module-incremental-ingestion/api-report.md @@ -48,18 +48,24 @@ export class IncrementalCatalogBuilder { ): Promise; } +// @public +export type IncrementalEntityEventResult = + | { + type: 'ignored'; + } + | { + type: 'delta'; + added: DeferredEntity[]; + removed: { + entityRef: string; + }[]; + }; + // @public export interface IncrementalEntityProvider { around(burst: (context: TContext) => Promise): Promise; eventHandler?: { - onEvent: (params: EventParams) => - | undefined - | { - added: DeferredEntity[]; - removed: { - entityRef: string; - }[]; - }; + onEvent: (params: EventParams) => Promise; supportsEventTopics: () => string[]; }; getProviderName(): string; diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.ts b/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.ts index 13d5bfff71..0262dfd418 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/engine/IncrementalIngestionEngine.ts @@ -347,10 +347,10 @@ export class IncrementalIngestionEngine return; } - const delta = provider.eventHandler.onEvent(params); + const result = await provider.eventHandler.onEvent(params); - if (delta) { - if (delta.added.length > 0) { + if (result.type === 'delta') { + if (result.added.length > 0) { const ingestionRecord = await this.manager.getCurrentIngestionRecord( providerName, ); @@ -370,24 +370,21 @@ export class IncrementalIngestionEngine `Cannot apply delta, page records are missing! Please re-run incremental ingestion for ${providerName}.`, ); } - await this.manager.createMarkEntities(mark.id, delta.added); + await this.manager.createMarkEntities(mark.id, result.added); } } - if (delta.removed.length > 0) { - await this.manager.deleteEntityRecordsByRef(delta.removed); + if (result.removed.length > 0) { + await this.manager.deleteEntityRecordsByRef(result.removed); } - await connection.applyMutation({ - type: 'delta', - ...delta, - }); + await connection.applyMutation(result); logger.debug( `incremental-engine: ${providerName} processed delta from '${topic}' event`, ); } else { - logger.warn( - `incremental-engine: Rejected delta from '${topic}' event - empty or invalid`, + logger.debug( + `incremental-engine: ${providerName} ignored event from topic '${topic}'`, ); } } diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/index.ts b/plugins/catalog-backend-module-incremental-ingestion/src/index.ts index ff1ee1faa1..f381572149 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/index.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/index.ts @@ -23,6 +23,7 @@ export * from './service'; export { type EntityIteratorResult, + type IncrementalEntityEventResult, type IncrementalEntityProvider, type IncrementalEntityProviderOptions, type PluginEnvironment, diff --git a/plugins/catalog-backend-module-incremental-ingestion/src/types.ts b/plugins/catalog-backend-module-incremental-ingestion/src/types.ts index 5f9d0489e6..68ad2b8b04 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/src/types.ts +++ b/plugins/catalog-backend-module-incremental-ingestion/src/types.ts @@ -91,15 +91,12 @@ export interface IncrementalEntityProvider { * optionally maps the payload to an object containing a delta * mutation. * - * If a valid delta is returned by this method, it will be ingested - * automatically by the provider. + * If a delta result is returned by this method, it will be ingested + * automatically by the provider. Alternatively, if an "ignored" result is + * returned, then it is understood that this event should not cause anything + * to be ingested. */ - onEvent: (params: EventParams) => - | undefined - | { - added: DeferredEntity[]; - removed: { entityRef: string }[]; - }; + onEvent: (params: EventParams) => Promise; /** * This method returns an array of topics for the IncrementalEntityProvider @@ -109,6 +106,22 @@ export interface IncrementalEntityProvider { }; } +/** + * An object returned by event handler to indicate whether to ignore the event + * or to apply a delta in response to the event. + * + * @public + */ +export type IncrementalEntityEventResult = + | { + type: 'ignored'; + } + | { + type: 'delta'; + added: DeferredEntity[]; + removed: { entityRef: string }[]; + }; + /** * Value returned by an {@link IncrementalEntityProvider} to provide a * single page of entities to ingest. From c3381408d6336e356d1a7deb502de1bc593868cf Mon Sep 17 00:00:00 2001 From: Ciprianna Engel Date: Thu, 22 Jun 2023 22:24:21 -0500 Subject: [PATCH 02/38] Use navigation handler in onClick to view full results Full results button in searchModal was not correctly navigating onClick. This switches the onClick to the correct handler function to navigate. Signed-off-by: Ciprianna Engel --- .changeset/afraid-windows-rule.md | 5 +++ .../SearchModal/SearchModal.test.tsx | 34 +++++++++++++++++++ .../components/SearchModal/SearchModal.tsx | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .changeset/afraid-windows-rule.md diff --git a/.changeset/afraid-windows-rule.md b/.changeset/afraid-windows-rule.md new file mode 100644 index 0000000000..5ed217d3a3 --- /dev/null +++ b/.changeset/afraid-windows-rule.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search': patch +--- + +Fixed bug in "View Full Results" link of Search Modal that did not navigate to the full results page. diff --git a/plugins/search/src/components/SearchModal/SearchModal.test.tsx b/plugins/search/src/components/SearchModal/SearchModal.test.tsx index 1ab7952a2b..33c2df9ab8 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.test.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.test.tsx @@ -45,6 +45,7 @@ describe('SearchModal', () => { beforeEach(() => { query.mockClear(); + navigate.mockClear(); }); const toggleModal = jest.fn(); @@ -207,4 +208,37 @@ describe('SearchModal', () => { expect(navigate).toHaveBeenCalledWith('/search?query=new term'); }); + + it('should navigate with correct search terms to full results', async () => { + const initialState = { + term: 'term', + filters: {}, + types: [], + pageCursor: '', + }; + + await renderInTestApp( + + + + , + { + mountedRoutes: { + '/search': rootRouteRef, + }, + }, + ); + + expect(query).toHaveBeenCalledWith( + expect.objectContaining({ term: 'term' }), + ); + + const fullResultsBtn = screen.getByRole('button', { + name: /view full results/i, + }); + await userEvent.click(fullResultsBtn); + + expect(navigate).toHaveBeenCalledWith('/search?query=term'); + }); }); diff --git a/plugins/search/src/components/SearchModal/SearchModal.tsx b/plugins/search/src/components/SearchModal/SearchModal.tsx index 777a285107..dec0f9f482 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.tsx @@ -154,7 +154,7 @@ export const Modal = ({ toggleModal }: SearchModalChildrenProps) => { className={classes.button} color="primary" endIcon={} - onClick={handleSearchResultClick} + onClick={handleSearchBarSubmit} disableRipple > View Full Results From 2b4513abb7842a75d693ce4c46b9da98ecf75499 Mon Sep 17 00:00:00 2001 From: npiyush97 Date: Wed, 28 Jun 2023 18:59:28 +0530 Subject: [PATCH 03/38] fix-18413 Signed-off-by: npiyush97 --- .changeset/tender-oranges-change.md | 6 ++++++ plugins/adr-common/package.json | 3 ++- plugins/adr-common/src/index.ts | 5 ++++- .../src/components/EntityAdrContent/EntityAdrContent.tsx | 5 ----- yarn.lock | 8 ++++++++ 5 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 .changeset/tender-oranges-change.md diff --git a/.changeset/tender-oranges-change.md b/.changeset/tender-oranges-change.md new file mode 100644 index 0000000000..b4c28fb712 --- /dev/null +++ b/.changeset/tender-oranges-change.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-adr-common': patch +'@backstage/plugin-adr': patch +--- + +fixed error with date parsing. diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index 30c4a2ad11..bbce6fdf4e 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -32,7 +32,8 @@ "@backstage/catalog-model": "workspace:^", "@backstage/integration": "workspace:^", "@backstage/plugin-search-common": "workspace:^", - "front-matter": "^4.0.2" + "front-matter": "^4.0.2", + "luxon": "3.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^" diff --git a/plugins/adr-common/src/index.ts b/plugins/adr-common/src/index.ts index 194f4899d1..97c82b2047 100644 --- a/plugins/adr-common/src/index.ts +++ b/plugins/adr-common/src/index.ts @@ -21,6 +21,7 @@ import { Entity, getEntitySourceLocation } from '@backstage/catalog-model'; import { IndexableDocument } from '@backstage/plugin-search-common'; import { ScmIntegrationRegistry } from '@backstage/integration'; import frontMatter from 'front-matter'; +import { DateTime } from 'luxon'; /** * ADR plugin annotation. @@ -135,10 +136,12 @@ export const parseMadrWithFrontmatter = (content: string): ParsedMadr => { const parsed = frontMatter>(content); const status = parsed.attributes.status; const date = parsed.attributes.date; + const luxdate = DateTime.fromJSDate(new Date(`${date}`)); + const formattedDate = luxdate.toISODate(); return { content: parsed.body, status: status ? String(status) : undefined, - date: date ? String(date) : undefined, + date: date ? String(formattedDate) : undefined, attributes: parsed.attributes, }; }; diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index da575d884f..80418b4aac 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -68,10 +68,6 @@ const useStyles = makeStyles((theme: Theme) => ({ color: theme.palette.grey[700], marginBottom: theme.spacing(1), }, - adrChip: { - position: 'absolute', - right: 0, - }, })); const AdrListContainer = (props: { @@ -139,7 +135,6 @@ const AdrListContainer = (props: { label={adr.status} size="small" variant="outlined" - className={classes.adrChip} /> )} diff --git a/yarn.lock b/yarn.lock index 79561514f7..4a97897ed1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4589,6 +4589,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-search-common": "workspace:^" front-matter: ^4.0.2 + luxon: 3.0.0 languageName: unknown linkType: soft @@ -31149,6 +31150,13 @@ __metadata: languageName: node linkType: hard +"luxon@npm:3.0.0": + version: 3.0.0 + resolution: "luxon@npm:3.0.0" + checksum: c2d13ec1939962a318f5568fc750611346b64fe41041a2ab1c677450b7b41c699ee12ef080ff04d5a2027bf26d962d46661c7c87e394a20f6d60f14edb832c54 + languageName: node + linkType: hard + "luxon@npm:^2.0.2": version: 2.5.2 resolution: "luxon@npm:2.5.2" From 71573c90a398dfc068a6051d025b5631de785949 Mon Sep 17 00:00:00 2001 From: Abhay-soni-developer Date: Fri, 30 Jun 2023 10:54:48 +0530 Subject: [PATCH 04/38] added additional props in entity dependecies cards to manage table options Signed-off-by: Abhay-soni-developer --- .../src/components/EntityTable/EntityTable.tsx | 4 ++++ .../DependsOnComponentsCard/DependsOnComponentsCard.tsx | 9 ++++++++- .../RelatedEntitiesCard/RelatedEntitiesCard.tsx | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx index 424d8b940e..360f0ee1ac 100644 --- a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx +++ b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx @@ -23,6 +23,7 @@ import { InfoCardVariants, Table, TableColumn, + TableOptions, } from '@backstage/core-components'; /** @@ -36,6 +37,7 @@ export interface EntityTableProps { entities: T[]; emptyContent?: ReactNode; columns: TableColumn[]; + tableOptions?: TableOptions; } const useStyles = makeStyles(theme => ({ @@ -59,6 +61,7 @@ export const EntityTable = (props: EntityTableProps) => { emptyContent, variant = 'gridItem', columns, + tableOptions = {}, } = props; const classes = useStyles(); @@ -86,6 +89,7 @@ export const EntityTable = (props: EntityTableProps) => { actionsColumnIndex: -1, padding: 'dense', draggable: false, + ...tableOptions, }} data={entities} /> diff --git a/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx b/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx index a7ff97ec73..f4ea850b9b 100644 --- a/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx +++ b/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx @@ -15,7 +15,11 @@ */ import { RELATION_DEPENDS_ON, ComponentEntity } from '@backstage/catalog-model'; -import { InfoCardVariants, TableColumn } from '@backstage/core-components'; +import { + InfoCardVariants, + TableColumn, + TableOptions, +} from '@backstage/core-components'; import React from 'react'; import { asComponentEntities, @@ -29,6 +33,7 @@ export interface DependsOnComponentsCardProps { variant?: InfoCardVariants; title?: string; columns?: TableColumn[]; + tableOptions?: TableOptions; } export function DependsOnComponentsCard(props: DependsOnComponentsCardProps) { @@ -36,6 +41,7 @@ export function DependsOnComponentsCard(props: DependsOnComponentsCardProps) { variant = 'gridItem', title = 'Depends on components', columns = componentEntityColumns, + tableOptions = {}, } = props; return ( ); } diff --git a/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx b/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx index e802b0b583..7a533dcf5b 100644 --- a/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx +++ b/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx @@ -29,6 +29,7 @@ import { Progress, ResponseErrorPanel, TableColumn, + TableOptions, } from '@backstage/core-components'; /** @public */ @@ -41,6 +42,7 @@ export type RelatedEntitiesCardProps = { emptyMessage: string; emptyHelpLink: string; asRenderableEntities: (entities: Entity[]) => T[]; + tableOptions?: TableOptions; }; /** @@ -67,6 +69,7 @@ export function RelatedEntitiesCard( emptyMessage, emptyHelpLink, asRenderableEntities, + tableOptions = {}, } = props; const { entity } = useEntity(); @@ -105,6 +108,7 @@ export function RelatedEntitiesCard( } columns={columns} entities={asRenderableEntities(entities || [])} + tableOptions={tableOptions} /> ); } From ecacbce405710eee0868d43aad8e67332f131c6f Mon Sep 17 00:00:00 2001 From: Abhay-soni-developer Date: Fri, 30 Jun 2023 12:41:18 +0530 Subject: [PATCH 05/38] DepenedsOnResourcesCard, EntityHasSubcomponentsCard now we can pass tableOptions props through them Signed-off-by: Abhay-soni-developer --- .../DependsOnResourcesCard/DependsOnResourcesCard.tsx | 9 ++++++++- .../HasSubcomponentsCard/HasSubcomponentsCard.tsx | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx b/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx index eba6c1be6b..d99a9df387 100644 --- a/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx +++ b/plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx @@ -15,7 +15,11 @@ */ import { RELATION_DEPENDS_ON, ResourceEntity } from '@backstage/catalog-model'; -import { InfoCardVariants, TableColumn } from '@backstage/core-components'; +import { + InfoCardVariants, + TableColumn, + TableOptions, +} from '@backstage/core-components'; import React from 'react'; import { asResourceEntities, @@ -29,6 +33,7 @@ export interface DependsOnResourcesCardProps { variant?: InfoCardVariants; title?: string; columns?: TableColumn[]; + tableOptions?: TableOptions; } export function DependsOnResourcesCard(props: DependsOnResourcesCardProps) { @@ -36,6 +41,7 @@ export function DependsOnResourcesCard(props: DependsOnResourcesCardProps) { variant = 'gridItem', title = 'Depends on resources', columns = resourceEntityColumns, + tableOptions = {}, } = props; return ( ); } diff --git a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx index db95d31f9f..6c673c5818 100644 --- a/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx +++ b/plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx @@ -15,7 +15,7 @@ */ import { RELATION_HAS_PART } from '@backstage/catalog-model'; -import { InfoCardVariants } from '@backstage/core-components'; +import { InfoCardVariants, TableOptions } from '@backstage/core-components'; import React from 'react'; import { asComponentEntities, @@ -26,10 +26,11 @@ import { /** @public */ export interface HasSubcomponentsCardProps { variant?: InfoCardVariants; + tableOptions?: TableOptions; } export function HasSubcomponentsCard(props: HasSubcomponentsCardProps) { - const { variant = 'gridItem' } = props; + const { variant = 'gridItem', tableOptions = {} } = props; return ( ); } From 6bd5541e1a3886fba78f2927c5c284f13bc16d33 Mon Sep 17 00:00:00 2001 From: Abhay-soni-developer Date: Fri, 30 Jun 2023 13:56:35 +0530 Subject: [PATCH 06/38] docs modified Signed-off-by: Abhay-soni-developer --- plugins/catalog-react/api-report.md | 3 +++ plugins/catalog/api-report.md | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index e9acfa76ce..9bf87778dd 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -25,6 +25,7 @@ import { ScmIntegrationRegistry } from '@backstage/integration'; import { StyleRules } from '@material-ui/core/styles/withStyles'; import { SystemEntity } from '@backstage/catalog-model'; import { TableColumn } from '@backstage/core-components'; +import { TableOptions } from '@backstage/core-components'; // @public export const AsyncEntityProvider: ( @@ -395,6 +396,8 @@ export interface EntityTableProps { // (undocumented) entities: T[]; // (undocumented) + tableOptions?: TableOptions; + // (undocumented) title: string; // (undocumented) variant?: InfoCardVariants; diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index f053c15c8a..475fff2cad 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -27,6 +27,7 @@ import { StarredEntitiesApi } from '@backstage/plugin-catalog-react'; import { StorageApi } from '@backstage/core-plugin-api'; import { StyleRules } from '@material-ui/core/styles/withStyles'; import { TableColumn } from '@backstage/core-components'; +import { TableOptions } from '@backstage/core-components'; import { TableProps } from '@backstage/core-components'; import { TabProps } from '@material-ui/core'; import { UserListFilterKind } from '@backstage/plugin-catalog-react'; @@ -243,6 +244,8 @@ export interface DependsOnComponentsCardProps { // (undocumented) columns?: TableColumn[]; // (undocumented) + tableOptions?: TableOptions; + // (undocumented) title?: string; // (undocumented) variant?: InfoCardVariants; @@ -253,6 +256,8 @@ export interface DependsOnResourcesCardProps { // (undocumented) columns?: TableColumn[]; // (undocumented) + tableOptions?: TableOptions; + // (undocumented) title?: string; // (undocumented) variant?: InfoCardVariants; @@ -437,6 +442,8 @@ export interface HasResourcesCardProps { // @public (undocumented) export interface HasSubcomponentsCardProps { + // (undocumented) + tableOptions?: TableOptions; // (undocumented) variant?: InfoCardVariants; } @@ -495,6 +502,7 @@ export type RelatedEntitiesCardProps = { emptyMessage: string; emptyHelpLink: string; asRenderableEntities: (entities: Entity[]) => T[]; + tableOptions?: TableOptions; }; // @public (undocumented) From a86315d99e59bbb3d16b35481e84acef66baa1fd Mon Sep 17 00:00:00 2001 From: npiyush97 Date: Tue, 4 Jul 2023 14:52:54 +0530 Subject: [PATCH 07/38] added changes regarding ui and fix version range Signed-off-by: npiyush97 --- plugins/adr-common/package.json | 2 +- .../src/components/EntityAdrContent/EntityAdrContent.tsx | 7 ++++++- yarn.lock | 9 +-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index bbce6fdf4e..4172a23ab6 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -33,7 +33,7 @@ "@backstage/integration": "workspace:^", "@backstage/plugin-search-common": "workspace:^", "front-matter": "^4.0.2", - "luxon": "3.0.0" + "luxon": "^3.0.0" }, "devDependencies": { "@backstage/cli": "workspace:^" diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index 80418b4aac..68c5e15e1c 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -68,6 +68,11 @@ const useStyles = makeStyles((theme: Theme) => ({ color: theme.palette.grey[700], marginBottom: theme.spacing(1), }, + adrBox: { + display: 'flex', + justifyContent: 'space-around', + marginTop: '10px', + }, })); const AdrListContainer = (props: { @@ -127,7 +132,7 @@ const AdrListContainer = (props: { style: { whiteSpace: 'normal' }, }} secondary={ - + {adr.date} {adr.status && ( Date: Tue, 4 Jul 2023 23:22:34 +0200 Subject: [PATCH 08/38] fix: use Material UI vs. MUI where relevant Signed-off-by: Olivier Tassinari --- .eslintrc.js | 9 ++-- docs/FAQ.md | 10 ++-- docs/api/deprecations.md | 4 +- docs/dls/component-design-guidelines.md | 12 ++--- docs/dls/contributing-to-storybook.md | 8 ++-- docs/getting-started/app-custom-theme.md | 4 +- .../configure-app-with-plugins.md | 2 +- docs/local-dev/cli-build-system.md | 48 +++++++++---------- docs/plugins/plugin-development.md | 2 +- docs/plugins/structure-of-a-plugin.md | 2 +- docs/releases/v1.13.0.md | 2 +- docs/releases/v1.14.0-changelog.md | 4 +- docs/releases/v1.14.0-next.0-changelog.md | 4 +- docs/releases/v1.15.0-changelog.md | 18 +++---- docs/releases/v1.15.0-next.0-changelog.md | 12 ++--- docs/releases/v1.15.0-next.1-changelog.md | 6 +-- docs/releases/v1.15.0.md | 4 +- docs/releases/v1.9.0-changelog.md | 4 +- docs/tutorials/migrating-away-from-core.md | 4 +- ...021-06-22-spotify-backstage-is-growing.mdx | 2 +- packages/app-defaults/CHANGELOG.md | 8 ++-- packages/cli/CHANGELOG.md | 4 +- packages/cli/config/eslint-factory.js | 2 +- .../lib/builder/buildTypeDefinitionsWorker.ts | 2 +- packages/cli/src/lib/svgrTemplate.ts | 2 +- packages/core-app-api/CHANGELOG.md | 4 +- .../src/app/createSpecializedApp.tsx | 2 +- packages/core-components/CHANGELOG.md | 6 +-- .../LinkButton/LinkButton.stories.tsx | 8 ++-- .../src/components/LinkButton/LinkButton.tsx | 2 +- .../src/layout/ItemCard/ItemCard.tsx | 6 +-- .../src/layout/ItemCard/ItemCardGrid.tsx | 2 +- .../src/layout/ItemCard/ItemCardHeader.tsx | 2 +- .../src/layout/Sidebar/SidebarGroup.tsx | 2 +- packages/core-plugin-api/CHANGELOG.md | 2 +- packages/core-plugin-api/src/icons/types.ts | 8 ++-- packages/test-utils/CHANGELOG.md | 4 +- .../src/testUtils/mockBreakpoint.ts | 6 +-- packages/theme/CHANGELOG.md | 10 ++-- .../theme/src/unified/MuiClassNameSetup.ts | 2 +- packages/theme/src/unified/UnifiedTheme.tsx | 4 +- .../src/unified/UnifiedThemeProvider.tsx | 4 +- packages/theme/src/unified/overrides.ts | 2 +- packages/theme/src/unified/themes.ts | 2 +- packages/theme/src/unified/types.ts | 2 +- packages/theme/src/v4/baseTheme.ts | 6 +-- packages/theme/src/v4/themes.ts | 4 +- packages/theme/src/v4/types.ts | 8 ++-- plugins/api-docs/CHANGELOG.md | 4 +- plugins/cost-insights/src/utils/styles.ts | 2 +- .../src/components/Alert/AlertAssignModal.tsx | 6 +-- plugins/scaffolder-react/CHANGELOG.md | 4 +- plugins/scaffolder/CHANGELOG.md | 2 +- plugins/search-react/CHANGELOG.md | 4 +- plugins/search/CHANGELOG.md | 6 +-- plugins/techdocs/CHANGELOG.md | 2 +- plugins/user-settings/README.md | 2 +- 57 files changed, 156 insertions(+), 153 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1616404a6f..0d937fc6b4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -246,11 +246,14 @@ module.exports = { 1, { forbid: [ - { element: 'button', message: 'use MUI