[Web Inspector] Port Web Inspector Style Guide from Trac#147
Merged
burg merged 1 commit intoWebKit:mainfrom Apr 2, 2026
Merged
[Web Inspector] Port Web Inspector Style Guide from Trac#147burg merged 1 commit intoWebKit:mainfrom
burg merged 1 commit intoWebKit:mainfrom
Conversation
the-chenergy
reviewed
Apr 1, 2026
the-chenergy
reviewed
Apr 1, 2026
the-chenergy
reviewed
Apr 1, 2026
Port and modernize the Web Inspector coding style guide. Covers formatting (braces, semicolons, trailing commas), variable declarations (let-by-default, const for true constants), naming conventions (WI namespace, spelling out words, _handle prefix), class structure (section ordering, inline getters, abstract methods), architecture (protocol firewall, view lifecycle, directory layout), the WI.Object event system (declaring, listening, dispatching, one-shot/async), collections, arrow functions, async patterns with promise gotchas, assertions, and CSS conventions (z-index, theming, class names). Reviewed by Devin Rousso and Qianlang Chen.
f4ea197 to
cb3b802
Compare
Contributor
Author
|
Accepted all suggestions, thanks folks!! |
This file contains hidden or 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
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.
The Web Inspector coding style guide lived on trac.webkit.org (now defunct) and was completely inaccessible to new contributors. Port and modernize it into docs/Deep Dive/Web Inspector/StyleGuide.md.
Covers:
The guide is structured with a Quick Reference of the most common review issues at the top, and detailed sections below. Rules were validated against the current codebase -- outdated Trac rules were dropped or updated.
Resolves #144