VOOZH about

URL: https://phabricator.services.mozilla.com/D291613

⇱ ⚙ D291613 Bug 2028605 - part 1: refresh the UX for the Report Broken Site feature; r?gijs


Bug 2028605 - part 1: refresh the UX for the Report Broken Site feature; r?gijs
ClosedPublic

Authored by twisniewski on Apr 1 2026, 10:26 PM.
Referenced Files
Unknown Object (File)
Sat, Jun 13, 11:55 AM
Unknown Object (File)
Fri, Jun 5, 7:14 PM
Unknown Object (File)
Mon, Jun 1, 10:55 PM
Unknown Object (File)
Mon, Jun 1, 3:58 AM
Unknown Object (File)
Sun, May 31, 2:27 PM
Unknown Object (File)
Sat, May 30, 7:14 PM
Unknown Object (File)
Sat, May 30, 5:26 AM
Unknown Object (File)
Sat, May 30, 4:16 AM

Diff Detail

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
browser/components/reportbrokensite/ReportBrokenSite.sys.mjs
1065

Where here I'm adding the ability to hide the stuff which isn't actually sent if the URL is changed too much. (Currently report broken site doesn't do so).

browser/components/reportbrokensite/content/components/register.js
2

I followed the lead of ipprotection-customelements.js for the component, and felt it might be worth having this intermediate file in case we add more components in the future.

browser/themes/shared/customizableui/panelUI-shared.css
2279

I consolidated and cleaned up a bit of CSS here, as we only have one error label now which is not in a web component (for the comment/description textarea).

2334

Not needed now that we fit the panels to their height/content.

mossop requested changes to this revision.May 11 2026, 11:49 AM
mossop added inline comments.
browser/components/customizableui/PanelMultiView.sys.mjs
45

Looks like you don't really need to pass this and can just do the checks on

134–147

I don't really understand this, can you elaborate further what is going on here? Don't you just want to only descend into the shadow root if .

1815

This is the default anyway so can be skipped.

browser/components/reportbrokensite/ReportBrokenSite.sys.mjs
66

Should this be returning ?

73–177

Add a JSdoc comment describing the paramaters please

351

I'd prefer this to be a specific property rather than relying on the ordering on the property.

502

At this point is empty so is there any point in calling this?

518–520

Here you remove the pref observers when there are no browser windows left. But when a new browser window opens you don't re-register the observers.

546

Is this intentionally left in?

1040–1041

Should this be within the if block above?

python/l10n/fluent_migrations/bug_2028605_report_broken_site_design_refresh_migration.py
18–35

All of these string IDs contain a spurious .

This revision now requires changes to proceed.May 11 2026, 11:49 AM
browser/components/customizableui/PanelMultiView.sys.mjs
134–147

Yes, that's what this is doing (the walker always descends into shadow roots, so I have to skip them myself first before asking it for the next/prev node, if the current one isn't skipped).

twisniewski added inline comments.
browser/components/reportbrokensite/ReportBrokenSite.sys.mjs
502

I suppose not. Will remove.

518–520

Great catch. I'll fix that.

546

Nope, will remove.

1040–1041

Yes.

twisniewski updated this revision to Diff 1272137.
browser/components/customizableui/PanelMultiView.sys.mjs
17

I'd feel more comfortable about the logic in here if we had a straightforward way to test this directly. One option would be to write a chrome mochitest for it.

118

Do we need to update to here?

134–147

Ok I see. Can you just do something like this though?

if (shadowRoot && !this.isSkippedNode(currentNode)) {
 this.#walker.showAnonymousContent = false;
}

let nextNode = this.#walker.nextNode();
this.#walker.showAnonymousContent = true;

while (nextNode && this.isSkippedNode(nextNode)) {
 nextNode = this.#walker.nextNode();
}

return nextNode;
139–143

already updates the so I think this simplifies to this?

1979–1982

It's not ideal to have custom behaviour for the report broken site specific element here, but I'm also not seeing why this is needed, can you explain what it solves?

twisniewski added inline comments.
browser/components/customizableui/PanelMultiView.sys.mjs
1979–1982

If we don't do this, then the cursor in the input doesn't move if we press left/right arrow keys. I tried using a more generic fix like this at first, but it broke other unrelated tests in tree, like browser/components/ipprotection/tests/browser/browser_ipprotection_keyboard_navigation.js

browser/components/customizableui/PanelMultiView.sys.mjs
1979–1982

Does setting on the element fix that?

twisniewski added inline comments.
browser/components/customizableui/PanelMultiView.sys.mjs
1979–1982

Does setting on the element fix that?

Unforuntately no, the entire component gets focus, rather than the input inside of it.

browser/components/customizableui/PanelMultiView.sys.mjs
144
1979–1993

I was able to get the same result with this, which makes sense, it just ensures we always get the actual element with focus. Does that work for you? If not your approach is fine.

Either way there is an odd issue with focus ordering. If I am editing the url and press tab then focus moves to the panel close button above, pressing tab a second time moves back to the url input and then again moves to the next element.

twisniewski added inline comments.
browser/components/customizableui/PanelMultiView.sys.mjs
1979–1993

Yes, that seems to work fine. Will change.

Comment Actions

testing-exception-elsewhere: Test changes are later in the stack

dao requested changes to this revision.May 14 2026, 3:11 PM
dao added a subscriber: dao.
dao added inline comments.
browser/components/reportbrokensite/content/components/url-input.css
66

would make sense to whitelist this, perhaps just file a bug on that? (I'd do it but I'm on PTO, so I'm not really here)

75

could this use inset-inline-start?

browser/themes/shared/customizableui/panelUI-shared.css
2135

this seems too generic in combination with :has which is often considered harmful for performance. can you set an extra class on this element instead?

2213

can this use the child selector?

2235

nit: combine into one :not with comma

This revision now requires changes to proceed.May 14 2026, 3:11 PM
twisniewski added inline comments.
browser/components/reportbrokensite/content/components/url-input.css
66
75

Actually I don't even need this anymore after other changes, so let's drop it entirely.

browser/themes/shared/customizableui/panelUI-shared.css
2135

I'm not super confident that I can alter how the viewcontainers set height with JS without causing other bugs.. are you okay with us doing this in a follow-up, or is the perf risk too high to land this as-is?

twisniewski updated this revision to Diff 1274967.
Comment Actions

r+ for the theme changes, but I flagged some things in the Lit element that might be worth following up on. Thanks!

browser/components/reportbrokensite/content/components/url-input.mjs
34–35

I feel like using Lit state properties might be a better fit here? https://lit.dev/docs/components/properties/#internal-reactive-state

static properties = {
 url: { type: String, state: true },
 favicon: { type: String, state: true },
}

might simplify some of the manual work happening with the property creation/setters.

also it's generally best practice to avoid class fields in Lit elements due to some potential footguns: https://lit.dev/docs/components/properties/#avoiding-issues-with-class-fields

88–92

You could simplify this by just adding event listeners directly in the template e.g. https://lit.dev/docs/components/events/#adding-event-listeners-in-the-element-template

119

This doesn't seem to have any effect when I click on it?

This revision is now accepted and ready to land.May 14 2026, 4:55 PM
twisniewski added inline comments.
browser/components/reportbrokensite/content/components/url-input.mjs
34–35

I had tried this initially, but it wasn't working properly to carry over early state before the component was rendered, so I came up with this magic goop instead. However, I tried again and did find out how to do it properly, so I'll make this change in the final patch.

119

Ah, I unintentionally broke it a bit while converting to a lit component. Will be fixed in the final patch.

python/l10n/fluent_migrations/bug_2028605_report_broken_site_design_refresh_migration.py
16

FYI, this landed with a broken migration, which means it wasn't tested (the version approved by @bolsson was completely different).

python/l10n/fluent_migrations/bug_2028605_report_broken_site_design_refresh_migration.py
16

Turns out the migration is only copying 2 strings because all the other directives are missing a .

To be clear, there is no point in updating the migration now. For the future, if you completely change a patch after it's been reviewed, please ask for another review.

twisniewski added inline comments.
python/l10n/fluent_migrations/bug_2028605_report_broken_site_design_refresh_migration.py
16

Will do, sorry :(

If there anything I can do at this point to help (write a follow-up migration etc) please let me know.

browser/themes/shared/customizableui/panelUI-shared.css
2135

would be good to have s follow-up on this.

twisniewski added inline comments.
browser/themes/shared/customizableui/panelUI-shared.css
2135

Agreed, I just had not created a bug for it yet. I just filed https://bugzilla.mozilla.org/show_bug.cgi?id=2040437.

Revision Contents

PathSize
browser/
components/
1 line
customizableui/
197 lines
test/
54 lines
reportbrokensite/
1117 lines
content/
components/
22 lines
138 lines
127 lines
181 lines
8 lines
2 lines
locales/
en-US/
browser/
72 lines
themes/
shared/
customizableui/
251 lines
python/
l10n/
fluent_migrations/
42 lines
toolkit/
components/
reportbrokensite/
28 lines
CommitTreeParentsAuthorSummaryDate
c6e698baa33d57ef4dc19f31Thomas Wisniewski
Bug 2028605 - part 1: refresh the UX for the Report Broken Site feature… (Show More…)

Diff 1275457

browser/components/BrowserComponents.manifest

Loading...

browser/components/customizableui/PanelMultiView.sys.mjs

Loading...

browser/components/customizableui/test/browser_PanelMultiView_keyboard.js

Loading...

browser/components/reportbrokensite/ReportBrokenSite.sys.mjs

Loading...

browser/components/reportbrokensite/content/components/register.js

Loading...

browser/components/reportbrokensite/content/components/url-input.css

Loading...

browser/components/reportbrokensite/content/components/url-input.mjs

Loading...

browser/components/reportbrokensite/content/reportBrokenSitePanel.inc.xhtml

Loading...

browser/components/reportbrokensite/jar.mn

Loading...

browser/components/reportbrokensite/moz.build

Loading...

browser/locales/en-US/browser/reportBrokenSite.ftl

Loading...

browser/themes/shared/customizableui/panelUI-shared.css

Loading...

python/l10n/fluent_migrations/bug_2028605_report_broken_site_design_refresh_migration.py

Loading...

toolkit/components/reportbrokensite/ReportBrokenSiteParent.sys.mjs

Loading...