-
Notifications
You must be signed in to change notification settings - Fork 1
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
Devtools cleanup #145
Open
dkrasner
wants to merge
57
commits into
dev
Choose a base branch
from
daniel-devtools-cleanup
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Devtools cleanup #145
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manifest, devtools html/js, cells_panel html/js
(currently with fake data)
organizing code into module updating some css
issues with Manfiest v3 TODO
with png and minor changes
initial load, reconnection displays setup for cells loadeded displays
fixing up id class for d3 nodes and cells
adding tests for the tree component
first pass at bezier curves for connectors
prepending "node-" to each DOM element id keeping the original id in "data-original-id" attribute
fixing up navigation bugs
when tree nodes are (almost) vertically aligned, use a basic svg path line instead of a bezier curve adding hover (mouseover mouseleave) handling on the target window object and corresponding no-op methods to tree setup these methods
click handler display node data in the info panel customization performs additional highlighting
looks like a weird race condition
cleaner setup for content-script <-> background background <-> panel/devtools window port API
moving forward the background will not use the direct inspected window eval() - which is a) awkward and b) can have security issues. All communication from the cells panel routes via the background, to the content script which then handles messages as needed (either directly executing utils or sending messages via the window message api)
This was referenced Jun 19, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR represent a refactoring and cleanup of the devtools extension. Previous there were a number of drawbacks:
Approach
Ports are not cleanly defined in both background and content scripts.
Wherever possible the content script handles messages itself, ie it has its own set of utils which do not depend on the cells themselves. For example, mouseover type highlighting for cells only requires the DOM document query API and should be handled by CellHandler as before. Only in the case that something from Cells itself is strictly necessary (for example getting a cell nodes source code) is the window message API used.
This PR can close previous #139 and #140
How Has This Been Tested?
In devtools. The Tree lib has its own tests.
Screenshots or console output (if appropriate)
Types of changes
Checklist: