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

Addons: add "flyout position" to the form #554

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

humitos
Copy link
Member

@humitos humitos commented Jan 8, 2025

@humitos humitos merged commit 6da3d15 into main Jan 14, 2025
4 checks passed
@humitos humitos deleted the humitos/addons-flyout-position branch January 14, 2025 10:14
humitos added a commit to readthedocs/addons that referenced this pull request Jan 14, 2025
Initial POC to prove if this idea is possible and how we feel about it.

I put together an example of what I understand we want to build here 😅 .
In this example, the theme author will make explicitly how they want to
use `readthedocs-flyout` HTML tag:

```html
<readthedocs-flyout position="top-right"></readthedocs-flyout>
```

That will add the class `top-right` and show the flyout as follows:


![Screenshot_2025-01-08_12-44-20](https://github.com/user-attachments/assets/14ed7946-a1ab-4c44-84dc-d2a9ee456b8c)

However, the project author can change the `position` value from the
dashboard if they prefer to override the theme's default value:


![Peek 2025-01-08
12-46](https://github.com/user-attachments/assets/d8ab340b-2fc1-4704-ac0e-4a12bfe0ae07)

* Related #51
* Requires readthedocs/ext-theme#554
* Requires readthedocs/readthedocs.org#11891
* Example using
https://test-builds.readthedocs.io/en/addons-theme-defaults/
* Closes #434
humitos added a commit to readthedocs/addons that referenced this pull request Jan 22, 2025
Initial POC to prove if this idea is possible and how we feel about it.

I put together an example of what I understand we want to build here 😅 .
In this example, the theme author will make explicitly how they want to
use `readthedocs-flyout` HTML tag:

```html
<readthedocs-flyout position="top-right"></readthedocs-flyout>
```

That will add the class `top-right` and show the flyout as follows:


![Screenshot_2025-01-08_12-44-20](https://github.com/user-attachments/assets/14ed7946-a1ab-4c44-84dc-d2a9ee456b8c)

However, the project author can change the `position` value from the
dashboard if they prefer to override the theme's default value:


![Peek 2025-01-08
12-46](https://github.com/user-attachments/assets/d8ab340b-2fc1-4704-ac0e-4a12bfe0ae07)

* Related #51
* Requires readthedocs/ext-theme#554
* Requires readthedocs/readthedocs.org#11891
* Example using
https://test-builds.readthedocs.io/en/addons-theme-defaults/
* Closes #434
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.

3 participants