Render new RRs, Reviews and Comments as markdown.
Review Request #3892 — Created Feb. 19, 2013 and discarded
What has been done, - Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as `rich_text = False` - All later ReviewRequests, Reviews and Comments will be marked as `rich_text = True` - Enable markdown rendering with code highlight for all pre-text blocks - Use `marked` js lib render text - Use `google code prettify` for syntax highlighting - Rendered text are inserted along the page loading process using `document.write()` - Use single template file to generate text blocks - Always place text inside <pre> tag - Adjust the css style for markdown text
Execute `./reviewboard/manage.py evolve --execute` on RB 1.7.6 database. - All reviews and comments are marked as `rich_text = False` Then post a new review. - The new review is marked as `rich_text = True` - The new review is rendered as Markdown with `.rich-text` class attribute - The old reviews stays as they used to be
Description | From | Last Updated |
---|---|---|
Col: 21 E128 continuation line under-indented for visual indent |
reviewbot | |
So, Django Evolution has some design problems that we're trying to work around, and one of the necessary workarounds is … |
chipx86 | |
The jquery-ui bit is because Djblets owns a copy of jquery-ui and we want to make sure that both Djblets … |
chipx86 | |
Col: 7 E702 multiple statements on one line (semicolon) |
reviewbot | |
Can this not be combined with rich_text.py? |
mike_conley | |
indent this one more space |
mike_conley | |
typo: nad -> and |
mike_conley | |
If this isn't needed, please remove it. |
mike_conley | |
What node is this trying to remove? |
mike_conley |
- Change Summary:
-
- Add rich_text field for `BaseReviewRequestDetails` in the models.py and the evolution script. - Add `marked` and `google-code-prettify` to static/lib/js - Add `richtext.html` as js template which import richtext rendering required js libs - Add rich-text render process into $(document).ready() of the `review_detail.html` template
- Description:
-
What has been done,
- Add rich_text db evolution script. ~ - All old reviews and comments are marked as rich_text = False
~ - All reviews and comments post after this will be marked as rich_text = True
~ - Enable markdown rendering with code highlight for review.body_top
(for testing and style demo purpose only)~ - Use pre block and escaped text for non-rich_text reviews ~ - Use div block and safe text for rich_text reviews ~ - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
~ - All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
~ - Enable markdown rendering with code highlight for review.body_top
~ - Use pre
block and escaped text for non-rich_text reviews~ - Use div
block and safe text for rich_text reviews+ - Use marked
js lib render text onReady+ - Use google code prettify
for syntax highlightingWhat's next,
~ - Try JS/Python markdown libraries and collect info... ~ - How the text been formated/styled ~ - How is the performance ~ - Try more JS/Python markdown libraries and collect info... ~ - Try solve the anchor related issue with marked
~ - Adjust the css style for markdown text - - Whether effecting the anchor or scrolling - - Considering add rich_text field into BaseReviewRequestDetails
, soDescription
andTesting Done
will be have the Markdown capability as well. - Testing Done:
-
~ Execute
./reviewboard/manage.py evolve --execute
on RB 1.7.5 database.~ Execute
./reviewboard/manage.py evolve --execute
on RB 1.7.6 database.- All reviews and comments are marked as rich_text = False
Then post a new review.
- The new review is marked as rich_text = True
~ - The new review is rendered as Markdown in a div block ~ - The new review is rendered as Markdown in a div block with .rich-text
class attribute- The old reviews stays as they used to be - Diff:
-
Revision 2 (+1257 -1)
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/evolutions/rich_text.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/prettify.css reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/templates/base.html reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/templates/js/richtext.html reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
-
-
So, Django Evolution has some design problems that we're trying to work around, and one of the necessary workarounds is that we don't introduce evolutions for tables that haven't been around since the first release. FileAttachmentComment is newer than that. I'm hoping to find a way to change that so that it's not a problem, but for now, I want to make sure we're more bullet-proof. Can you make a second evolution that does just this particular AddField? Make sure to test that it works against a database made prior to these evolutions.
-
The jquery-ui bit is because Djblets owns a copy of jquery-ui and we want to make sure that both Djblets and Review Board share the same definitions, which Review Board can override. In your case, there should not be a separate file. Instead, all the scripts we need for this feature should be defined as a "markdown" Pipeline JavaScript bundle in settings.py (PIPELINE_JS dictionary). Then you should just use {% compressed_js "markdown" %} on it. Same thing for CSS.
- Change Summary:
-
- Use document.write() to write rendered text directly during loading - Move evolution of FileAttachmentComment to separate evolution script
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
+ - Evolution for FileAttachmentComment locates in separated evolution script - Enable markdown rendering with code highlight for review.body_top
- Use pre
block and escaped text for non-rich_text reviews- Use div
block and safe text for rich_text reviews~ - Use marked
js lib render text onReady~ - Use google code prettify
for syntax highlighting~ - Use marked
js lib render text~ - Use google code prettify
for syntax highlighting+ - Rendered text are inserted along the page loading process using document.write() What's next,
~ - Try more JS/Python markdown libraries and collect info... ~ - Try solve the anchor related issue with marked
~ - Adjust the css style for markdown text ~ - Apply Markdown to more text fields - - Adjust the css style for markdown text - Diff:
-
Revision 3 (+1280 -1)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/models.py reviewboard/settings.py reviewboard/reviews/evolutions/rich_text.py reviewboard/reviews/evolutions/rich_text_file_attach_comment.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/css/prettify.css reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
- Change Summary:
-
Add markdown to body_bottom and diff_comment. Adding markdown to other review comments in `review_reply.html` prevents banners from appearing.
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
- Evolution for FileAttachmentComment locates in separated evolution script ~ - Enable markdown rendering with code highlight for review.body_top
~ - Enable markdown rendering with code highlight for review.body_top\body_bottom
anddiff_comment
- Use pre
block and escaped text for non-rich_text reviews- Use div
block and safe text for rich_text reviews- Use marked
js lib render text- Use google code prettify
for syntax highlighting~ - Rendered text are inserted along the page loading process using document.write() ~ - Rendered text are inserted along the page loading process using document.write() + - Adding markdown to other review comments in review_reply.html
prevents banners from appearing.What's next,
- Adjust the css style for markdown text - Apply Markdown to more text fields - Diff:
-
Revision 4 (+1321 -3)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py reviewboard/reviews/models.py reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/reviews/evolutions/rich_text_file_attach_comment.py reviewboard/reviews/evolutions/rich_text.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/css/prettify.css reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/templates/reviews/review_reply.html reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
- Change Summary:
-
- Place all markdown text inside <pre> - Use separate template file to generate rendering code
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
- Evolution for FileAttachmentComment locates in separated evolution script - Enable markdown rendering with code highlight for review.body_top\body_bottom
anddiff_comment
- - Use pre
block and escaped text for non-rich_text reviews- - Use div
block and safe text for rich_text reviews- Use marked
js lib render text- Use google code prettify
for syntax highlighting- Rendered text are inserted along the page loading process using document.write() ~ - Adding markdown to other review comments in review_reply.html
prevents banners from appearing.~ - Place all markdown text inside <pre> + - Use separate template file to generate rendering code What's next,
- Adjust the css style for markdown text ~ - Apply Markdown to more text fields ~ - Fix linkifyText
, so it won't mess up the url within markdown - Testing Done:
-
Execute
./reviewboard/manage.py evolve --execute
on RB 1.7.6 database.- All reviews and comments are marked as rich_text = False
Then post a new review.
- The new review is marked as rich_text = True
~ - The new review is rendered as Markdown in a div block with .rich-text
class attribute~ - The new review is rendered as Markdown with .rich-text
class attribute- The old reviews stays as they used to be - Diff:
-
Revision 5 (+1338 -5)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py reviewboard/reviews/models.py reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/reviews/evolutions/rich_text_file_attach_comment.py reviewboard/reviews/evolutions/rich_text.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/css/prettify.css reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/templates/reviews/review_reply.html reviewboard/templates/reviews/review_rich_text_markdown.html reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/rb/js/reviews.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/templates/reviews/review_request_box.html reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
-
- Change Summary:
-
- Prevent `linkifyText` from applying to `.rich-text` - Change JS and CSS Pipeline name from `markdown` to `text` - Rename `rich_text_markdown` function and template to `review_text_block`, which generate all pre-text blocks. - Add textUtils.js and inserted `marked` options initialization - Extract `linkifyText` from reviews.js into three different functions in textUtils.js
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
- Evolution for FileAttachmentComment locates in separated evolution script ~ - Enable markdown rendering with code highlight for review.body_top\body_bottom
anddiff_comment
~ - Enable markdown rendering with code highlight for all pre-text blocks - Use marked
js lib render text- Use google code prettify
for syntax highlighting- Rendered text are inserted along the page loading process using document.write() ~ - Place all markdown text inside <pre> ~ - Use separate template file to generate rendering code ~ - Use single template file to generate text blocks ~ - Always place text inside <pre> tag What's next,
~ - Adjust the css style for markdown text ~ - Adjust the css style for markdown text - - Fix linkifyText
, so it won't mess up the url within markdown - Diff:
-
Revision 6 (+1406 -10)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py reviewboard/reviews/models.py reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/reviews/evolutions/rich_text_file_attach_comment.py reviewboard/reviews/evolutions/rich_text.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/css/prettify.css reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/templates/reviews/review_reply.html reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/rb/js/reviews.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/rb/js/utils/textUtils.js reviewboard/templates/reviews/review_text_block.html reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/templates/reviews/review_request_box.html reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
- Change Summary:
-
- Adjust the css style for markdown text - Add latest screenshot
- Summary:
-
[WIP]Add rich_text db evolution script for reviews.models. Render markdown if is rich_text.Render new RRs, Reviews and Comments as markdown.
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
- Evolution for FileAttachmentComment locates in separated evolution script - Enable markdown rendering with code highlight for all pre-text blocks - Use marked
js lib render text- Use google code prettify
for syntax highlighting- Rendered text are inserted along the page loading process using document.write() - Use single template file to generate text blocks ~ - Always place text inside <pre> tag ~ - Always place text inside <pre> tag - - What's next,
- Adjust the css style for markdown text - Diff:
-
Revision 7 (+1502 -10)
- Added Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py reviewboard/reviews/models.py reviewboard/reviews/evolutions/__init__.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/reviews/evolutions/rich_text_file_attach_comment.py reviewboard/reviews/evolutions/rich_text.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/rb/css/richtext.css reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/css/prettify.css reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/templates/reviews/review_reply.html reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/rb/js/reviews.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/rb/js/utils/textUtils.js reviewboard/templates/reviews/review_text_block.html reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/templates/reviews/review_request_box.html reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js
- Change Summary:
-
- Combine the evolution scripts together. - Name all text_block variables with `text_block` prefix
- Description:
-
What has been done,
- Add rich_text db evolution script. - All old ReviewRequests, Reviews and Comments are marked as rich_text = False
- All later ReviewRequests, Reviews and Comments will be marked as rich_text = True
- - Evolution for FileAttachmentComment locates in separated evolution script - Enable markdown rendering with code highlight for all pre-text blocks - Use marked
js lib render text- Use google code prettify
for syntax highlighting~ - Rendered text are inserted along the page loading process using document.write() ~ - Rendered text are inserted along the page loading process using document.write()
- Use single template file to generate text blocks - Always place text inside <pre> tag - Adjust the css style for markdown text - Diff:
-
Revision 8 (+1494 -11)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/evolutions/__init__.py reviewboard/settings.py reviewboard/reviews/templatetags/reviewtags.py reviewboard/reviews/evolutions/rich_text.py reviewboard/reviews/models.py Ignored Files: reviewboard/static/lib/js/google-code-prettify/lang-proto.js reviewboard/static/rb/css/richtext.css reviewboard/static/lib/js/google-code-prettify/lang-lua.js reviewboard/static/lib/js/google-code-prettify/lang-ml.js reviewboard/static/lib/js/google-code-prettify/lang-yaml.js reviewboard/static/lib/css/prettify.css reviewboard/static/lib/js/google-code-prettify/lang-n.js reviewboard/static/lib/js/google-code-prettify/lang-tex.js reviewboard/static/lib/js/google-code-prettify/lang-lisp.js reviewboard/templates/reviews/reviewable_base.html reviewboard/static/lib/js/google-code-prettify/lang-vhdl.js reviewboard/static/lib/js/google-code-prettify/lang-dart.js reviewboard/templates/reviews/review_reply.html reviewboard/static/lib/js/marked.js reviewboard/static/lib/js/google-code-prettify/lang-r.js reviewboard/static/lib/js/google-code-prettify/lang-apollo.js reviewboard/static/lib/js/google-code-prettify/lang-vb.js reviewboard/static/lib/js/google-code-prettify/lang-tcl.js reviewboard/static/rb/js/reviews.js reviewboard/static/lib/js/google-code-prettify/run_prettify.js reviewboard/static/lib/js/google-code-prettify/lang-xq.js reviewboard/static/lib/js/google-code-prettify/lang-scala.js reviewboard/static/lib/js/google-code-prettify/lang-clj.js reviewboard/templates/reviews/review_detail.html reviewboard/static/lib/js/google-code-prettify/lang-sql.js reviewboard/static/lib/js/google-code-prettify/lang-erlang.js reviewboard/static/lib/js/google-code-prettify/prettify.js reviewboard/static/rb/js/utils/textUtils.js reviewboard/templates/reviews/review_text_block.html reviewboard/static/lib/js/google-code-prettify/lang-wiki.js reviewboard/static/lib/js/google-code-prettify/lang-css.js reviewboard/static/lib/js/google-code-prettify/lang-rd.js reviewboard/static/lib/js/google-code-prettify/lang-go.js reviewboard/static/lib/js/google-code-prettify/lang-basic.js reviewboard/static/lib/js/google-code-prettify/lang-mumps.js reviewboard/templates/reviews/review_request_box.html reviewboard/static/lib/js/google-code-prettify/lang-hs.js reviewboard/static/lib/js/google-code-prettify/lang-llvm.js reviewboard/static/lib/js/google-code-prettify/lang-pascal.js