djangoproject.com
djangoproject.com copied to clipboard
Code blocks may wrap awkwardly in small windows
I noticed a visual issue that caused me to incorrectly copy the code for this section: https://docs.djangoproject.com/en/1.9/intro/tutorial05/#create-a-test-to-expose-the-bug
In the "Create a test to expose the bug" section, this code block in "polls/test.py"
#polls/test.py
#...
self.assertEqual(future_question.was_published_recently(), False)
gets pushed over and "loses" its tab, making it appear outside of the function scope.
To reproduce:
- Open a browser window (FireFox 46.0.1 or Chrome 50.0.2661.102 m) with a width greater than 822px
- Go to https://docs.djangoproject.com/en/1.9/intro/tutorial05/#create-a-test-to-expose-the-bug
- Resize the window so that its width is smaller than 822px
- The self.assertEqual part "jumps" to the same tab level as the QuestionMethodTests class.

Not sure the best way to handle this. I'd rather not change the overflow to add a horizontal scroll bar instead because I always find that annoying. If you copy and paste the entire code block, the tab is preserved.
Would setting word-break: break-all; (MDN) for code example maybe help to reduce this kind of line breaks?
word-break works in most cases, but it still makes things look awkward in a few cases

can I work on it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale. This is still a valid issue that is needed to be addressed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@pauloxnet since old issues have now been triaged, how about disabling stalebot so we don't need to add comments to every issue every 6 months to prevent automatic closure?
@pauloxnet since old issues have now been triaged, how about disabling stalebot so we don't need to add comments to every issue every 6 months to prevent automatic closure?
@timgraham activating the stalebot last year allowed us to close many old issues. I think an issue opened 7 years ago should be closed if no one takes care of it despite two reminders in the last year. As the removal of the stalebot is not only up to me, I think it is worth discussing it in a separate issue or on the developer mailing list.
I created a django-developers stalebot thread.
You were right to start the discussion on the mailing. I think it's best for developers to have a say on this, especially those who actively help resolve issues. I just hope this repository doesn't fill up with unfinished issues again, it took a lot to clean up the old bad issues.