-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unify default.json and regional.json into list_catalog.json #130
Conversation
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.
Terrific! What changes are needed to support this in Android and iOS then too (so that those platforms know to respect, hidden
, default_enabled
and first_party_protections
?
Android should "just work"; the UI is using a method that retrieves only the visible items form the component catalog and everything else shares the same mechanics with Desktop. iOS will continue using the older |
Is added custom lists and/or brave://adblock rules affected by this? |
@ryanbr nope, |
46d4e2d
to
e2f85b1
Compare
- `hidden` (`boolean`) should the component be displayed in brave://settings/shields/filters as an additional list option? | ||
- `default_enabled` (`boolean`) should the component be enabled by default? | ||
- `first_party_protections` (`boolean`) should first-party heuristics be applied to rules from the list? | ||
- `permission_mask` (`number`) what scriptlet permissions should be granted to rules from the list? |
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 understand what a numeric permission value means in this context. It seems like this should be an enum? What are the possible values?
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.
It is a mask, as in "bitmask". There's 8 independent bits that can be set or unset. They don't necessarily have any fixed meaning at the moment, other than that we're using bit 0 for uBlock Origin's "trusted" resources and bit 1 for any Brave-specific sensitive resources.
This would indeed be good to document 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.
well, on the cpp side we generally do that with an enum like
enum : uint8_t {
kIsInactiveUser = 0,
kIsDailyUser = (1 << 0),
kIsWeeklyUser = (1 << 1),
kIsMonthlyUser = (1 << 2),
};
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.
neither brave-core nor adblock-rust actually attempt to prescribe any meaning to any of the bits; they just apply bitwise operations and allow or deny permission accordingly. The permissions are both required and granted from within this repository.
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.
well, in any case this needs some explanation about what is going on (like what we discussed in DM) because right now it's really not clear at all
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.
added context to the README
e2f85b1
to
5fee5e8
Compare
5fee5e8
to
607fc03
Compare
Required for brave/brave-core#19946
Should be merged along with brave/brave-core-crx-packager#687
Note the 4 new optional fields:
hidden: boolean
should the component be displayed in brave://settings/shields/filters as an additional list option?default_enabled: boolean
should the component be enabled by default?first_party_protections: boolean
should first-party heuristics be applied to rules from the list?permission_mask: number
what scriptlet permissions should be granted to rules from the list?