Skip to content

Make our documentation page APIs more user friendly #7748

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

Closed
ericholscher opened this issue Dec 14, 2020 · 3 comments · Fixed by #8052
Closed

Make our documentation page APIs more user friendly #7748

ericholscher opened this issue Dec 14, 2020 · 3 comments · Fixed by #8052
Labels
Accepted Accepted issue on our roadmap

Comments

@ericholscher
Copy link
Member

ericholscher commented Dec 14, 2020

This issue is a bit of a meta issue, but it also has at least one concrete action associated with it.

The high level

We want to make it easier for theme authors to integrate the information in our flyout into their themes, which means giving hooks into the information. The most commonly used data here is:

  • Active versions
  • Translations
  • Downloads (PDF, HTML, Epub)
  • View/Edit on GitHub links

Short term work

The most obvious place to focus in the short term is breaking out our monolithic "footer API" into something more usable by users. Currently this API returns rendered HTML with the data instead, along with a few additional JSON details. It doesn't include in JSON the actual data used to render the HTML.

So I imagine the steps towards transition are:

  • Add additional JSON data to the current response
  • Migrate our code to use this new JSON data structure
  • Remove the existing HTML data structure after a deprecation period

I don't believe many users are currently using this structure, but I do know some people have custom CSS on top of it, so we should try and not alter the final HTML output if we can avoid it.

Current response

Screen Shot 2020-12-14 at 9 10 27 AM

Current flyout

Screen Shot 2020-12-14 at 9 12 43 AM

Longer term vision

Once we are returning the JSON data, we need to find a pattern for theme authors to "hook" into this data with Javascript. I think there are a few different approaches to this, and I don't know what the best option would be. I just want to note that is probably the "v2" after we migrate to using the JSON data approach is actually exposing that data to users in a standard way.

Refs #7732

@ericholscher ericholscher added the Accepted Accepted issue on our roadmap label Dec 14, 2020
@ericholscher ericholscher changed the title Make our user documentation APIs to be more user friendly Make our documentation page APIs to be more user friendly Dec 15, 2020
@ericholscher ericholscher changed the title Make our documentation page APIs to be more user friendly Make our documentation page APIs more user friendly Dec 15, 2020
@humitos
Copy link
Member

humitos commented Dec 12, 2022

I'm commenting on this issue to bump it up in your inboxes since it may be a good addition to 2023 roadmap.

This issue is also related to:

@ericholscher
Copy link
Member Author

Yea, this is definitely defining the problem pretty effectively, thanks for digging it up :)

@humitos
Copy link
Member

humitos commented Apr 11, 2023

We've done a lot of work to achieve this goal while working on the new readthedocs-client at https://github.com/readthedocs/readthedocs-client.

Besides, we already have that new API endpoint that eventually we will be expose to users (#10216)

Once we are returning the JSON data, we need to find a pattern for theme authors to "hook" into this data with Javascript

We have an issue opened for this at readthedocs/addons#13

I think we can close this issue here and continue working on the js client repository, since we are discussing there how people will override the specific sections of the flyout, all of it, or just disable it to build their own by using the new API endpoint.

Feel free to re-open if you consider there are still work required to do on this issue.

@humitos humitos closed this as completed Apr 11, 2023
@github-project-automation github-project-automation bot moved this from Planned to Done in 📍Roadmap Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants