Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Links in mardown description content do not open in new tab #24753

Closed
2 tasks done
erik-adsk opened this issue May 13, 2024 · 0 comments · Fixed by #24754
Closed
2 tasks done

🐛 Bug Report: Links in mardown description content do not open in new tab #24753

erik-adsk opened this issue May 13, 2024 · 0 comments · Fixed by #24754
Labels
bug Something isn't working

Comments

@erik-adsk
Copy link
Contributor

erik-adsk commented May 13, 2024

📜 Description

When links are included in a template yaml definition these are not opened in a new tab. There is precedence for this being the intent of the application in github issue #9146. The related PR #9148 provided a linkTarget property that can be passed in.

👍 Expected behavior

A github flavored markdown link provided in the description of a scaffolder field should open in a new tab.

👎 Actual Behavior with Screenshots

The link is actually opened in the current tab.

image

image

👟 Reproduction steps

  1. Create a local-template file local-template.yaml in the plugins/scaffolder-backend/sample-templates folder e.g.
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: test-form
  title: Test Form
  description: This is a test form
spec:
  owner: guest@example.com
  type: test
  parameters:
    - title: Provide some simple information
      properties:
        prop:
          title: A property with links
          type: string
          description: 'A github flavored markdown formatted [link](https://www.google.com) in the description'
  steps:
    - id: debug
      name: debug
      action: debug:log
      input:
        message: message
  output:
    links:
    - title: Google
      url: https://www.google.com/

  1. Add - ./local-template.yaml to as defined in plugins/scaffolder-backend/sample-templates/all-templates.yaml
  2. Run the application locally
  3. Route or navigate to http://localhost:3000/create
  4. Choose the created form e.g. http://localhost:3000/create/templates/default/test-form
  5. Select the github formatted link
  6. Observe the link is opened in the current tab

📃 Provide the context for the Bug.

When a user clicks a link in the markdown of the description of a template field the link is opened in the current tab. This causes users to lose progress on current template submissions which is especially frustrating for multi-step templates.

🖥️ Your Environment

OS: Windows_NT 10.0.19045 - win32/x64
node: v18.20.0
yarn: 3.8.1
cli: 0.26.5-next.1 (local)
backstage: N/A

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant