Skip to content

add blocklist/block api#13737

Merged
eviljeff merged 2 commits into
mozilla:masterfrom
eviljeff:13706-blocklist-api
Mar 17, 2020
Merged

add blocklist/block api#13737
eviljeff merged 2 commits into
mozilla:masterfrom
eviljeff:13706-blocklist-api

Conversation

@eviljeff

Copy link
Copy Markdown
Member

@eviljeff
eviljeff requested review from a team and willdurand and removed request for a team March 16, 2020 12:40
Comment thread src/addons.code-workspace Outdated
@eviljeff
eviljeff force-pushed the 13706-blocklist-api branch from 8249bcb to f57a83b Compare March 16, 2020 13:41
@eviljeff
eviljeff requested a review from willdurand March 16, 2020 13:42
willdurand
willdurand previously approved these changes Mar 16, 2020

@willdurand willdurand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r+wc

if ('request' in self.context and
'wrap_outgoing_links' in self.context['request'].GET and
'url' in data):
data['url'] = get_outgoing_url(data['url'])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am curious: are we doing this in every serializer that needs to support wrap_outgoing_links? Don't we have a mixin or something for that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we don't, but each serializer does something slightly different (AddonSerializer has to handle l10n, and hero shelves is already a mixin that deals with the CTA text also)

min_version='45',
reason='something happened',
url='https://goo.gol',
updated_by=user_factory())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe you could create a setUp() method and define the block there?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@willdurand
willdurand dismissed their stale review March 16, 2020 14:27

Sorry, one more question

@willdurand willdurand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, I forgot to ask the following question: in both the frontend and server issues, we mention a "version" but I don't see anything related to versions in this patch. What's the plan?

@willdurand

Copy link
Copy Markdown
Member

Sorry, I forgot to ask the following question: in both the frontend and server issues, we mention a "version" but I don't see anything related to versions in this patch. What's the plan?

According to mozilla/addons#13681, there is no need to specify a version.

@eviljeff
eviljeff merged commit d54dc78 into mozilla:master Mar 17, 2020
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.

Implement API to fetch details about blocks

2 participants