Skip to content

Comments

Add trigger and target element logs for devtools#276

Merged
julianrubisch merged 3 commits intomainfrom
devtools-changes
Jun 23, 2023
Merged

Add trigger and target element logs for devtools#276
julianrubisch merged 3 commits intomainfrom
devtools-changes

Conversation

@julianrubisch
Copy link
Contributor

Enhancement

Description

Furnishes cable-ready-updates-for-element with instance variables for element logs, so they can displayed in the devtools like this:

CleanShot 2023-05-08 at 12 22 44@2x

@julianrubisch julianrubisch requested a review from hopsoft May 8, 2023 10:25
@netlify
Copy link

netlify bot commented May 8, 2023

Deploy Preview for cableready ready!

Name Link
🔨 Latest commit 46ea1aa
🔍 Latest deploy log https://app.netlify.com/sites/cableready/deploys/64885995e1159d00082df5a3
😎 Deploy Preview https://deploy-preview-276--cableready.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

shadowRoot.innerHTML = template

this.triggerElementLog = []
this.targetElementLog = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to clear these logs or perhaps have a log stack that we move them to when cable-ready:after-update is dispatched?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

You are probably correct, though in my tests it didn't really matter because they are cleared with every browser refresh.

I think the easiest would be to limit them to a small number (10?) and do a kind of FIFO thing so they get cleared automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a BoundedQueue class, let me know if you like the implementation.

Also, added datetime strings to the log lines

@julianrubisch julianrubisch requested a review from hopsoft June 13, 2023 11:58
@julianrubisch julianrubisch merged commit d4b8364 into main Jun 23, 2023
@julianrubisch julianrubisch deleted the devtools-changes branch June 23, 2023 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants