Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from drodil/main
Browse files Browse the repository at this point in the history
Sync with public repo
  • Loading branch information
adamdabbracci committed May 28, 2024
2 parents 25c8d11 + 88c2418 commit 4a82989
Show file tree
Hide file tree
Showing 12 changed files with 636 additions and 625 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.3.2](https://github.com/drodil/backstage-plugin-qeta/compare/v2.3.1...v2.3.2) (2024-05-27)


### Bug Fixes

* image download broken after migrate to new backend system with default auth policy ([7bdb52a](https://github.com/drodil/backstage-plugin-qeta/commit/7bdb52a2f702750ed5b19f57fcea92ec2a285a42))

### [2.3.1](https://github.com/drodil/backstage-plugin-qeta/compare/v2.3.0...v2.3.1) (2024-05-15)

## [2.3.0](https://github.com/drodil/backstage-plugin-qeta/compare/v2.2.1...v2.3.0) (2024-05-06)


### Features

* also send notification to other commenters of q/a ([222fc25](https://github.com/drodil/backstage-plugin-qeta/commit/222fc25f0200c5c4d823e86a1abbe6efb90a3c18))


### Bug Fixes

* fixes issue [#154](https://github.com/drodil/backstage-plugin-qeta/issues/154), showing entity filter dropdown after entity is selected ([310747d](https://github.com/drodil/backstage-plugin-qeta/commit/310747dd5d8d4d0b3bc6a1bbd0127e1eaa75166a))
* removing duplicate entity refs when selected entity exist ([e7db2b9](https://github.com/drodil/backstage-plugin-qeta/commit/e7db2b9cbac94d24282ef5c302e6fa98639eba83))

### [2.2.1](https://github.com/drodil/backstage-plugin-qeta/compare/v2.2.0...v2.2.1) (2024-04-24)


Expand Down
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.26.4"
"version": "1.27.1"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/react-dom": "^17"
},
"devDependencies": {
"@backstage/cli": "^0.26.4",
"@backstage/cli": "^0.26.5",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@spotify/prettier-config": "^15.0.0",
Expand Down
36 changes: 18 additions & 18 deletions plugins/qeta-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@drodil/backstage-plugin-qeta-backend",
"version": "2.2.1",
"version": "2.3.2",
"description": "Backstage.io Q&A plugin backend",
"keywords": [
"backstage",
Expand Down Expand Up @@ -40,18 +40,18 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.540.0",
"@backstage/backend-common": "^0.21.7",
"@backstage/backend-plugin-api": "^0.6.17",
"@backstage/catalog-model": "^1.4.5",
"@backstage/backend-common": "^0.22.0",
"@backstage/backend-plugin-api": "^0.6.18",
"@backstage/catalog-model": "^1.5.0",
"@backstage/config": "^1.2.0",
"@backstage/errors": "^1.2.4",
"@backstage/plugin-auth-node": "^0.4.12",
"@backstage/plugin-events-node": "^0.3.3",
"@backstage/plugin-notifications-node": "^0.1.3",
"@backstage/plugin-auth-node": "^0.4.13",
"@backstage/plugin-events-node": "^0.3.4",
"@backstage/plugin-notifications-node": "^0.1.4",
"@backstage/plugin-permission-common": "^0.7.13",
"@backstage/plugin-permission-node": "^0.7.28",
"@backstage/plugin-permission-node": "^0.7.29",
"@backstage/plugin-search-common": "^1.2.11",
"@backstage/plugin-signals-node": "^0.1.3",
"@backstage/plugin-signals-node": "^0.1.4",
"@drodil/backstage-plugin-qeta-common": "workspace:^",
"@types/express": "*",
"@types/multiparty": "^0.0.33",
Expand All @@ -69,15 +69,15 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-defaults": "^0.2.17",
"@backstage/backend-test-utils": "^0.3.7",
"@backstage/cli": "^0.26.4",
"@backstage/plugin-auth-backend": "^0.22.4",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.3",
"@backstage/plugin-catalog-backend": "^1.21.1",
"@backstage/plugin-events-backend": "^0.3.4",
"@backstage/plugin-notifications-backend": "^0.2.0",
"@backstage/plugin-signals-backend": "^0.1.3",
"@backstage/backend-defaults": "^0.2.18",
"@backstage/backend-test-utils": "^0.3.8",
"@backstage/cli": "^0.26.5",
"@backstage/plugin-auth-backend": "^0.22.5",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.4",
"@backstage/plugin-catalog-backend": "^1.22.0",
"@backstage/plugin-events-backend": "^0.3.5",
"@backstage/plugin-notifications-backend": "^0.2.1",
"@backstage/plugin-signals-backend": "^0.1.4",
"@types/supertest": "^2.0.12",
"@types/uuid": "^9.0.4",
"supertest": "^6.2.4"
Expand Down
5 changes: 5 additions & 0 deletions plugins/qeta-backend/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export const qetaPlugin = createBackendPlugin({
notifications,
}),
);
// Allowing attachments download
httpRouter.addAuthPolicy({
allow: 'unauthenticated',
path: '/attachments',
});
},
});
},
Expand Down
6 changes: 3 additions & 3 deletions plugins/qeta-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"frontend",
"backstage.io"
],
"version": "2.2.1",
"version": "2.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"prepublishOnly": "yarn tsc && yarn build",
Expand Down Expand Up @@ -44,10 +44,10 @@
"ajv": "^8.12.0"
},
"peerDependencies": {
"@backstage/catalog-model": "^1.4.5"
"@backstage/catalog-model": "^1.5.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.4"
"@backstage/cli": "^0.26.5"
},
"files": [
"dist"
Expand Down
6 changes: 3 additions & 3 deletions plugins/qeta-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"frontend",
"backstage.io"
],
"version": "2.2.1",
"version": "2.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"prepublishOnly": "yarn tsc && yarn build",
Expand Down Expand Up @@ -47,8 +47,8 @@
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.4",
"@backstage/test-utils": "^1.5.4",
"@backstage/cli": "^0.26.5",
"@backstage/test-utils": "^1.5.5",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^12.1.3"
},
Expand Down
26 changes: 13 additions & 13 deletions plugins/qeta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"frontend",
"backstage.io"
],
"version": "2.2.1",
"version": "2.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"prepublishOnly": "yarn tsc && yarn build",
Expand Down Expand Up @@ -39,14 +39,14 @@
"tsc": "tsc"
},
"dependencies": {
"@backstage/catalog-client": "^1.6.4",
"@backstage/catalog-model": "^1.4.5",
"@backstage/catalog-client": "^1.6.5",
"@backstage/catalog-model": "^1.5.0",
"@backstage/config": "^1.2.0",
"@backstage/core-components": "^0.14.5",
"@backstage/core-components": "^0.14.7",
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/errors": "^1.2.4",
"@backstage/plugin-catalog-react": "^1.11.3",
"@backstage/plugin-home-react": "^0.1.12",
"@backstage/plugin-catalog-react": "^1.12.0",
"@backstage/plugin-home-react": "^0.1.13",
"@backstage/plugin-permission-react": "^0.4.22",
"@backstage/plugin-signals-react": "^0.0.3",
"@drodil/backstage-plugin-qeta-common": "workspace:^",
Expand All @@ -64,7 +64,7 @@
"react-use": "^17.4.0"
},
"peerDependencies": {
"@backstage/catalog-client": "^1.6.4",
"@backstage/catalog-client": "^1.6.5",
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
Expand All @@ -73,12 +73,12 @@
"react-markdown": "8.0.7"
},
"devDependencies": {
"@backstage/cli": "^0.26.4",
"@backstage/dev-utils": "^1.0.31",
"@backstage/plugin-catalog": "^1.19.0",
"@backstage/plugin-home": "^0.7.3",
"@backstage/plugin-notifications": "^0.2.0",
"@backstage/plugin-signals": "^0.0.5",
"@backstage/cli": "^0.26.5",
"@backstage/dev-utils": "^1.0.32",
"@backstage/plugin-catalog": "^1.20.0",
"@backstage/plugin-home": "^0.7.4",
"@backstage/plugin-notifications": "^0.2.1",
"@backstage/plugin-signals": "^0.0.6",
"@testing-library/jest-dom": "^6.1.3",
"@types/dompurify": "^3.0.0",
"@types/lodash": "^4.14.199",
Expand Down
22 changes: 15 additions & 7 deletions plugins/qeta/src/components/QuestionsContainer/FilterPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,22 @@ export const FilterPanel = (props: FilterPanelProps) => {
}, [tags, filters.tags]);

useEffect(() => {
if (
(filters.entity || (refs && refs?.length > 0)) &&
!Array.isArray(filters.entity)
) {
const entityRefs: string[] = [];
if (filters.entity && !Array.isArray(filters.entity)) {
entityRefs.push(filters.entity);
}
if (refs && refs?.length > 0) {
refs?.forEach(ref => {
// ignore currently selected entity if exist in refs
if (ref.entityRef !== filters.entity) {
entityRefs.push(ref.entityRef);
}
});
}
if (entityRefs.length > 0) {
catalogApi
.getEntitiesByRefs({
entityRefs: [...(refs ?? []).map(e => e.entityRef), filters.entity],
entityRefs,
fields: [
'kind',
'metadata.name',
Expand Down Expand Up @@ -216,8 +225,7 @@ export const FilterPanel = (props: FilterPanelProps) => {
<FormLabel id="qeta-filter-entity">Filters</FormLabel>
{showEntityFilter &&
availableEntities &&
availableEntities.length > 0 &&
(!filters.entity || selectedEntity) && (
availableEntities.length > 0 && (
<Autocomplete
multiple={false}
className="qetaEntityFilter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,7 @@ export const QuestionsContainer = (props: QuestionsContainerProps) => {
</Grid>
{(showFilters ?? true) && (
<Collapse in={showFilterPanel}>
<FilterPanel
onChange={onFilterChange}
filters={filters}
showEntityFilter={!entity}
/>
<FilterPanel onChange={onFilterChange} filters={filters} />
</Collapse>
)}

Expand Down
14 changes: 7 additions & 7 deletions plugins/search-backend-module-qeta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"search",
"backstage.io"
],
"version": "2.2.1",
"version": "2.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"prepublishOnly": "yarn tsc && yarn build",
Expand Down Expand Up @@ -39,19 +39,19 @@
"tsc": "tsc"
},
"dependencies": {
"@backstage/backend-common": "^0.21.7",
"@backstage/backend-plugin-api": "^0.6.17",
"@backstage/backend-tasks": "^0.5.22",
"@backstage/backend-common": "^0.22.0",
"@backstage/backend-plugin-api": "^0.6.18",
"@backstage/backend-tasks": "^0.5.23",
"@backstage/config": "^1.2.0",
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/errors": "^1.2.4",
"@backstage/plugin-search-backend-node": "^1.2.21",
"@backstage/plugin-search-backend-node": "^1.2.22",
"@backstage/plugin-search-common": "^1.2.11",
"@drodil/backstage-plugin-qeta-common": "workspace:^"
},
"devDependencies": {
"@backstage/backend-test-utils": "^0.3.7",
"@backstage/cli": "^0.26.4",
"@backstage/backend-test-utils": "^0.3.8",
"@backstage/cli": "^0.26.5",
"msw": "^1.2.1"
},
"files": [
Expand Down
Loading

0 comments on commit 4a82989

Please sign in to comment.