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

speedreader: Make heuristics backend feature flag #8471

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

kkuehlz
Copy link
Contributor

@kkuehlz kkuehlz commented Apr 7, 2021

This is more accessible for my team than a command line switch.

Resolves brave/brave-browser#15179

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@kkuehlz kkuehlz requested review from iefremov and a team as code owners April 7, 2021 19:06
@kkuehlz kkuehlz requested a review from pes10k April 7, 2021 19:07
@pes10k
Copy link
Contributor

pes10k commented Apr 7, 2021

@keur just to make sure I understand, can you clarify a couple of things?

  1. I see two flags (Speedreeder and Speedreader Heuristics). How do these interact? If i want the "Heuristics" version, do i enable both? Or only the "Speedreader Heuristics" flag?
  2. I still think these names are confusing (they're both using heuristics!). WDYT of "Speedreeder - Rules List" and "Speedreeder - Readability" or similar?

@kkuehlz
Copy link
Contributor Author

kkuehlz commented Apr 7, 2021

@pes10k yeah. so the speedreader flag is the flag for the speedreader feature itself (it was already present. it's just included in this diff because i am adding the new feature flag below it). the speedreader heuristics backend switches to the readability backend we are using. and yeah sorry about the names i'll change it.

Since the "Rules List" is the default already we don't include a flag for that.

@pes10k
Copy link
Contributor

pes10k commented Apr 7, 2021

thanks @keur !

@kkuehlz kkuehlz force-pushed the speedreader_heuristics_feature branch from 2ebaef0 to 8898dfd Compare April 7, 2021 21:30
@kkuehlz
Copy link
Contributor Author

kkuehlz commented Apr 8, 2021

note: this already passed CI, just did a name change for some variables and they timed out. unrelated.

#if BUILDFLAG(ENABLE_SPEEDREADER_FEATURE)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};

const base::Feature kSpeedreaderReadabilityBackend{
Copy link
Contributor

Choose a reason for hiding this comment

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

needs a space before {

Copy link
Contributor Author

@kkuehlz kkuehlz Apr 8, 2021

Choose a reason for hiding this comment

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

clang-format did this. i agree it looks kinda wonky, but it shows up in other files too

@@ -11,12 +11,15 @@
namespace speedreader {

const base::Feature kSpeedreaderFeature {
"Speedreader",
"Speedreader",
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like bad spacing, needs clang-format ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

clang-format also did this

@kkuehlz kkuehlz force-pushed the speedreader_heuristics_feature branch from 8898dfd to 66e3c22 Compare April 8, 2021 17:53
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

chromium_src changes LGTM

This is more accessible for my team than a command line switch.

Resolves brave/brave-browser#15179
@kkuehlz kkuehlz force-pushed the speedreader_heuristics_feature branch from 66e3c22 to 680fe15 Compare April 13, 2021 05:22
@kkuehlz kkuehlz merged commit 51620b8 into master Apr 13, 2021
@kkuehlz kkuehlz deleted the speedreader_heuristics_feature branch April 13, 2021 16:28
@kkuehlz kkuehlz added this to the 1.25.x - Nightly milestone Apr 13, 2021
kylehickinson added a commit that referenced this pull request Jan 4, 2024
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.

Set Speedreader backend in in chrome://flags
4 participants