Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

feat(systemaddon): Add HTTP Referrer to Top Stories #2959

Merged
merged 1 commit into from
Jul 25, 2017

Conversation

csadilek
Copy link
Collaborator

Adding the referrer header when clicking on a card, as well as "open new window" and "open new private window" of the card's context menu.

Moved the handling of OPEN_NEW_WINDOW to the PlacesFeed as it's used by both TopSites and TopStories.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.407% when pulling 8bd4b27 on csadilek:2940 into 729c47c on mozilla:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.407% when pulling 8bd4b27 on csadilek:2940 into 729c47c on mozilla:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.407% when pulling 130b863 on csadilek:2940 into 729c47c on mozilla:master.

@@ -27,6 +29,10 @@ class Card extends React.Component {
showContextMenu: true
});
}
onClick(event) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Probably something like onLinkClick as there's multiple "click" events going on here. See

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I agree, that would be clearer. Also can you add a comment somewhere around here about why this exists? (i.e. that we need to override the regular behaviour because of HTTP referrer stuff)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, updated.

@@ -207,9 +215,23 @@ class PlacesFeed {
case at.DELETE_HISTORY_URL:
NewTabUtils.activityStreamLinks.deleteHistoryEntry(action.data);
break;
case at.OPEN_NEW_WINDOW:
Copy link
Member

Choose a reason for hiding this comment

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

I agree that TopSitesFeed was an odd place to have had this, but I'm not sure PlacesFeed is that much more appropriate… but I suppose that's @k88hudson's call to make!

Copy link
Contributor

Choose a reason for hiding this comment

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

I might be inclined to suggest creating a new WindowFeed or something like that... but because there is a lot of overhead to creating new jsms, maybe just leave this for now.

Copy link
Contributor

@k88hudson k88hudson left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a couple of small comments 👍

@@ -27,6 +29,10 @@ class Card extends React.Component {
showContextMenu: true
});
}
onClick(event) {
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I agree, that would be clearer. Also can you add a comment somewhere around here about why this exists? (i.e. that we need to override the regular behaviour because of HTTP referrer stuff)

@@ -207,9 +215,23 @@ class PlacesFeed {
case at.DELETE_HISTORY_URL:
NewTabUtils.activityStreamLinks.deleteHistoryEntry(action.data);
break;
case at.OPEN_NEW_WINDOW:
Copy link
Contributor

Choose a reason for hiding this comment

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

I might be inclined to suggest creating a new WindowFeed or something like that... but because there is a lot of overhead to creating new jsms, maybe just leave this for now.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.407% when pulling ff2491f on csadilek:2940 into 729c47c on mozilla:master.

@csadilek csadilek merged commit 01db044 into mozilla:master Jul 25, 2017
@as-pine-proxy
Copy link
Collaborator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants