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

Support code view highlight in Recorder #33

Open
jecfish opened this issue Jan 17, 2023 · 6 comments
Open

Support code view highlight in Recorder #33

jecfish opened this issue Jan 17, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@jecfish
Copy link
Contributor

jecfish commented Jan 17, 2023

Chrome 110 launches a new "Show code and highlight" feature.

How to test
You can test this feature with the latest Chrome Canary

  1. Open a recording in the Recorder, click "Show code".
  2. Hover over each step, the code should highlight accordingly.

Action required

  1. Your extension needs to update to the latest Puppeteer Replay.
  2. Rebuild & publish a new version to Web Store
  3. That's all!

If your extension doesn't have Puppeteer Replay as dependency, you can implement the [sourcemaps] (https://github.com/puppeteer/replay/blob/main/src/stringify.ts#L68) yourself to make it work.

my gif has pretty low res.
ezgif-4-33a0309279

@jecfish
Copy link
Contributor Author

jecfish commented Jan 17, 2023

@nickmccurdy fyi!

@nickserv
Copy link
Member

Thanks, this looks like it would be handy! Is there any implementation documentation or code sample for it yet?

@jecfish
Copy link
Contributor Author

jecfish commented Jan 18, 2023

Hi Nick, it will work once you upgrade the @puppeteer/replay dependency in this project and rebuild. There's no extra implementation needed.

To see how we build it, this is the code: https://github.com/puppeteer/replay/blob/main/src/stringify.ts#L68

@nickserv
Copy link
Member

Is this a side effect of importing the library or do I need to call stringify?

@OrKoN
Copy link

OrKoN commented Jan 18, 2023

@nickmccurdy source maps get added by the stringify function and you already call it https://github.com/testing-library/testing-library-recorder-extension/blob/main/src/RecorderPlugin.ts#L13 so no changes in the code are needed (only need to update to the latest replay version).

@nickserv
Copy link
Member

Ah, I got confused because I forgot about how the extension gets registered, thanks!

@nickserv nickserv moved this from Blocked to Todo in Testing Library Recorder Extension Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants