Commit Graph

77 Commits

Author SHA1 Message Date
Sebastian Qvarfordt 19e34b5319 TechDocs: Inject CSS transformer and initial backstage style integration for reader (#2560)
* Inject CSS transformer and initial backstage style integration for reader

* Update plugins/techdocs/src/reader/transformers/injectCss.test.ts

Co-authored-by: Emma Indal <emmai@spotify.com>

* Fix test name and run injectCss in preTransformer

* Fix for invisible links in reader

* Added missing semi-colon

* Better styling on codeblocks

Co-authored-by: Emma Indal <emmai@spotify.com>
2020-09-23 16:40:18 +02:00
Sebastian Qvarfordt 999ff914af TechDocs: Enable allowVulnerableTags in sanitize-html (#2554)
* enable allowVulnerableTags in sanitize-html

* Fixed lint issue

* Removed style tag from allowed list. Seems to work fine.

* Added tests to make sure we keep link tags and remove style tags
2020-09-22 14:22:52 +02:00
Emma Indal 296b6376e3 fix unclickable external links (#2396) 2020-09-10 12:05:22 +02:00
Sebastian Qvarfordt d865f88344 [TechDocs] Rebuild docs if the github source is newer than last docs build (#2353)
* Added age check for documentation in github to make sure it's up to date

* Updated failing tests

* Updated docs to explain requestUrl and storageUrl

* Updated failing tests

* Update packages/create-app/templates/default-app/app-config.yaml.hbs

* Update docs/features/techdocs/getting-started.md

Co-authored-by: Emma Indal <emmai@spotify.com>
2020-09-09 16:05:28 +02:00
alandovskis f88d8873a8 Display Warning if TechDocs Annotation is Missing (#2319)
* Display warning if TechDocs annotation is missing.

* TechDocs: Add link to Getting Started when annotation is missing.
2020-09-09 08:52:36 +02:00
Patrik Oldsberg 38b6703102 core-api: change ApiFactory.implements to .api 2020-09-08 11:31:48 +02:00
Patrik Oldsberg aa235dd154 app: move api factories out to plugins 2020-09-08 11:31:47 +02:00
Emma Indal 969cf48858 [TechDocs] migrate techdocs to use new routing/catalog api (#2312)
* migrate techdocs to use new routing

* use new techdocs routing in default app

* new EntityPageDocs and Router components

* remove unused code

* remove unused import
2020-09-07 16:56:03 +02:00
Patrik Oldsberg b045b166b6 run prettier 2020-09-05 16:37:30 +02:00
Sebastian Qvarfordt 0b2f787699 Updated docs for techdocs plugin (#2127)
* Updated docs for techdocs plugin

* Error in example comment

* Update plugins/techdocs/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Update plugins/techdocs/src/reader/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Update plugins/techdocs/src/reader/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Update plugins/techdocs/src/reader/README.md

Co-authored-by: Emma Indal <emmai@spotify.com>

* Update link to transformers doc to point to reader doc for now

Co-authored-by: Emma Indal <emmai@spotify.com>
2020-08-27 09:52:49 +02:00
Sebastian Qvarfordt 5bf548ac80 Show progress bar when loading on techdocs (#2065) 2020-08-21 10:31:30 +02:00
Sebastian Qvarfordt 13908d69c2 TechDocs: Access entity techdocs from service catalog (#1835)
* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* feature(techdocs): JIT generation of techdocs

* Fix linting issues

* Add Techdocs tab to entity page

* Added missing dep

* Added missing dep

* Removed duplicate dep

* Better tab navigation

* Update label on entity page to say docs

* Fix lint issue

* Move building of docs from entity to a function

* attempt to add back react as a dep

* Fixed failing test

* fix(techdocs): Hopefully fixed tests

* Fixed another failing test

* Initial apiRef for techdocs storage

* Cleaned up some code in reader

* test(headertabs): add tests to HeaderTabs component

* fix(headertabs): change tab mock id

* fix(techdocs-generator): fix problem with macOS symlink to tmp folder

* fix(lint): remove unused configApiRef

* wip

* Ongoing cleanups

* Cleanups and fix tests

* WIP cleanups

* Clean up some things

* Clean up some things

* Added missing notice header

* ts issue fixed

* Add show contition to api tab

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Emma Indal <emmai@spotify.com>
2020-08-20 14:06:09 +02:00
Patrik Oldsberg f69a2804ae docs: fix broken links 2020-08-11 12:21:15 +02:00
Sebastian Qvarfordt fe4430907a Merge pull request #1787 from DavidJSykes/Fix-TechDocs-missing
Fix tech docs missing #1750
2020-07-30 19:32:45 +02:00
David J Sykes cc905069d1 Changed optional parameter name to allow for more generic uses 2020-07-30 16:57:38 +01:00
David Sykes 58fa8ce5fb Updated test 2020-07-30 11:35:01 +01:00
David Sykes 4f54f062fe Updated test 2020-07-30 11:31:26 +01:00
David Sykes ea57820c62 Removed a div that was no longer needed 2020-07-30 11:30:01 +01:00
David Sykes fa708d6572 TechDocsNotFound now uses ErrorPage from core with an optional docPath parameter 2020-07-30 11:19:12 +01:00
Twisha Saraiya 5749c98e3f techdocs: modify documentation header 2020-07-30 14:45:21 +05:30
Emma Indal 166998b6d9 fix(techdocs-not-found): bug fix 2020-07-27 09:17:00 +02:00
Stefan Ålund 982bacb167 [TechDocs] Use Backstage docs as example (#1625) 2020-07-15 08:02:01 +02:00
Bilawal Hameed 3d4fcc4559 techdocs: set custom docStorageUrl via appConfig (#1575)
* feat(techdocs): read docStorageUrl from appConfig

* docs: updated techdocs plugin README to mention custom baseurl

* fix: added config file

* fix: use JSON in env variable

* fix: add to app-config.yaml

* typescript wrestling

* Nicer config handling

* fix: switch to using useApi(configApiRef)

* docs: corrected to new config name

* docs: mention app-config.yaml config option

* fix: removed unused dep @backstage/config

Co-authored-by: Sebastian Qvarfordt <s.qvarfordt@gmail.com>
2020-07-10 10:48:46 +02:00
Sebastian Qvarfordt 9fa773d571 Hack to fix typescript error in dependency. PR sent, and this fixes it temporarily. 2020-07-07 11:14:20 +02:00
Emma Indal f86715ae3d fix(techdocs): move from post transformers to pre transformers 2020-07-06 19:52:05 +02:00
Emma Indal 18e9dac360 fix(techdocs): adjust test to use post and pre transformers 2020-07-06 19:52:05 +02:00
Emma Indal 7f00b29ea2 feat(techdocs): sanitizeDOM transformer 2020-07-06 19:52:04 +02:00
Bilawal Hameed 9a3b6d50fe fix: cast as HTMLElement 2020-07-06 14:29:28 +02:00
Bilawal Hameed 180a08a5ec chore: use onLoading and onLoaded 2020-07-06 14:24:23 +02:00
Bilawal Hameed 1040383d36 chore: added stylesheet test-util + split out shadow-dom test util 2020-07-06 14:08:38 +02:00
Bilawal Hameed 04067f24f0 chore: add onCssReady tests 2020-07-06 14:08:38 +02:00
Bilawal Hameed 4eca08efd1 chore: rename callbacks to onLoading and onLoaded 2020-07-06 14:08:36 +02:00
Bilawal Hameed b44d4a4467 fix: only run onLoading if external stylesheets exist 2020-07-06 14:08:05 +02:00
Bilawal Hameed 0c1e1bf346 feat(techdocs): added onCssReady transformer 2020-07-06 14:08:04 +02:00
Bilawal Hameed 9e4c092d6b chore: ref to shadowDomRef 2020-07-03 16:26:54 +02:00
Bilawal Hameed 07e5d2ce8a chore: revert data-testid back to shadow-dom 2020-07-03 16:25:09 +02:00
Bilawal Hameed a662bc1639 fix: remove re-creating new shadow-dom on page change 2020-07-03 16:18:34 +02:00
Bilawal Hameed 52f4d37b8e fix(techdocs): cleaned up useEffect in Reader 2020-07-03 16:05:25 +02:00
Bilawal Hameed 95ebc8eba9 fix: moved useEnforcingTrailingSlash upper in the hook chain 2020-07-03 16:05:25 +02:00
Bilawal Hameed 96c24c687b chore(techdocs): updated tests 2020-07-03 16:05:25 +02:00
Bilawal Hameed 468ca0f9b3 fix(techdocs): fixed race condition between page loads 2020-07-03 16:05:25 +02:00
Emma Indal ddd73efa92 Merge pull request #1508 from spotify/emmaindal/techdocs-base-components
techdocs: base components + basic docs not found page
2020-07-03 12:12:12 +02:00
Emma Indal 8945b51114 fix(useFetch): use AsyncState type 2020-07-03 12:06:14 +02:00
Emma Indal eaf1d0a09d fix(techdocs-404): throw error 2020-07-03 11:55:20 +02:00
Emma Indal 3229b16ce8 fix(techdocs-home): move docs sites mock data to array 2020-07-03 11:55:19 +02:00
Emma Indal 3e3dff511b fix(test): change to lowercase
Co-authored-by: Bilawal Hameed <bil@spotify.com>
2020-07-03 11:55:19 +02:00
Emma Indal 6f3a8ee90a fix(test): remove async
Co-authored-by: Bilawal Hameed <bil@spotify.com>
2020-07-03 11:55:19 +02:00
Emma Indal cabd540abb refactor(techdocs): basic techdocs not found, split out components from reader 2020-07-03 11:55:19 +02:00
Emma Indal ea58f885e2 fix(tests): fix fixures (#1505)
Co-authored-by: Emma Indal <emmai@spotify.com>
2020-07-03 11:17:15 +02:00
Fredrik Adelöw 7389f326d9 chore: add import/newline-after-import lint rule 2020-07-02 11:25:04 +02:00