question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TechDocs: git feedback buttons not appearing automatically

See original GitHub issue

Expected Behavior

A while ago, we automatically saw the feedback buttons appear for all TechDocs sites. However, now they don’t show automatically.

image

Actual Behavior

The feedback buttons are gone. However, when you add a repo_url entry in mkdocs.yml, they are back.

Stepping through the code using breakpoints, I found that the getRepoUrlFromLocationAnnotation helper function only adds the repo_url OR edit_uri properties. It seems that to show the feedback buttons both properties are necessary (?).

Steps to Reproduce

  1. Have a TechDocs repository without repo_url and edit_uri properties
  2. Generate TechDocs
  3. Feedback buttons are missing
  4. Add repo_url property
  5. Feedback buttons are shown

Context

This is the catalog-info.yaml content used fo the component:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: developer-docs
  annotations:
    alliander.com/product-owner: some-address@domain.com
    backstage.io/techdocs-ref: dir:.
spec:
  type: documentation
  lifecycle: experimental

This is the mkdocs.yml:

site_name: "Developer Docs"

# repo_url: https://github.com/our-org/developer-docs <= buttons are shown when this line is added

nav:
  - Welkom: index.md
  - Help mee: help-mee.md
  .... more entries

plugins:
  - techdocs-core

Your Environment

  • Browser Information:

  • Output of yarn backstage-cli info:

OS:   Windows_NT 10.0.19044 - win32/x64
node: v14.17.6
yarn: 1.22.11
cli:  0.17.0 (installed)

Dependencies:
  @backstage/app-defaults                               1.0.1
  @backstage/backend-common                             0.13.2
  @backstage/backend-tasks                              0.3.0
  @backstage/catalog-client                             0.9.0, 1.0.1
  @backstage/catalog-model                              0.13.0, 1.0.1
  @backstage/cli-common                                 0.1.8
  @backstage/cli                                        0.17.0
  @backstage/config-loader                              1.1.0
  @backstage/config                                     0.1.15, 1.0.0
  @backstage/core-app-api                               1.0.1
  @backstage/core-components                            0.9.3
  @backstage/core-plugin-api                            0.8.0, 1.0.1
  @backstage/dev-utils                                  1.0.1
  @backstage/errors                                     0.2.2, 1.0.0
  @backstage/integration-react                          1.0.1
  @backstage/integration                                0.8.0, 1.1.0
  @backstage/plugin-api-docs                            0.8.4
  @backstage/plugin-app-backend                         0.3.31
  @backstage/plugin-auth-backend                        0.13.0
  @backstage/plugin-auth-node                           0.2.0
  @backstage/plugin-catalog-backend-module-github       0.1.2
  @backstage/plugin-catalog-backend                     1.1.1
  @backstage/plugin-catalog-common                      1.0.1
  @backstage/plugin-catalog-graph                       0.2.16
  @backstage/plugin-catalog-graphql                     0.3.8
  @backstage/plugin-catalog-import                      0.8.7
  @backstage/plugin-catalog-react                       0.9.0, 1.0.1
  @backstage/plugin-catalog                             1.1.0
  @backstage/plugin-explore-react                       0.0.16
  @backstage/plugin-explore                             0.3.35
  @backstage/plugin-github-actions                      0.5.4
  @backstage/plugin-graphql-backend                     0.1.21
  @backstage/plugin-home                                0.4.20
  @backstage/plugin-org                                 0.5.4
  @backstage/plugin-permission-common                   0.5.3, 0.6.0
  @backstage/plugin-permission-node                     0.6.0
  @backstage/plugin-permission-react                    0.3.4, 0.4.0
  @backstage/plugin-proxy-backend                       0.2.25
  @backstage/plugin-scaffolder-backend                  1.1.0
  @backstage/plugin-scaffolder-common                   1.0.1
  @backstage/plugin-scaffolder                          1.1.0
  @backstage/plugin-search-backend-module-pg            0.3.2
  @backstage/plugin-search-backend-node                 0.6.0
  @backstage/plugin-search-backend                      0.5.1
  @backstage/plugin-search-common                       0.3.3
  @backstage/plugin-search-react                        0.1.0
  @backstage/plugin-search                              0.8.0
  @backstage/plugin-sonarqube                           0.3.4
  @backstage/plugin-stack-overflow                      0.1.0
  @backstage/plugin-tech-insights-backend-module-jsonfc 0.1.15
  @backstage/plugin-tech-insights-backend               0.3.0
  @backstage/plugin-tech-insights-common                0.2.4
  @backstage/plugin-tech-insights-node                  0.2.9
  @backstage/plugin-tech-radar                          0.5.11
  @backstage/plugin-techdocs-backend                    1.1.0
  @backstage/plugin-techdocs-node                       0.11.12, 1.1.0
  @backstage/plugin-techdocs-react                      0.1.0
  @backstage/plugin-techdocs                            1.1.0
  @backstage/plugin-user-settings                       0.4.3
  @backstage/release-manifests                          0.0.2
  @backstage/search-common                              0.3.3
  @backstage/test-utils                                 1.0.1
  @backstage/theme                                      0.2.15
  @backstage/types                                      0.1.3, 1.0.0
  @backstage/version-bridge                             0.1.2, 1.0.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
leon-vgcommented, Oct 25, 2022

It looks like the edit button is back. The feedback button is not there, but has been replaced with the option for feedback when selecting a portion of text, right?

Closing this issue. Thanks for fixing this!

image

1reaction
iamEAPcommented, Jun 28, 2022

Seems to work fine for our purposes, setting both repo_url and edit_uri. getRepoUrlFromLocationAnnotation seems to only be called from mkDocsPatchers, so it seems like a safe change, unless I’m missing some context. I could get a PR opened quickly if that’s the case.

Hey @dhhuynh2, I don’t see any issue with what you’ve proposed. Would love a PR, if you’re able to contribute that back!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting TechDocs - Backstage.io
MkDocs Build Errors. Using the TechDocs CLI, you can troubleshoot MkDocs build issues locally. Note this requires you have Docker available to launch...
Read more >
The TechDocs Beta has landed - Spotify Backstage
Real-time builds and feedback. Click the refresh button to hot-reload the updated content. TechDocs can be transformational once fully up ...
Read more >
Troubleshooting Last Updated December 7, 2022 - TechDocs
If the webhook is not created automatically in your enterprise Git repository, the following message is displayed when the repository initialization process ...
Read more >
Creating and Editing Web Login Pages - Aruba Networks
Auto — Do not require a username or password and automatically submit the ... Shows the syntax for displaying cloud identity login buttons...
Read more >
Advanced features of DataWedge for Barcode Scanning and ...
Demo showing the different modes of the Data Capture Plus panel ... Receive feedback across the whole screen when a scan occurs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found