Commit Graph

40 Commits

Author SHA1 Message Date
Adam Harvey 4389d4f668 Update link to use catalog-import 2020-12-21 11:24:07 -05:00
Oliver Sand 246799c7f2 Show consumers and providers for APIs 2020-12-03 17:48:25 +01:00
Oliver Sand 7d1d9a3df3 Add tests for components in the api-docs plugin 2020-12-01 12:42:30 +01:00
Adam Harvey 74175b988e Refactor typo in variable name (#3486) 2020-11-29 08:50:33 +01:00
Peter Colapietro 3f947b70d1 fix(react): use fragment (#3478)
The empty state's description is already wrapped in a Typography component so the one in MissingImplementsApisEmptyState is redundant.

https://github.com/backstage/backstage/blob/bbaadb63f88d0f7d42acb9fa1b1644f85bf1043e/packages/core/src/components/EmptyState/EmptyState.tsx#L57

By wrapping the EmptyState's description in a Typography the following warning is output to the console

```
react-dom.development.js?1930:89 Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.
    in p (created by ForwardRef(Typography))
    in ForwardRef(Typography) (created by WithStyles(ForwardRef(Typography)))
    in WithStyles(ForwardRef(Typography)) (created by MissingImplementsApisEmptyState)
    in p (created by ForwardRef(Typography))
    in ForwardRef(Typography) (created by WithStyles(ForwardRef(Typography)))
    in WithStyles(ForwardRef(Typography)) (created by EmptyState)
    in div (created by ForwardRef(Grid))
    in ForwardRef(Grid) (created by WithStyles(ForwardRef(Grid)))
    in WithStyles(ForwardRef(Grid)) (created by EmptyState)
    in div (created by ForwardRef(Grid))
    in ForwardRef(Grid) (created by WithStyles(ForwardRef(Grid)))
    in WithStyles(ForwardRef(Grid)) (created by EmptyState)
    in div (created by ForwardRef(Grid))
    in ForwardRef(Grid) (created by WithStyles(ForwardRef(Grid)))
    in WithStyles(ForwardRef(Grid)) (created by EmptyState)
    in EmptyState (created by MissingImplementsApisEmptyState)
    in MissingImplementsApisEmptyState (created by Router)
    in Router (at EntityPage.tsx:78)
    in article (created by Content)
    in Content (created by Layout)
    in Layout (created by EntityPageLayout)
    in div (created by Page)
    in ThemeProvider (created by Page)
    in Page (created by EntityPageLayout)
    in EntityPageLayout (at EntityPage.tsx:64)
    in ServiceEntityPage (at EntityPage.tsx:127)
    in EntityPage (created by EntityPageSwitch)
    in EntityPageSwitch (created by Router)
    in EntityProvider (created by Router)
    in Route (created by Router)
    in Routes (created by Router)
    in Router (at App.tsx:46)
    in Route (at App.tsx:44)
    in Routes (at App.tsx:42)
    in div (created by SidebarPage)
    in SidebarPage (at App.tsx:40)
    in Route (created by AppRouter)
    in Routes (created by AppRouter)
    in Router (created by BrowserRouter)
    in BrowserRouter (created by AppRouter)
    in AppRouter (at App.tsx:39)
    in CssBaseline (created by WithStyles(CssBaseline))
    in WithStyles(CssBaseline) (created by AppThemeProvider)
    in ThemeProvider (created by AppThemeProvider)
    in AppThemeProvider (created by Provider)
    in AppContextProvider (created by Provider)
    in ApiProvider (created by Provider)
    in Provider (at App.tsx:36)
    in App (at src/index.tsx:6)
```

Co-authored-by: Peter Colapietro <petercolapietro@gmail.com>
2020-11-27 18:08:37 +01:00
Oliver Sand 032aba5920 Apply suggestions from code review
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2020-11-26 16:40:18 +01:00
Oliver Sand 6f70ed7a95 Replace usage of implementsApis with relations 2020-11-25 17:30:11 +01:00
Oliver Sand f3bb55ee31 Make api-docs customizable 2020-11-24 11:53:14 +01:00
Fredrik Adelöw 717e43de14 catalog-client: change entities interface, add fields support (#3296) 2020-11-18 19:58:36 +01:00
Oliver Sand 84b654d5de Use dense table style and outlined chips in the API Explorer (#3276)
This matches the styling of the catalog.
2020-11-11 13:34:40 +01:00
Oliver Sand 0c0798f082 Persist Table Filters in the API Explorer (#2936)
* fix: allow changing the categories of a checkbox tree

* feat: allow setting the current selection in the checkbox tree

* feat: allow setting the current selection in the select

* feat: add a way to access the tables internal state (filters, search, ...)

* feat: add useQueryParams hook

* feat: persist the table state of the api explorer in the url

* Use react-use instead of writing own hooks

* Resolve review comments

* Rename selectedChilds to selecetedChildren

* Add changesets

* Support passing a separate state name to useQueryParamState

This allows to use the useQueryParamState hook multiple time per route and have a separate state.

* refactor: fix typo...
2020-11-09 18:19:47 +01:00
blam 101978963d Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (139 commits)
  Cleanup
  Update PinButton.test.tsx
  feat: update github insights plugin version (#2973)
  Ignore IntelliJ *.iml files (#2971)
  chore(deps): bump rollup-plugin-dts from 1.4.11 to 1.4.13
  fix the plugin card on plugins page
  align 'Add to Marketplace' button on plugins page
  fix the PluginGrid on mobiles sizes
  use getBy query instead of queryBy when asserting for elements present in document (#2951)
  Update PinButton.tsx
  Add test case for Progress component (#2953)
  fix the styling of footer copy on mobile
  add changeset
  handle the case where no entities are available to show
  core-api: work around issue with ApiRef export const declarations
  core-api: move utility api system implementation into apis/system
  Update docs regarding npm config ignore-scripts flag
  Another try
  Fix Core Features configuration id (#2948)
  Fix test?
  ...
2020-10-19 23:57:40 +02:00
Kévin Gomez 014bc250b3 Fix API references parsing
Allows API entities to use a different namespace than the default one.
2020-10-17 23:20:08 +02:00
Dominik Henneke 2e1a0b8c99 feat(api-docs): show a custom error page when no apis are implemented by a component (#2933) 2020-10-16 16:02:08 +02:00
Patrik Oldsberg 5ff5b1325d Merge pull request #2739 from Marvin9/feat/flexible-theme-for-page
feat: theme customization for pages
2020-10-16 12:47:05 +02:00
Marvin9 fe4926cb75 chore: remove explicit return 2020-10-15 13:52:18 +05:30
Marvin9 8f0608a5ed chore: refactor 2020-10-15 09:16:39 +05:30
Oliver Sand 46b9ae82ba Add filters to API Explorer (#2830)
* fix: support nested fields in table filter

Add support for nested fields like metadata.name to the table filters. Previously only top-level fields were allowed. In addition, support for filtering on fields that are arrays is introduced (like tags). Filters are now distinct.

* feat: introduce table filters to the api explorer

* fix: allow to close select in multiple mode

* fix: export TableFilter
2020-10-13 09:45:25 +02:00
Marvin9 6d68f6fec1 feat: consume theme provided by Page theme provider 2020-10-11 19:14:23 +05:30
blam 827bb733bf chore: reworking all deps to use cross-fetch instead 2020-10-08 21:57:27 +02:00
Marvin9 e2564645e5 feat: Replace old page theme props with new ones 2020-10-04 18:03:50 +05:30
Oliver Sand 8663917ad8 fix: resolve some dark mode styling issues
I missed them with the test file included here, but noticed it with our private test files (so no screenshot, trust me)
2020-09-29 13:35:31 +02:00
Oliver Sand 20353279d7 feat: use title for API type in table
Now that the API definition types are available via an API, we can resolve the remaining TODO comment here.
2020-09-18 11:21:46 +02:00
Andrew Thauer 8e64ca250c feat: add api-docs config ref for widgets 2020-09-17 08:44:27 -04:00
Oliver Sand bcf0f4cc11 feat: rework Api Explorer components
The table in the API explorer now shows details such as tags, owner, and description.
2020-09-17 12:39:20 +02:00
Andrew Thauer 678a9c90de feat: add graphql api type 2020-09-13 22:01:11 -04:00
Oliver Sand 6f67809bd3 feat: allow to view the raw API definitions, even if a viewer component is available 2020-09-10 17:55:54 +02:00
Dominik Henneke a93450d55f feat(api-docs): move the api-tab from the catalog to the plugin and register it in the default app 2020-09-04 14:14:50 +02:00
Dominik Henneke 8df712b75c fix(api-docs): resolve style warnings 2020-09-04 14:13:29 +02:00
Dominik Henneke d1e281c50d refactor(api-docs): update imports 2020-09-04 14:13:28 +02:00
Andrew Thauer 7a5cf65ef3 feat: syntax highlighing for api-docs (#2170) 2020-08-31 08:27:29 +02:00
Oliver Sand e64411a754 fix(api-docs): fix a small styling issue in openapi rendering (#2141)
Specs without operations were no correctly displayed in dark mode.
2020-08-27 15:10:39 +02:00
Sebastian Qvarfordt 4665a2f5d4 Added selectedTabId param to generatePath in JobStatusModal (#2109)
* Added selectedTabId param to generatePath in JobStatusModal

* Added selectedTabId to generatePath in ApiCatalogTable

* Link to default entity tab in JobStatusModal
2020-08-25 13:57:57 +02:00
Oliver Sand deb108d986 Add styling (especially dark mode) for the asyncAPI display component (#1958) 2020-08-16 15:19:40 +02:00
Oliver Sand c74c8b4592 Improve styling of OpenAPI component (especially in dark mode) (#1961) 2020-08-16 09:10:28 +02:00
Dominik Henneke f809238e61 Update @types/swagger-ui-react 2020-08-13 08:30:44 +02:00
Dominik Henneke 237595f3b4 fix(api-docs): improve the styling of the asyncapi documentation in dark mode 2020-08-12 13:58:49 +02:00
Dominik Henneke 5a023c3c49 feat(api-docs): render documentation of type asyncapi 2020-08-12 13:58:48 +02:00
Dominik Henneke 3534c0804c feat(api-docs): add routes to display all api entities 2020-08-12 13:57:02 +02:00
Dominik Henneke 812659c024 feat(api-docs): add plugin that provides widgets that display api docs 2020-08-12 13:53:34 +02:00