Skip to content

Addons: allow users to opt-in into the beta addons #10733

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

Merged
merged 7 commits into from
Sep 18, 2023
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Sep 13, 2023

I created the URL, models, view and form to prepare ourselves for the beta addons. Currently, if the Project.addons fields is not null we add a HTTP header to tell Cloudflare to enforce the new beta addons on this project.

In the future, we can use each of the ProjectAddonsConfig field to let the user decide which of the addons they want to enable/disable and change their configurations.

I created the URL, models, view and form to prepare ourselves for the beta
addons. Currently, if the `Project.addons` fields is not null we add a HTTP
header to tell Cloudflare to enforce the new beta addons on this project.

In the future, we can use each of the `ProjectAddonsConfig` field to let the
user decide which of the addons they want to enable/disable and change their
configurations.

* Related: readthedocs/ext-theme#212
@humitos humitos requested a review from a team as a code owner September 13, 2023 14:33
humitos added a commit to readthedocs/ext-theme that referenced this pull request Sep 13, 2023
Show a small form to the user where they can enable/disable the new beta addons
on their project.

* Closes #212
* Requires readthedocs/readthedocs.org#10733
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

This looks like a good start.

"""
Addon search user defined filter.

Specific filter defined by the user to show on the search modal.
Copy link
Member

Choose a reason for hiding this comment

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

An example or use case here would probably be useful. Is this to allow users to default to subprojects enabled or similar?

Copy link
Member Author

@humitos humitos Sep 14, 2023

Choose a reason for hiding this comment

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

The idea behind this is to allow users to create filters to show in the search modal, like these ones:

Screenshot_2023-09-14_10-26-27

Copy link
Member Author

Choose a reason for hiding this comment

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

We can skip it for now if we are not sure how we are going to use this, tho.

Copy link
Member

Choose a reason for hiding this comment

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

I don't feel too strongly, just wanted to make sure we had a plan for this. I'm fine to include it if we can make the docstring obvious for the user, but perhaps it's better for the next version? 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Making these filters configurable has been the idea from the beginning of the re-work for the search as you type. However, they are not yet configurable by the user and they won't be in this iteration because it will require more UI.

For now, we are only allowing them to opt-in into all the addons at once. In the following iteration we will be exposing specific configuration for each addon and they will be able to create these filters. This PR only creates the models we will use in the future.

Use a `AddonsConfig.enabled` field to decide whether or not all the addons are
enabled.
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

These changes look good to me, with a bit more explanation of the headers 👍

@humitos humitos merged commit 634d879 into main Sep 18, 2023
@humitos humitos deleted the humitos/addons-opt-in branch September 18, 2023 13:26
humitos added a commit to readthedocs/ext-theme that referenced this pull request Sep 18, 2023
* Addons: allow users to opt-in into the beta addons

Show a small form to the user where they can enable/disable the new beta addons
on their project.

* Closes #212
* Requires readthedocs/readthedocs.org#10733

* Add beta label on the menu item

* Upate the notification and ask for feedback
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