-
Notifications
You must be signed in to change notification settings - Fork 879
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
Add webcompat issue reporting dialog #3420
Conversation
c1d1114
to
f03832f
Compare
f03832f
to
6c7be91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great - a nice, clean, end-to-end solution! I haven't run the build to fully test, so not approving yet, but thought I'd leave feedback from reading through the code.
components/brave_webcompat_reporter_ui/brave_webcompat_reporter.tsx
Outdated
Show resolved
Hide resolved
components/brave_webcompat_reporter_ui/brave_webcompat_reporter.tsx
Outdated
Show resolved
Hide resolved
|
||
void WebcompatReporterDOMHandler::RegisterMessages() { | ||
web_ui()->RegisterMessageCallback( | ||
"brave_webcompat_reporter.submitReport", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to call this submitWebcompatReporterReport
if there's an issue with removing the brave_webcompat_reporter
global object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just for namespacing purposes, it's sent by chrome.send('brave_webcompat_reporter.submitReport', ...)
.
It still works fine after removing the window.cr.define('brave_webcompat_reporter' ...)
call, if that's what you're referring to.
ae0a0dc
to
f9fff47
Compare
components/brave_extension/extension/brave_extension/_locales/en_US/messages.json
Outdated
Show resolved
Hide resolved
Just pushed one more commit which adds a 'Report a Broken Site' option in the Help menu for MacOS, per feedback from @alexwykoff. |
375abf3
to
fbc5b5e
Compare
ee61214
to
310bb76
Compare
310bb76
to
bd5e6af
Compare
b6006a2
to
cccc5b4
Compare
05f343e
to
25b6580
Compare
padding: 0; | ||
background: transparent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding and background are transparent by default for p
25b6580
to
897c0ec
Compare
import DarkTheme from 'brave-ui/theme/brave-dark' | ||
import BraveCoreThemeProvider from '../../common/BraveCoreThemeProvider' | ||
require('../../fonts/muli.css') | ||
require('../../fonts/poppins.css') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files were moved on master, unfortunately. You'll find them somewhere like brave/ui/webui/fonts
897c0ec
to
0d3d4f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍾 LGTM at least for front-end. Let's wait until CI finishes due to the changes
void WebcompatReporterService::SubmitReport(std::string report_domain) { | ||
std::string api_key = brave::GetAPIKey(); | ||
|
||
std::unique_ptr<base::Environment> env(base::Environment::Create()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't appear to be used for anything
browser/ui/brave_pages.cc
Outdated
content::WebContents* web_contents = | ||
browser->tab_strip_model()->GetActiveWebContents(); | ||
// |web_contents| can be nullptr if the last tab in the browser was closed | ||
// but the browser wasn't closed yet. https://crbug.com/799668 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to reference a bug for GetURLAndTitleToBookmark here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, I just found this in the code for the bookmarks and figured it might still be a relevant warning. I'll remove the comment
4bef257
to
f22950e
Compare
ff5de52
to
8667330
Compare
Implements a new modal dialog for reporting web compatibility issues, as detailed here.
Closes brave/brave-browser#4262.
Includes content originally proposed in brave/brave-ui#532.
Depends on brave/brave-ui#542 for correct theme elements in dark mode.Required
brave-ui
changes have been merged intobrave-core
via #4063.Depends on brave/brave-browser#6550 for build-time
npm
webcompat report API endpoint config option.Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
There doesn't appear to be any automated way to test behavior as it propagates from the browser to a modal dialog and back; and the dialog is trivial enough to just toggle a boolean state variable and pass along a message to the browser once again.
There is a new storybook story added for visual inspection of the webcompat reporter modal.
Recommend manually confirming network request contents when submitting a report on a dev build.
Reviewer Checklist:
After-merge Checklist:
changes has landed on.