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 based on HTTP status code #385

Open
humitos opened this issue Sep 25, 2024 · 6 comments
Open

Addons based on HTTP status code #385

humitos opened this issue Sep 25, 2024 · 6 comments
Assignees
Labels
Needed: design decision A core team decision is required

Comments

@humitos
Copy link
Member

humitos commented Sep 25, 2024

In #373 we started making usage of the HTTP status code to decide whether or not show specific addons on those pages. We are not showing the flyout and ad on 404 pages, for example. However, if the page is customized (using sphinx-notfound-page) I think we still want to show them. What would be a good way to implement this logic? Should we add another META tag via CF to communicate if the 404 page is custom or not?

@humitos humitos added the Needed: design decision A core team decision is required label Sep 25, 2024
@humitos
Copy link
Member Author

humitos commented Oct 7, 2024

Examples:

Those pages should show the flyout menu at the bottom right, but it's not there.

@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Nov 4, 2024
@humitos humitos self-assigned this Nov 4, 2024
humitos added a commit that referenced this issue Nov 11, 2024
It seems the `isEnabled` method wasn't updated to accept the `httpStatus` and
that's why it wasn't working fine.

Now, the Ad won't be shown on pages like this one:
https://sphinx-rtd-theme.readthedocs.io/en/stable/notfound

Related #385
@humitos
Copy link
Member Author

humitos commented Nov 11, 2024

What would be a good way to implement this logic? Should we add another META tag via CF to communicate if the 404 page is custom or not?

@agjohnson what do you think?

humitos added a commit that referenced this issue Nov 12, 2024
It seems the `isEnabled` method wasn't updated to accept the
`httpStatus` and that's why it wasn't working fine.

Now, the Ad won't be shown on pages like this one:
https://sphinx-rtd-theme.readthedocs.io/en/stable/notfound

Related #385
Closes #386
@agjohnson
Copy link
Contributor

agjohnson commented Nov 12, 2024

It doesn't feel like there is a good blanket default here. Even if a user has a custom 404 page they might still not want the flyout, notifications, or other addons on their error pages. This might come down to explicit configuration.

@humitos
Copy link
Member Author

humitos commented Nov 13, 2024

Yeah, that probably makes sense. What granularity of explicit configuration are you thinking about? Per addon? Per http status code? Both? Like,

  • Show flyout on 404 pages, but don't show notifications
  • Show flyout on 404 pages but not on 403

@agjohnson
Copy link
Contributor

Hrm, not sure really. I'm not feeling we need to offer configuration options by status code, that feels excessive.

If we have enough users asking for this, it maybe is worth a configuration option on each addon. I expect that themes are most likely to dictate whether error pages have our elements on them though. It would be good to design starting from there probably.

@humitos
Copy link
Member Author

humitos commented Nov 14, 2024

OK, that makes sense. I will leave this issue aside for now then until we have more feedback from users. There is no need to complicate it currently, in particular, if we don't have the use cases well defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
Status: In progress
Development

No branches or pull requests

2 participants