Skip to content
This repository was archived by the owner on Feb 29, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .jpmignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
.git/
.static-storybook/
.storybook/
activity-streams-env/
artifacts/
bin/
content-src/
content-test/
dist/
artifacts/
firefox/
loaders/
logs/
node_modules/
shims/
test/
addon-src/
.storybook/
.static-storybook/

.storybook
*.md
.amo_config.json
.babelrc
.DS_Store
.eslintignore
.eslintrc
.gitignore
.jpmignore
.jscsrc
.mention-bot
.sass-lint.yml
.storybook
.travis.yml
CHANGELOG.md
benchmark-prefs.json
config.*.yml
config.yml
data_dictionary.md
dev-prefs.json
fabfile.py
fabfile.pyc
karma.conf.js
npm-debug.log
npm-shrinkwrap.json
requirements.txt
webpack.config.js
webpack.*.js
yamscripts.yml
116 changes: 58 additions & 58 deletions common/action-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,64 @@ const ActionManager = require("./ActionManager");
const eventConstants = require("./event-constants");

const am = new ActionManager([
"HIGHLIGHTS_REQUEST",
"HIGHLIGHTS_RESPONSE",
"TOP_FRECENT_SITES_REQUEST",
"TOP_FRECENT_SITES_RESPONSE",
"SEARCH_ENGINES_CHANGED",
"RECEIVE_BOOKMARK_ADDED",
"RECEIVE_BOOKMARK_REMOVED",
"RECEIVE_PLACES_CHANGES",
"RECENT_LINKS_REQUEST",
"RECENT_LINKS_RESPONSE",
"APP_INIT",
"DISABLE_HINT",
"ENABLE_ALL_HINTS",
"EXPERIMENTS_RESPONSE",
"HIGHLIGHTS_LINKS_REQUEST",
"HIGHLIGHTS_LINKS_RESPONSE",
"EXPERIMENTS_RESPONSE",
"HIGHLIGHTS_REQUEST",
"HIGHLIGHTS_RESPONSE",
"MERGE_STORE",
"NOTIFY_BLOCK_RECOMMENDATION",
"NOTIFY_BLOCK_URL",
"NOTIFY_UNBLOCK_URL",
"NOTIFY_BOOKMARK_ADD",
"NOTIFY_BOOKMARK_DELETE",
"NOTIFY_HISTORY_DELETE",
"NOTIFY_COPY_URL",
"NOTIFY_EMAIL_URL",
"NOTIFY_FILTER_QUERY",
"NOTIFY_HISTORY_DELETE_CANCELLED",
"NOTIFY_HISTORY_DELETE",
"NOTIFY_MANAGE_ENGINES",
"NOTIFY_OPEN_WINDOW",
"NOTIFY_PERFORM_SEARCH",
"SEARCH_STATE_UPDATED",
"SEARCH_UISTRINGS_RESPONSE",
"SEARCH_SUGGESTIONS_REQUEST",
"SEARCH_SUGGESTIONS_RESPONSE",
"SEARCH_CYCLE_CURRENT_ENGINE_REQUEST",
"SEARCH_CYCLE_CURRENT_ENGINE_RESPONSE",
"NOTIFY_PERFORMANCE",
"NOTIFY_REMOVE_FORM_HISTORY_ENTRY",
"NOTIFY_MANAGE_ENGINES",
"NOTIFY_ROUTE_CHANGE",
"NOTIFY_PERFORMANCE",
"NOTIFY_USER_EVENT",
"NOTIFY_FILTER_QUERY",
"NOTIFY_OPEN_WINDOW",
"NOTIFY_UPDATE_SEARCH_STRING",
"NOTIFY_BLOCK_RECOMMENDATION",
"NOTIFY_SHARE_URL",
"NOTIFY_TOGGLE_RECOMMENDATIONS",
"PREFS_REQUEST",
"PREFS_RESPONSE",
"NOTIFY_UNBLOCK_URL",
"NOTIFY_UPDATE_PREF",
"NOTIFY_UPDATE_SEARCH_STRING",
"NOTIFY_USER_EVENT",
"PLACES_STATS_UPDATED",
"PREF_CHANGED_RESPONSE",
"PREFS_REQUEST",
"PREFS_RESPONSE",
"RECEIVE_BOOKMARK_ADDED",
"RECEIVE_BOOKMARK_REMOVED",
"RECEIVE_PLACES_CHANGES",
"RECENT_LINKS_REQUEST",
"RECENT_LINKS_RESPONSE",
"SEARCH_CYCLE_CURRENT_ENGINE_REQUEST",
"SEARCH_CYCLE_CURRENT_ENGINE_RESPONSE",
"SEARCH_ENGINES_CHANGED",
"SEARCH_STATE_UPDATED",
"SEARCH_SUGGESTIONS_REQUEST",
"SEARCH_SUGGESTIONS_RESPONSE",
"SEARCH_UISTRINGS_RESPONSE",
"SHARE_PROVIDERS_REQUEST",
"SHARE_PROVIDERS_RESPONSE",
"NOTIFY_SHARE_URL",
"NOTIFY_COPY_URL",
"NOTIFY_EMAIL_URL",
"ENABLE_ALL_HINTS",
"DISABLE_HINT",
"APP_INIT",
"PLACES_STATS_UPDATED",
"MERGE_STORE"
"TOP_FRECENT_SITES_REQUEST",
"TOP_FRECENT_SITES_RESPONSE"
]);

// This is a a set of actions that have sites in them,
// so we can do stuff like filter them, add embedly data, etc.
am.ACTIONS_WITH_SITES = new Set([
"TOP_FRECENT_SITES_RESPONSE",
"HIGHLIGHTS_LINKS_RESPONSE",
"RECENT_LINKS_RESPONSE",
"HIGHLIGHTS_LINKS_RESPONSE"
"TOP_FRECENT_SITES_RESPONSE"
].map(type => am.type(type)));

/**
Expand Down Expand Up @@ -249,37 +249,37 @@ function PlacesStatsUpdate(historySize, bookmarksSize) {
}

am.defineActions({
DisableHint,
Notify,
Response,
RequestExpect,
RequestHighlightsLinks,
RequestInitialPrefs,
RequestSearchSuggestions,
NotifyBlockRecommendation,
NotifyBlockURL,
NotifyUnblockURL,
NotifyBookmarkAdd,
NotifyBookmarkDelete,
NotifyHistoryDelete,
NotifyPerformSearch,
NotifyRouteChange,
NotifyPerf,
NotifyCopyUrl,
NotifyCycleEngine,
NotifyEmailUrl,
NotifyEvent,
NotifyFilterQuery,
NotifyOpenWindow,
NotifyUpdateSearchString,
NotifyHistoryDelete,
NotifyManageEngines,
NotifyOpenWindow,
NotifyPerf,
NotifyPerformSearch,
NotifyRemoveFormHistory,
NotifyCycleEngine,
NotifyBlockRecommendation,
NotifyRouteChange,
NotifyShareUrl,
NotifyToggleRecommendations,
NotifyUnblockURL,
NotifyUpdatePref,
NotifyUpdateSearchString,
PlacesStatsUpdate,
RequestExpect,
RequestHighlightsLinks,
RequestInitialPrefs,
RequestSearchSuggestions,
RequestShareProviders,
NotifyCopyUrl,
NotifyEmailUrl,
NotifyShareUrl,
ShowAllHints,
DisableHint,
PlacesStatsUpdate
Response,
ShowAllHints
});

module.exports = am;
14 changes: 7 additions & 7 deletions common/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module.exports = {
// How many items per query?
LINKS_QUERY_LIMIT: 20,

// Number of top sites
TOP_SITES_LENGTH: 6,
// The opacity value of favicon background colors
BACKGROUND_FADE: 0.5,

// Number of large Highlight titles in the new Highlights world, including
// all rows.
Expand All @@ -16,11 +13,14 @@ module.exports = {
ageLimit: "-4 day"
},

// How many items per query?
LINKS_QUERY_LIMIT: 20,

// This is where we cache redux state so it can be shared between pages
LOCAL_STORAGE_KEY: "ACTIVITY_STREAM_STATE",

// The opacity value of favicon background colors
BACKGROUND_FADE: 0.5,
// Number of top sites
TOP_SITES_LENGTH: 6,

// This is a perf event
WORKER_ATTACHED_EVENT: "WORKER_ATTACHED"
Expand Down