Skip to content
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

Use brave url in about page #326

Merged
merged 1 commit into from
Aug 21, 2018
Merged

Use brave url in about page #326

merged 1 commit into from
Aug 21, 2018

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Aug 14, 2018

Hide error specific link and use brave url for learn more link.

Close brave/brave-browser#451

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions

@@ -229,7 +229,7 @@ const char kSyncLearnMoreURL[] =
"https://community.brave.com";

const char kUpgradeHelpCenterBaseURL[] =
"https://community.brave.com";
"https://community.brave.com/?p=update_error&error=";
Copy link
Member Author

@simonhong simonhong Aug 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kUpgradeHelpCenterBaseURL is used by UpdateCheckDriver::OnUpgradeError()

  base::string16 html_error_msg =
      base::StringPrintf(L"%d: <a href='%ls0x%X' target=_blank>0x%X</a>",
                         error_code_, base::UTF8ToUTF16(
                             chrome::kUpgradeHelpCenterBaseURL).c_str(),
                         hresult_, hresult_);

W/o this url change, broken link address is created like https://community.brave.com0x238924

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these point to something more useful? They all just go to the community home page

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's a separate issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridiver @Brave-Matt is working on building out support pages for these.

@simonhong simonhong self-assigned this Aug 14, 2018
@simonhong simonhong requested review from bbondy and yrliou August 14, 2018 03:20
Copy link
Member

@bbondy bbondy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the comment at the top of this file.

 * For rebasing Chromium, see this PR for vim commands:
 * https://github.com/brave/brave-core/pull/155
 * IMPORTANMT: SCAN MANUALLY TO MAKE SURE NOTHING ELSE NEW IS MISSING!

Each chromium rebase we copy the chrome file to this file.
Then we execute the vim commands.

So with this it would only live 1 chromium rebase only.

I think we need to either change the vim command or find another workaround.
Or if we have no better way then add info to the comment above the file too.

</div>
<a hidden$="[[!shouldShowLearnMoreLink_(
currentUpdateStatusEvent_)]]" target="_blank"
- href="https://support.google.com/chrome?p=update_error">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbondy maybe we can handle these in the network delegate by looking at the referrer page?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'll try network delegate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridiver I tested with network delegate and it works well.
With this approach, we don't need to make additional patch file.
However, I think there are some drawbacks with this this approach. WDYT?

  • Status bubble shows google's url instead of our url.
  • Difficult to catch upstream url change

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, it actually displays the url? Maybe just stick with the patch for now then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, when mouse hovers over the link, bubble shows google url.

@simonhong
Copy link
Member Author

simonhong commented Aug 15, 2018

@bbondy I think current vim command strategy would not be used when we have actual urls because each will use different url. Added some comments to url_constants.cc.

@simonhong simonhong force-pushed the modify_update_error_link branch from baa4777 to 1574f35 Compare August 15, 2018 06:03
@bbondy
Copy link
Member

bbondy commented Aug 15, 2018

I'm just not confident we'll have those URLs for quite a while. I hope I'm pleasantly surprised though.
It probably wouldn't be so bad to just not do the replacement anymore and just make sure we have full coverage of each constant. I think we might want to add it to the chromium rebase python script for that though.

@simonhong
Copy link
Member Author

simonhong commented Aug 16, 2018

Hmm, I think removing link for specific error number and only shows only learn more link is sufficient for us.
@bbondy WDYT?

@bbondy
Copy link
Member

bbondy commented Aug 16, 2018

sgtm @simonhong

@simonhong simonhong force-pushed the modify_update_error_link branch from 1574f35 to a3728d7 Compare August 17, 2018 06:28
@simonhong
Copy link
Member Author

simonhong commented Aug 19, 2018

@bbondy I think this is ready to review. As you can see the captured image, only learn more link is used.

+#else
base::StringPrintf(L"%d: <a href='%ls0x%X' target=_blank>0x%X</a>",
error_code_, base::UTF8ToUTF16(
chrome::kUpgradeHelpCenterBaseURL).c_str(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't we just change kUpgradeHelpCenterBaseURL to `"https://community.brave.com/?error=";

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the original change had something like that, but now I can't see it anymore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. chrome::kUpgradeHelpCenterBaseURL in url_constants.cc was modified like that.
However, that change breaks this file's rebase strategy(#155)
Also, we don't have a plan for providing specific links for specific error code for now.
So, link for specific error code was removed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you mean about the rebase strategy. I would rather pass an error code that we don't use yet than patch to remove it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Please check again!

And hide error specific link
@simonhong simonhong force-pushed the modify_update_error_link branch from a3728d7 to 294a19d Compare August 21, 2018 01:38
@bbondy bbondy merged commit 51d59a1 into master Aug 21, 2018
@simonhong simonhong deleted the modify_update_error_link branch August 21, 2018 01:50
@@ -7,6 +7,8 @@
/**
* For rebasing Chromium, see this PR for vim commands:
* https://github.com/brave/brave-core/pull/155
* After rebasing with vim replacing command, please change
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about this comment and the addition to it. If anything is added to url_constants.cc in upstream we'll have missing symbols in the build

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just an easy way to rebase the file when doing major chromium upgrades.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why do we need to do that? Any missing constants will cause build errors and eventually these won't all be the same url anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think above comments just says about the tips to change this file's contents. (replacing strings with vim command...)
After that, we can know missing things if it exists by build errors.

petemill pushed a commit to petemill/brave-core that referenced this pull request Jul 5, 2019
…-409

Adds already claimed status for the grant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants