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

(8.5.4) GH-2166: Update name of Unknown category #613

Merged
merged 9 commits into from Oct 27, 2020

Global replace Unknown -> Unidentified, UNKNOWN -> Unidentified. Rena…

…me unknown.svg -> unidentified.svg
  • Loading branch information
benstrumeyer committed Oct 6, 2020
commit 99285705677158423b1188a92030fedb86e42efc
@@ -55,7 +55,7 @@
+ Migrate to the new Chromium-based Edge browser (#492)
+ Disable Purplebox on Firefox Android (#494)
+ Allow white-listing of wildcard domains (#501)
+ Allow site-specific white-listing of Unknown Trackers caught by Ad-Blocker (#503)
+ Allow site-specific white-listing of Unidentified Trackers caught by Ad-Blocker (#503)
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Oct 27, 2020
Member

Let's leave the old CHANGELOG entries as is so that they continue to be accurate snapshots of the changes at the time. We'll add a new entry for 8.5.4 saying that we've renamed Unknown to Unidentified.

This comment has been minimized.

@benstrumeyer

benstrumeyer Oct 27, 2020
Author Contributor

That makes sense, left those as is 👍

+ Fixes issue when adding localhost to Trusted Sites with port value (Fixes #470)
+ Add locale-appropriate formatting to historical stats numbers (#498)
+ Remove email opt-in from account creation in panel and hub (#495)
@@ -86,7 +86,7 @@

### GHOSTERY 8.4.3 (October 1, 2019)

+ Fixes issue where Detail View is blank when there are only Unknown trackers found (#446)
+ Fixes issue where Detail View is blank when there are only Unidentified trackers found (#446)
+ New opt-in flow for Ghostery Rewards (#444)
+ Uncheck email promotions options for create account view (#446)
+ Revert Rewards opt-in setting for Firefox (#446)
@@ -109,7 +109,7 @@

### GHOSTERY 8.4.1 (August 6, 2019)

+ Add new Unknown tracker category in detail view with anti-tracking whitelist (#417, #433)
+ Add new Unidentified tracker category in detail view with anti-tracking whitelist (#417, #433)
+ Fixes broken `target=_blank` links in Opera (#426)
+ Fixes error `Uncaught TypeError: c.querySelectorAll` (#406)
+ Show ad-blocking icons in detail view tracker list (#411)
@@ -221,11 +221,11 @@ class PanelAndroid extends React.Component {
}
return 0;
});
const unknownCategory = {
id: 'unknown',
const unidentifiedCategory = {
id: 'unidentified',
name: t('unidentified'),
description: t('unidentified_description'),
img_name: 'unknown',
img_name: 'unidentified',
num_total: unidentifiedTrackers.length,
num_blocked: 0, // We don't want to see the Trackers Blocked text
trackers: unidentifiedTrackers,
@@ -248,7 +248,7 @@ class PanelAndroid extends React.Component {
<Tab tabLabel={t('android_tab_site_blocking')} linkClassName="Tab__label">
<BlockingTab
type="site"
categories={unidentifiedTrackers.length === 0 ? categories : [...categories, unknownCategory]}
categories={unidentifiedTrackers.length === 0 ? categories : [...categories, unidentifiedCategory]}
settings={{ toggle_individual_trackers }}
siteProps={this.siteProps}
callGlobalAction={this.callGlobalAction}
@@ -51,8 +51,8 @@ class BlockingCategory extends React.Component {
return 'restricted';
}

if (category.id === 'unknown') {
return 'unknown';
if (category.id === 'unidentified') {
return 'unidentified';
}

if (trackers.every(tracker => tracker.ss_allowed)) {
@@ -136,8 +136,8 @@ class BlockingCategory extends React.Component {

renderCategorySelect() {
const categorySelect = this.categorySelectStatus;
// Hide category blocking for Unknown trackers
if (categorySelect === 'unknown') {
// Hide category blocking for Unidentified trackers
if (categorySelect === 'unidentified') {
return false;
}
const categorySelectClassNames = ClassNames('BlockingSelectButton', {
@@ -212,7 +212,7 @@ class BlockingCategory extends React.Component {
const categoryImage = `/app/images/panel-android/categories/${img_name}.svg`;

const categoryClassNames = ClassNames('BlockingCategory', {
BlockingCategory__unknown: id === 'unknown',
BlockingCategory__unidentified: id === 'unidentified',
});

return (
@@ -238,7 +238,7 @@ class BlockingCategory extends React.Component {
<div>
<div className="BlockingCategory__listHeader flex-container align-bottom" style={{ height: this.heightListHeader }}>
<span className="BlockingCategory--uppercase flex-child-grow">{t('blocking_category_trackers')}</span>
<span>{category.id === 'unknown' ? t('android_anonymized') : t('blocking_category_blocked')}</span>
<span>{category.id === 'unidentified' ? t('android_anonymized') : t('blocking_category_blocked')}</span>
</div>
<List
height={this.getListHeight(num_total)}
@@ -226,10 +226,10 @@ class BlockingTracker extends React.Component {
);
}

renderUnknownTrackerStatus() {
renderUnidentifiedTrackerStatus() {
const { siteProps, tracker } = this.props;
const trackerSelect = this.trackerSelectStatus;
const svgContainerClasses = ClassNames('UnknownSVGContainer', {
const svgContainerClasses = ClassNames('UnidentifiedSVGContainer', {
whitelisted: tracker.whitelisted && !siteProps.isRestricted,
siteRestricted: siteProps.isRestricted,
});
@@ -335,7 +335,7 @@ class BlockingTracker extends React.Component {
);
}

renderUnknownOverflow() {
renderUnidentifiedOverflow() {
const {
open,
tracker,
@@ -360,7 +360,7 @@ class BlockingTracker extends React.Component {
renderTrackerOverflow() {
const trackerSelect = this.trackerSelectStatus;
if (trackerSelect === 'antiTracking' || trackerSelect === 'adBlock') {
return this.renderUnknownOverflow();
return this.renderUnidentifiedOverflow();
}
if (trackerSelect === 'override-sb') {
return this.renderSmartBlockOverflow();
@@ -383,7 +383,7 @@ class BlockingTracker extends React.Component {
<div>{name}</div>
{this.renderTrackerModified()}
</div>
{(trackerSelect === 'antiTracking' || trackerSelect === 'adBlock') ? this.renderUnknownTrackerStatus() : this.renderTrackerStatus()}
{(trackerSelect === 'antiTracking' || trackerSelect === 'adBlock') ? this.renderUnidentifiedTrackerStatus() : this.renderTrackerStatus()}
{this.renderTrackerOverflow()}
</div>
);
@@ -15,7 +15,7 @@ import {
UPDATE_BLOCKING_DATA,
UPDATE_BLOCK_ALL_TRACKERS,
UPDATE_CATEGORIES,
UPDATE_UNKNOWN_CATEGORY_HIDE,
UPDATE_UNIDENTIFIED_CATEGORY_HIDE,
UPDATE_CATEGORY_BLOCKED,
UPDATE_TRACKER_BLOCKED,
UPDATE_TRACKER_TRUST_RESTRICT,
@@ -64,9 +64,9 @@ export function updateCategories(data) {
* @param {Object} data
* @return {Object}
*/
export function updateUnknownCategoryHide(data) {
export function updateUnidentifiedCategoryHide(data) {
return {
type: UPDATE_UNKNOWN_CATEGORY_HIDE,
type: UPDATE_UNIDENTIFIED_CATEGORY_HIDE,
data,
};
}
@@ -120,9 +120,9 @@ class Blocking extends React.Component {
* @param {string} filterName
*/
setShow(filterName) {
const { actions, categories, unknownCategory } = this.props;
const { actions, categories, unidentifiedCategory } = this.props;
const updated_categories = JSON.parse(JSON.stringify(categories)); // deep clone
const updatedUnknownCategory = JSON.parse(JSON.stringify(unknownCategory)); // deep clone
const updatedUnidentifiedCategory = JSON.parse(JSON.stringify(unidentifiedCategory)); // deep clone

updated_categories.forEach((categoryEl) => {
let count = 0;
@@ -141,9 +141,9 @@ class Blocking extends React.Component {
categoryEl.num_shown = (show) ? count : 0;
});

updatedUnknownCategory.hide = !(filterName === 'all' || filterName === 'unknown');
updatedUnidentifiedCategory.hide = !(filterName === 'all' || filterName === 'unidentified');
actions.updateCategories(updated_categories);
actions.updateUnknownCategoryHide(updatedUnknownCategory);
actions.updateUnidentifiedCategoryHide(updatedUnidentifiedCategory);
}

/**
@@ -316,7 +316,7 @@ class Blocking extends React.Component {
const {
actions,
categories,
unknownCategory,
unidentifiedCategory,
enable_anti_tracking,
expand_all_trackers,
is_expanded,
@@ -349,7 +349,7 @@ class Blocking extends React.Component {
<NotScanned />
) : (
<div className={`${blockingClasses} blocking-trackers show-warnings`}>
{(categories.length > 0 || unknownCategory.unidentifiedTrackers.length > 0) && (
{(categories.length > 0 || unidentifiedCategory.unidentifiedTrackers.length > 0) && (
<Categories
expandAll={expand_all_trackers}
categories={categories}
@@ -360,7 +360,7 @@ class Blocking extends React.Component {
language={language}
smartBlockActive={smartBlockActive}
smartBlock={smartBlock}
unknownCategory={unknownCategory}
unidentifiedCategory={unidentifiedCategory}
enable_anti_tracking={enable_anti_tracking}
/>
)}
@@ -33,7 +33,7 @@ class Categories extends React.Component {
actions,
categories,
expandAll,
unknownCategory,
unidentifiedCategory,
enable_anti_tracking,
sitePolicy,
globalBlocking,
@@ -48,18 +48,18 @@ class Categories extends React.Component {
const globalBlockingBool = !!globalBlocking;
const filteredBool = !!filtered;

const renderCategory = (category, index, isUnknown) => {
const renderCategory = (category, index, isUnidentified) => {
let whitelistedTotal = 0;
const unknownCategoryMapping = isUnknown ? (
const unidentifiedCategoryMapping = isUnidentified ? (
{
id: 'unknown',
id: 'unidentified',
name: t('unidentified'),
description: t('unidentified_description'),
img_name: 'unknown',
num_total: unknownCategory.unidentifiedTrackers.length,
num_blocked: unknownCategory.unidentifiedTrackerCount,
num_shown: unknownCategory.hide ? 0 : unknownCategory.unidentifiedTrackers.length,
trackers: unknownCategory.unidentifiedTrackers.map((unidentifiedTracker) => {
img_name: 'unidentified',
num_total: unidentifiedCategory.unidentifiedTrackers.length,
num_blocked: unidentifiedCategory.unidentifiedTrackerCount,
num_shown: unidentifiedCategory.hide ? 0 : unidentifiedCategory.unidentifiedTrackers.length,
trackers: unidentifiedCategory.unidentifiedTrackers.map((unidentifiedTracker) => {
if (unidentifiedTracker.whitelisted) { whitelistedTotal++; }
return {
name: unidentifiedTracker.name,
@@ -68,7 +68,7 @@ class Categories extends React.Component {
type: unidentifiedTracker.type,
siteRestricted: sitePolicy === 1,
blocked: false,
catId: 'unknown',
catId: 'unidentified',
description: '',
id: unidentifiedTracker.name + unidentifiedTracker.domains[0],
shouldShow: true,
@@ -86,9 +86,9 @@ class Categories extends React.Component {
expandAll={expandAll}
globalBlocking={globalBlockingBool}
index={index}
category={isUnknown ? unknownCategoryMapping : category}
category={isUnidentified ? unidentifiedCategoryMapping : category}
actions={actions}
key={isUnknown ? unknownCategoryMapping.id : category.id}
key={isUnidentified ? unidentifiedCategoryMapping.id : category.id}
filtered={filteredBool}
showToast={showToast}
show_tracker_urls={show_tracker_urls}
@@ -98,19 +98,19 @@ class Categories extends React.Component {
smartBlockActive={smartBlockActive}
smartBlock={smartBlock}
enable_anti_tracking={enable_anti_tracking}
isUnknown={isUnknown}
isUnidentified={isUnidentified}
/>
);
};

const categoryList = categories.map((category, index) => renderCategory(category, index));
const renderUnknownCategory = unknownCategory && unknownCategory.unidentifiedTrackers.length
const renderUnidentifiedCategory = unidentifiedCategory && unidentifiedCategory.unidentifiedTrackers.length
? renderCategory(null, categoryList.length, true) : null;

return (
<div className="scroll-content">
{categoryList}
{renderUnknownCategory}
{renderUnidentifiedCategory}
</div>
);
}
@@ -194,11 +194,11 @@ class Category extends React.Component {

_renderCaret() {
const { isExpanded } = this.state;
const { isUnknown } = this.props;
const { isUnidentified } = this.props;
const caretClasses = ClassNames(this.context, {
'caret-down': !isExpanded,
'caret-up': isExpanded,
Category__antiTrackingCaret: isUnknown
Category__antiTrackingCaret: isUnidentified
});
return (
<svg className={caretClasses} onClick={this.toggleCategoryTrackers} width="11" height="7" viewBox="0 0 11 7" xmlns="http://www.w3.org/2000/svg">
@@ -218,7 +218,7 @@ class Category extends React.Component {
category,
paused_blocking,
sitePolicy,
isUnknown,
isUnidentified,
globalBlocking,
index,
filtered,
@@ -251,8 +251,8 @@ class Category extends React.Component {

return (
<div className={`${category.num_shown === 0 ? 'hide' : ''} blocking-category`}>
<div className={`sticky-category${showTooltip ? ' no-sticky' : ''}${isUnknown ? ' anti-tracking-header' : ''}`}>
{isUnknown && (
<div className={`sticky-category${showTooltip ? ' no-sticky' : ''}${isUnidentified ? ' anti-tracking-header' : ''}`}>
{isUnidentified && (
<div className="Category__antiTrackingDivider" />
)}
<div className="row align-middle">
@@ -278,22 +278,22 @@ class Category extends React.Component {
{ (category.num_total === 1) ? t('blocking_category_tracker') : t('blocking_category_trackers') }
</span>
</div>
{((!isUnknown && !!trackersBlockedCount)
|| (isUnknown && !!category.whitelistedTotal && sitePolicy !== 1)) && (
<div className={`blocked-count${isUnknown ? ' ghosty-blue' : ''}`}>
{((!isUnidentified && !!trackersBlockedCount)
|| (isUnidentified && !!category.whitelistedTotal && sitePolicy !== 1)) && (
<div className={`blocked-count${isUnidentified ? ' ghosty-blue' : ''}`}>
<span className="count">
{isUnknown ? `${category.whitelistedTotal} ` : `${trackersBlockedCount} `}
{isUnidentified ? `${category.whitelistedTotal} ` : `${trackersBlockedCount} `}
</span>
<span className="text">
{isUnknown ? t('blocking_category_whitelisted') : t('blocking_category_blocked') }
{isUnidentified ? t('blocking_category_whitelisted') : t('blocking_category_blocked') }
</span>
</div>
)}
</div>
</div>
<div className="columns collapse-left collapse-right shrink align-self-justify">
{ this._renderCaret() }
{!isUnknown && (
{!isUnidentified && (
<div className={checkBoxStyle} onClick={this.clickCategoryStatus}>
<span className={index ? 't-tooltip-up-left' : 't-tooltip-down-left'} data-g-tooltip={t('panel_tracker_block_tooltip')} onMouseOver={this.showTooltip} onMouseOut={this.hideTooltip}>
<svg className="blocking-icons status t-tooltip-up-left" data-g-tooltip={t('panel_tracker_block_tooltip')} onClick={this.clickTrackerStatus} width="20px" height="20px" viewBox="0 0 20 20">
@@ -337,7 +337,7 @@ class Category extends React.Component {
language={language}
smartBlockActive={smartBlockActive}
smartBlock={smartBlock}
isUnknown={isUnknown}
isUnidentified={isUnidentified}
/>
)}
</div>
ProTip! Use n and p to navigate between commits in a pull request.