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

[Feature]: Show URL's within annotations as hyperlink #30095

Closed
dirtydiesel46 opened this issue Mar 25, 2024 · 4 comments · Fixed by #30665
Closed

[Feature]: Show URL's within annotations as hyperlink #30095

dirtydiesel46 opened this issue Mar 25, 2024 · 4 comments · Fixed by #30665
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR v1.46

Comments

@dirtydiesel46
Copy link

dirtydiesel46 commented Mar 25, 2024

🚀 Feature Request

Add functionality to display URL within annotations as hyperlink instead of just as a string

Example

test.describe(
  "Test URL string hyperlink",
  {
    annotation: [
      {
        type: "issue",
        description:
          "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
      {
        type: "Project",
        description: "Part of this project - https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
    ],
  },

As can be seen in a report for running the above example test, the "issue" description will be fine - and show as a hyperlink - because it's the only part of the string present

However, the Project description won't show as an hyperlink - just as a normal string

Suggest adding functionality to do the below

test.describe(
  "Test URL string hyperlink",
  {
    annotation: [
      {
        type: "issue",
        description:
          "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+",
      },
      {
        type: "Project",
        url: "https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature.yml&title=%5BFeature%5D:+"
        description: "Part of this project",
      },
    ],
  },

Motivation

Easier to click on the hyperlink and open up the URL, similar to how Playwright currently caters for only a URL in a string to be hyperlinked, adding support for this would make it even better..

@pavelfeldman pavelfeldman added open-to-a-pull-request The feature request looks good, we are open to reviewing a PR P3-collecting-feedback labels Mar 25, 2024
@Az8th
Copy link
Contributor

Az8th commented Mar 26, 2024

Would be greetly appreciated, it would for example be used to add a link to the corresponding issue/task directly in the report

@osohyun0224
Copy link
Contributor

osohyun0224 commented May 5, 2024

Hello! :) @dirtydiesel46 I made #30665 PR 🙆🏻‍♀️
PTAL when you have time 🙇🏻‍♂️

@pavelfeldman
Copy link
Member

This first change looks good! Could you follow up with:

  • rendering it in the HTML report and other reports
  • rendering it in the Trace
  • supporting it in the TeleReceiver/Emitter for shard merger?

@mxschmitt
Copy link
Member

This seems to be addressed by #31521.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR v1.46
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants