This CL turns on the use_theme_colors stylelint rule which enforces that
any colors use variables defined in our codebase.
There are many, many violations, unsurprisingly (about 1500), so for now
I have disabled every single violation. The goal of the dark mode
migration will be in part to remove all violations of this rule.
Additionally, new code going forwards should adhere to the rule and not
add the comment to disable the warning.
Bug: 1152736
Change-Id: I51372724ea51485daef3d4f75b7d3f60a7c8016f
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2671323
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
3 views where remaining from the browser_debugger migration because they
depend on sources. Because duplication of view ids would occur if such
views were migrated into sources-meta.ts they are kept in
browser_debugger-meta.ts.
Bug: 1134103
Change-Id: I2b1a353043a3cb9a880882dd429f55ad5bf567ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631964
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
To be able to localize extensions' strings at declaration using the i18n
v2 model in meta files, we opt to wrap such fields in callbacks as the
i18n API cannot be invoked directly at declaration because it hasn't
been configured by the time the meta files are loaded.
Bug: 1134103
Change-Id: I432f3854f724b8c5b94993ce3ddd469f657c1014
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2635820
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Views that contain a defined location can be shown using the Command
Menu. The command added for this purpose follows the shape 'Show
<ViewTitle>'. Because these commands are localized, a localizable
version of each view's title should also be provided.
This CL adds the field 'localizableTitle' for this purpose while keeping
the original 'title' field with the localized string, since it is still
needed to provide the string value to the GRDP system.
Finally, commands added to show migrated views are updated to follow the
same shape as they do for the legacy ones.
Bug: 1134103
Change-Id: I47aedf2ca4c35ed38c0b9be14969946e582afc7d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2590524
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.
This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.
Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
The Target.model method's type can be improved to convey the type of
the result (based on the constructor argument). This CL does just that.
This unlocks more checking down the line. The CL also alters the types
of the observeModel(s) methods, but in a weaker way, as closure is
apparently not able to instantiate the template correctly for method
invocations.
Bug: chromium:1011811
Change-Id: Ic466cfd946c30f3fcfb4ce24a8a0e1bc542e7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2445776
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Issue:
- Accessibility is improperly implemented for DOM breakpoint checkboxes
- aria-hidden = true is being put on the parent element that contains the label and the checkbox which blocks the SR from announcing "check"/"uncheck"
- the intention is to hide the label
Changes:
- Moving aria-hidden=true from the parent element of the checkbox and checkbox label to just the checkbox label
Bug: 1130800
Change-Id: If9942336138a357700ae94d09d24fbb239e733fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2422270
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
:focus-visible is basically the exact same functionality as the custom
data-keyboard-focus attribute that devtools maintains. This CL converts
all of our uses of data-keyboard-focus in CSS to use :focus-visible.
This has no intended behaviour change although it's possible there are
small differences in our implementation vs. the web platform one, so
this might cause some regression with focus styles for keyboard
interaction.
I tested a few of these manually to verify they still do the same thing.
The CSS linter was unhappy about the ordering of some rules due to
specificity-ordering checks, so there is some re-ordering too.
A follow-up CL will remove our implementation of data-keyboard-focus.
Change-Id: Ifc273f7d82e16ea07e24ed2d1faa6f794a12501d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2352236
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kalon Hinds <kahinds@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
This CL fixes an apparent focus issue in the Elements Event Listener
sidebar pane. When the event listener tree outline was made
keyboard accessible, it was given focus by default when navigating
to the event listener pane from a mouse click.
However, since the tree was not keyboard
focused or marked focus-visible, it appears that the Event Listener
tab is still focus.
The fix removes the focus method from the widget, which causes focus
to remain on the tabbed pane header, which was the previous behavior.
This does not change the keyboard navigation, as keyboard only users
would still use arrows to nav the Event Listener
tab pane and then tab into it. This is the same behavior as the
Styles pane.
Before video in the bug
After: https://imgur.com/2g7W9MC
Bug: 1114604
Change-Id: I103dccef37bfe605e6093bb0f0d4104e3670da14
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2351165
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
As part of the initial seeding of the OWNERS, the automated scripts added
myself as OWNERS to pretty much every single folder in `front_end/`. This
is an artifact of the widespread infrastructure I have done, with in
particular the ES Modules migration that touched every single file in
DevTools.
In the past few weeks, several times I have received CLs were I was asked
to perform a domain review on the feature in question. Most of the time,
I have no knowledge of that particular feature.
To reduce confusion and roundtrips asking for different domain reviewers,
I removed myself as explicit OWNERS of these files. Note that I can still
use my INFRA_OWNERS to land changes, but as usual these are infra-only.
E.g. these will include the larger refactorings that span multiple features,
but not a single feature in particular.
I have kept myself OWNERS of folders that are part of the core
architecture of DevTools, as I am comfortable reviewing these as domain
reviewer.
R=yangguo@chromium.org,aerotwist@chromium.org
Change-Id: Ib1be70b97c5395498795b4b28ce7001731305d41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2282516
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>