Skip to content

Change homepage shelf api response to use similar CTA style object #8214

@eviljeff

Description

@eviljeff

https://addons-server.readthedocs.io/en/latest/topics/api/shelves.html#homepage-shelves returns footer_text and footer_pathname

results[].footer_text (string|null) – The optional text in the footer of the shelf.
results[].footer_pathname (string|null) – The optional pathname of the URL for the footer’s text.

Which are really pretty similar to the cta object returned in the secondary hero shelf (and modules). For code reuse (both in addons-server and addons-frontend) lets change the homepage shelf response to be

results[].footer (object|null) – The optional footer link and text for the shelf.
results[].footer.url (string) – The url the call to action would link to.
results[].footer.outgoing (string) – url wrapped with outgoing (See Outgoing Links)
results[].footer.text (object|null) – The call to action text. 

(bonus outgoingifying if we ever want to allow external linking)

cc @bobsilverberg @xlisachan

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions