Merge branch 'backstage:master' into jordans/addFilterNegation
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-app-backend': patch
|
||||
---
|
||||
|
||||
Fixed unexpected behaviour where configuration supplied with `APP_CONFIG_*` environment variables where not filtered by the configuration schema.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-node': patch
|
||||
---
|
||||
|
||||
Updated dependency `@smithy/node-http-handler` to `^3.0.0`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
Updated the default SearchType.Accordion behavior to remain open after result type selection. This is a UX improvement to reduce the number of clicks needed when toggling result type filters.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-module-addons-contrib': patch
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Use more of the available space for the navigation sidebar.
|
||||
@@ -185,11 +185,11 @@ Scope: The Backstage Documentation
|
||||
|
||||
## Sponsors
|
||||
|
||||
| Name | Organization | GitHub | Email |
|
||||
| ----------------- | ------------ | ------------------------------------------- | ------------------ |
|
||||
| Niklas Gustavsson | Spotify | [protocol7](https://github.com/protocol7) | ngn@spotify.com |
|
||||
| Dave Zolotusky | Spotify | [dzolotusky](https://github.com/dzolotusky) | dzolo@spotify.com |
|
||||
| Helen Greul | Spotify | [helengreul](https://github.com/helengreul) | heleng@spotify.com |
|
||||
| Name | Organization | GitHub | Email |
|
||||
| ----------------- | ------------ | ------------------------------------------- | ----------------- |
|
||||
| Niklas Gustavsson | Spotify | [protocol7](https://github.com/protocol7) | ngn@spotify.com |
|
||||
| Dave Zolotusky | Spotify | [dzolotusky](https://github.com/dzolotusky) | dzolo@spotify.com |
|
||||
| Pia Nilsson | Spotify | [pianilsson](https://github.com/pianilsson) | pia@spotify.com |
|
||||
|
||||
## Organization Members
|
||||
|
||||
@@ -224,9 +224,10 @@ Scope: The Backstage Documentation
|
||||
|
||||
## Emeritus End User Sponsors
|
||||
|
||||
| Name | Organization | GitHub | Discord |
|
||||
| --------- | ------------ | ------------------------------------------- | -------------- |
|
||||
| Lee Mills | Spotify | [leemills83](https://github.com/leemills83) | `.binarypoint` |
|
||||
| Name | Organization | GitHub | Discord |
|
||||
| ----------- | ------------ | ------------------------------------------- | -------------- |
|
||||
| Lee Mills | Spotify | [leemills83](https://github.com/leemills83) | `.binarypoint` |
|
||||
| Helen Greul | Spotify | [helengreul](https://github.com/helengreul) | `helen_greul` |
|
||||
|
||||
## Emeritus Project Area Maintainers
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { readFrontendConfig } from './readFrontendConfig';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
|
||||
describe('readFrontendConfig', () => {
|
||||
const mockDir = createMockDirectory();
|
||||
|
||||
afterEach(() => {
|
||||
mockDir.clear();
|
||||
});
|
||||
|
||||
it('should validate env config', async () => {
|
||||
mockDir.setContent({
|
||||
'appDir/.config-schema.json': JSON.stringify({
|
||||
schemas: [
|
||||
{
|
||||
value: {
|
||||
type: 'object',
|
||||
|
||||
properties: {
|
||||
app: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
secretOfLife: {
|
||||
type: 'string',
|
||||
visibility: 'secret',
|
||||
},
|
||||
backendConfig: {
|
||||
type: 'string',
|
||||
visibility: 'backend',
|
||||
},
|
||||
publicValue: {
|
||||
type: 'string',
|
||||
visibility: 'frontend',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
backstageConfigSchemaVersion: 1,
|
||||
}),
|
||||
});
|
||||
|
||||
const config = new ConfigReader({
|
||||
app: {
|
||||
secretOfLife: '42',
|
||||
backendConfig: 'backend',
|
||||
publicValue: 'public',
|
||||
},
|
||||
});
|
||||
|
||||
const frontendConfig = await readFrontendConfig({
|
||||
env: {
|
||||
APP_CONFIG_app_secretOfLife: 'ignored',
|
||||
APP_CONFIG_app_backendConfig: 'ignored',
|
||||
APP_CONFIG_app_publicValue: 'injected',
|
||||
},
|
||||
appDistDir: `${mockDir.path}/appDir`,
|
||||
config,
|
||||
});
|
||||
|
||||
expect(frontendConfig).toEqual([
|
||||
{
|
||||
context: 'env',
|
||||
data: {
|
||||
app: {
|
||||
publicValue: 'injected',
|
||||
},
|
||||
},
|
||||
deprecatedKeys: [],
|
||||
filteredKeys: undefined,
|
||||
},
|
||||
{
|
||||
context: 'app',
|
||||
data: { app: { publicValue: 'public' } },
|
||||
deprecatedKeys: [],
|
||||
filteredKeys: undefined,
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -36,10 +36,9 @@ export async function readFrontendConfig(options: {
|
||||
}): Promise<AppConfig[]> {
|
||||
const { env, appDistDir, config } = options;
|
||||
|
||||
const appConfigs = readEnvConfig(env);
|
||||
|
||||
const schemaPath = resolvePath(appDistDir, '.config-schema.json');
|
||||
if (await fs.pathExists(schemaPath)) {
|
||||
const envConfigs = readEnvConfig(env);
|
||||
const serializedSchema = await fs.readJson(schemaPath);
|
||||
|
||||
try {
|
||||
@@ -49,11 +48,10 @@ export async function readFrontendConfig(options: {
|
||||
serialized: serializedSchema,
|
||||
}));
|
||||
|
||||
const frontendConfigs = await schema.process(
|
||||
[{ data: config.get() as JsonObject, context: 'app' }],
|
||||
return await schema.process(
|
||||
[...envConfigs, { data: config.get() as JsonObject, context: 'app' }],
|
||||
{ visibility: ['frontend'], withDeprecatedKeys: true },
|
||||
);
|
||||
appConfigs.push(...frontendConfigs);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
'Invalid app bundle schema. If this error is unexpected you need to run `yarn build` in the app. ' +
|
||||
@@ -63,5 +61,5 @@ export async function readFrontendConfig(options: {
|
||||
}
|
||||
}
|
||||
|
||||
return appConfigs;
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -140,18 +140,6 @@ describe('SearchType.Accordion', () => {
|
||||
expect(setPageCursorMock).toHaveBeenCalledWith(undefined);
|
||||
});
|
||||
|
||||
it('should collapse when a new type is selected', async () => {
|
||||
const { getByText, queryByText } = render(
|
||||
<Wrapper>
|
||||
<SearchType.Accordion name={expectedLabel} types={[expectedType]} />
|
||||
</Wrapper>,
|
||||
);
|
||||
|
||||
await user.click(getByText(expectedType.name));
|
||||
|
||||
expect(queryByText('Collapse')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should show result counts if enabled', async () => {
|
||||
const { getAllByText } = render(
|
||||
<Wrapper>
|
||||
|
||||
@@ -96,7 +96,6 @@ export const SearchTypeAccordion = (props: SearchTypeAccordionProps) => {
|
||||
return () => {
|
||||
setTypes(type !== '' ? [type] : []);
|
||||
setPageCursor(undefined);
|
||||
setExpanded(false);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -30,8 +30,9 @@ const EXPANDABLE_NAVIGATION_LOCAL_STORAGE =
|
||||
const StyledButton = withStyles({
|
||||
root: {
|
||||
position: 'absolute',
|
||||
left: '220px',
|
||||
left: '13.7rem', // Sidebar inner width (15.1em) minus the different margins/paddings
|
||||
top: '19px',
|
||||
zIndex: 2,
|
||||
padding: 0,
|
||||
minWidth: 0,
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"@backstage/plugin-search-common": "workspace:^",
|
||||
"@backstage/plugin-techdocs-common": "workspace:^",
|
||||
"@google-cloud/storage": "^7.0.0",
|
||||
"@smithy/node-http-handler": "^2.1.7",
|
||||
"@smithy/node-http-handler": "^3.0.0",
|
||||
"@trendyol-js/openstack-swift-sdk": "^0.0.7",
|
||||
"@types/express": "^4.17.6",
|
||||
"dockerode": "^4.0.0",
|
||||
|
||||
@@ -86,9 +86,14 @@ export default ({ theme, sidebar }: RuleOptions) => `
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.md-sidebar .md-sidebar__scrollwrap {
|
||||
width: calc(12.1rem);
|
||||
width: calc(16rem);
|
||||
overflow-y: hidden;
|
||||
}
|
||||
@supports selector(::-webkit-scrollbar) {
|
||||
[dir=ltr] .md-sidebar__inner {
|
||||
padding-right: calc(100% - 15.1rem);
|
||||
}
|
||||
}
|
||||
.md-sidebar--secondary {
|
||||
right: ${theme.spacing(3)}px;
|
||||
}
|
||||
@@ -202,18 +207,22 @@ export default ({ theme, sidebar }: RuleOptions) => `
|
||||
height: 100%;
|
||||
}
|
||||
.md-sidebar--primary {
|
||||
width: 12.1rem !important;
|
||||
width: 16rem !important;
|
||||
z-index: 200;
|
||||
left: ${
|
||||
sidebar.isPinned
|
||||
? `calc(-12.1rem + ${SIDEBAR_WIDTH})`
|
||||
: 'calc(-12.1rem + 72px)'
|
||||
? `calc(-16rem + ${SIDEBAR_WIDTH})`
|
||||
: 'calc(-16rem + 72px)'
|
||||
} !important;
|
||||
}
|
||||
.md-sidebar--secondary:not([hidden]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary {
|
||||
transform: translateX(16rem);
|
||||
}
|
||||
|
||||
.md-content {
|
||||
max-width: 100%;
|
||||
margin-left: 0;
|
||||
@@ -241,8 +250,8 @@ export default ({ theme, sidebar }: RuleOptions) => `
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.md-sidebar--primary {
|
||||
left: -12.1rem !important;
|
||||
width: 12.1rem;
|
||||
left: -16rem !important;
|
||||
width: 16rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8275,7 +8275,7 @@ __metadata:
|
||||
"@backstage/plugin-search-common": "workspace:^"
|
||||
"@backstage/plugin-techdocs-common": "workspace:^"
|
||||
"@google-cloud/storage": ^7.0.0
|
||||
"@smithy/node-http-handler": ^2.1.7
|
||||
"@smithy/node-http-handler": ^3.0.0
|
||||
"@trendyol-js/openstack-swift-sdk": ^0.0.7
|
||||
"@types/express": ^4.17.6
|
||||
"@types/fs-extra": ^11.0.0
|
||||
@@ -15290,16 +15290,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/abort-controller@npm:^2.2.0":
|
||||
version: 2.2.0
|
||||
resolution: "@smithy/abort-controller@npm:2.2.0"
|
||||
dependencies:
|
||||
"@smithy/types": ^2.12.0
|
||||
tslib: ^2.6.2
|
||||
checksum: d0d7fcaa7b67b04c9ad825017110cc294ff06af07f8054ac3b75d8de88ff5fbef1d08f5c1ae672db1839d14ce25f277c459d2b7b7263cbe9e6c3d4518a19230e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/abort-controller@npm:^3.1.2":
|
||||
version: 3.1.2
|
||||
resolution: "@smithy/abort-controller@npm:3.1.2"
|
||||
@@ -15590,20 +15580,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/node-http-handler@npm:^2.1.7":
|
||||
version: 2.5.0
|
||||
resolution: "@smithy/node-http-handler@npm:2.5.0"
|
||||
dependencies:
|
||||
"@smithy/abort-controller": ^2.2.0
|
||||
"@smithy/protocol-http": ^3.3.0
|
||||
"@smithy/querystring-builder": ^2.2.0
|
||||
"@smithy/types": ^2.12.0
|
||||
tslib: ^2.6.2
|
||||
checksum: 2e63fafdac5bef62181994af2ec065b0f7f04eaed88fb2990a21a9925226fead5013cf4f232b527f3f4d9ffb68ccbe8cd263ad22a7351d36b0dc23e975929a0c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/node-http-handler@npm:^3.2.0":
|
||||
"@smithy/node-http-handler@npm:^3.0.0, @smithy/node-http-handler@npm:^3.2.0":
|
||||
version: 3.2.0
|
||||
resolution: "@smithy/node-http-handler@npm:3.2.0"
|
||||
dependencies:
|
||||
@@ -15626,16 +15603,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/protocol-http@npm:^3.3.0":
|
||||
version: 3.3.0
|
||||
resolution: "@smithy/protocol-http@npm:3.3.0"
|
||||
dependencies:
|
||||
"@smithy/types": ^2.12.0
|
||||
tslib: ^2.6.2
|
||||
checksum: 6c1aaaee9f6ecfb841766938312268f30cbda253f172de7467463aae7d7bfea19a801ab570f3737334e992d2d0ee7446e6af6a6fd82b08533790c489289dff76
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/protocol-http@npm:^4.1.1":
|
||||
version: 4.1.1
|
||||
resolution: "@smithy/protocol-http@npm:4.1.1"
|
||||
@@ -15646,17 +15613,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/querystring-builder@npm:^2.2.0":
|
||||
version: 2.2.0
|
||||
resolution: "@smithy/querystring-builder@npm:2.2.0"
|
||||
dependencies:
|
||||
"@smithy/types": ^2.12.0
|
||||
"@smithy/util-uri-escape": ^2.2.0
|
||||
tslib: ^2.6.2
|
||||
checksum: db492903302a694a0e982c37b9a74314160c5ee485742f24f8b6d0da66f121e7ff8588742a3a1964f6b983c15cacd52b883c5efa714882a754f575da7a7e014d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/querystring-builder@npm:^3.0.4":
|
||||
version: 3.0.4
|
||||
resolution: "@smithy/querystring-builder@npm:3.0.4"
|
||||
@@ -15736,15 +15692,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/types@npm:^2.12.0":
|
||||
version: 2.12.0
|
||||
resolution: "@smithy/types@npm:2.12.0"
|
||||
dependencies:
|
||||
tslib: ^2.6.2
|
||||
checksum: 2dd93746624d87afbf51c22116fc69f82e95004b78cf681c4a283d908155c22a2b7a3afbd64a3aff7deefb6619276f186e212422ad200df3b42c32ef5330374e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/types@npm:^3.4.0":
|
||||
version: 3.4.0
|
||||
resolution: "@smithy/types@npm:3.4.0"
|
||||
@@ -15908,15 +15855,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/util-uri-escape@npm:^2.2.0":
|
||||
version: 2.2.0
|
||||
resolution: "@smithy/util-uri-escape@npm:2.2.0"
|
||||
dependencies:
|
||||
tslib: ^2.6.2
|
||||
checksum: bade35312d75d1c84226f2a81b70dfef91766c02ecb6c6854b6f920cddb423e01963f7d0c183d523b5991f8e7ca93bcf73f8b3c6923979152b8350c9f3c24fd6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@smithy/util-uri-escape@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "@smithy/util-uri-escape@npm:3.0.0"
|
||||
|
||||
Reference in New Issue
Block a user