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

API: send project-slug= and version-slug= to the backend #170

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

humitos
Copy link
Member

@humitos humitos commented Oct 23, 2023

Follow the plan discussed in readthedocs/readthedocs.org#10536

Grab the project-slug and version-slug from the meta tag injected by CF and send it back to the backend. If there is any addons that can be enabled in the current page that depends on the URL, it will send it also.

Each Addon class should implement requireUrlParam to decide whether or not to send the url= to the backend API or not.

API changes in: readthedocs/readthedocs.org#10823

Follow the plan discussed in
readthedocs/readthedocs.org#10536

Grab the `project-slug` and `version-slug` from the `meta` tag injected by CF
and send it back to the backend. If there is any addons that can be enabled in
the current page that depends on the URL, it will send it also.

Each Addon class should implement `requireUrlParam` to decide whether or not to
send the `url=` to the backend API or not.
@humitos humitos requested a review from a team as a code owner October 23, 2023 15:01
@humitos humitos requested a review from agjohnson October 23, 2023 15:01
@humitos humitos merged commit 41e5518 into main Oct 24, 2023
@humitos humitos deleted the humitos/send-project-version-slugs branch October 24, 2023 08:54
humitos added a commit that referenced this pull request Oct 24, 2023
Since we are not always sending the `url=` parameter, it could happen that
`addons.doc_diff` does not come in the response. This commit uses `objectPath`
to be prepared for that case.

Related #170
humitos added a commit that referenced this pull request Oct 24, 2023
Since we are not always sending the `url=` parameter, it could happen
that `addons.doc_diff` does not come in the response. This commit uses
`objectPath` to be prepared for that case.

Related #170
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.

2 participants