-
-
Notifications
You must be signed in to change notification settings - Fork 995
Enhance 404 error page by adding search form and loading additional docs tags #1923
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
base: main
Are you sure you want to change the base?
Conversation
Thanks, @garybadwal, for your PR. |
Hi @pauloxnet, My.items.-.Awesome.Screenshot.mp4 |
Hi @pauloxnet, just curious to check if you gonna throw the video ? |
Thanks for the video. It seems that it is rendered properly on the 404 page. I would ask someone from @django/accessibility to give it a look since we're changing the UX here. I can say that maybe adding the input search only without the information of the version, language etc in the bottom right side can be confusing. What do others think about it? |
…ngoproject.com into 404-page-improved
for more information, see https://pre-commit.ci
Hi @pauloxnet, Yes, it might not be very clear. Currently, the information in the box provides good clarity to the user that it will be searching the documentation of the particular version in a specific language. I've also pushed a new commit where I addressed a scenario I encountered while rigorously testing. It involves any type of exception that leads to a 404 page, and the keys for the version and language information differ in that context. So now that is fixed as well. |
Thanks, for pushing this, but I now realized that we have a blocker. See #1347 (comment) |
Hi @pauloxnet, I got your point, so I implemented the first suggested solution here. I'm checking the subdomain in this and if it matches the docs subdomain only then the search bar is shown. |
Hi @pauloxnet, just curious to check if you get time to review the PR, I have implemented the first solution you proposed in the comment: #1347 (comment). Now the search bar is only available on the 404 page shown under docs.djangoproject.com. |
Please do not tag me directly in every comment, because I try to review PRs in the little free time I have and it is not certain that I can do it every day or week. I am also not the only one on the team @django/djangoproject-com-maintainters here. Also, as you have seen, I asked for the @django/accessibility team to review before giving an final approval. To be clear, in my message on the issue I highlighted the problem that the search is only present in the Django documentation, which is reachable in a dedicated domain, but I did not propose as a solution to using the domain as a value directly in the template code. I was thinking more of a separate 404 page for the documentation, but I didn't have the time to deep dive in the code. I'm honestly not very convinced by the use of the domain in the template, but I would like to read the opinions of others. We are all volunteers here so it can take time to have feedback on your PR or issues please be patient. 🙂 |
Ok, Thank you for that. I was just was bit excited about it. |
And thanks again to be excited and proposing this PR, it's that waiting is a great part of open source contributions, don't be discouraged by that, but at the same time it's important to respect other time. ;-) |
My suggested next steps would be:
I agree with Paulo that it might make sense to first implement a site-wise search. I don't think the PR helps the UX of non-documentation related 404s e.g. https://www.djangoproject.com/community/not-found/ |
Sure, I'll look into this and try making these changes. |
Closes Issue
This PR improves the 404 error page to enhance user experience and usability. The following changes have been made:
Search Form Integration
Additional Template Tags
{% load i18n docs %}
to load additional functionality for internationalization and documentation integration.Improved Header Content
File Changes:
djangoproject/templates/404.html
:docs
tag in{% load %}
.{% search_form %}
tag for improved user interaction.Benefits:
Testing:
Closes: #1347