Enable per-user defaults for Markdown.
Review Request #6517 — Created Oct. 28, 2014 and submitted
This adds a setting in the My Account page for controlling whether
Markdown is enabled by default. When enabled, all text fields will
default to Markdown mode. When disabled, only fields already set for
rich text in the database will be in Markdown mode by default.The default for users will be based on the 'default_use_rich_text'
setting in siteconfig. Right now, this is not exposed in the UI, but it
will be in a separate change.There were a few places left in the codebase where we were assigning
default values for rich_text fields, and those have been removed,
allowing the UI to control the default based on this setting instead.
Saw that the default for the setting was to enable Markdown.
Edited text fields set for rich text and plain text in the database, and
both were set to edit in Markdown by default.Disabled the default. Saw that that choice persisted.
Edited text fields set for rich text and plain text in the database. Only
the ones set for rich text were set to edit in Markdown by default.
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
local variable 'profile' is assigned to but never used |
reviewbot | |
local variable 'profile' is assigned to but never used |
reviewbot | |
Don't we want to be able to have a system default as well? If so, I think this should be … |
david | |
Maybe put this in an else clause in order to balance it? |
david | |
Col: 29 E241 multiple spaces after ':' |
reviewbot |
- Change Summary:
-
- Removed some unused variables left over from a prior iteration of this change.
- Fixed an overly long line.
- Commit:
-
048dbe12a3f9c9beaef5cd87a126447f78dabb4ca05e106bd635267ee6becc2ee192c0d583ba9229
- Diff:
-
Revision 2 (+29 -7)
-
Tool: Pyflakes Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/models/review_request_draft.py reviewboard/accounts/forms/pages.py reviewboard/accounts/models.py reviewboard/accounts/evolutions/profile_default_use_rich_text.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/base.html Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/models/review_request_draft.py reviewboard/accounts/forms/pages.py reviewboard/accounts/models.py reviewboard/accounts/evolutions/profile_default_use_rich_text.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/base.html
- Change Summary:
-
The default for users is now backed by the 'default_use_rich_text' setting in siteconfig.
- Description:
-
This adds a setting in the My Account page for controlling whether
Markdown is enabled by default. When enabled, all text fields will default to Markdown mode. When disabled, only fields already set for rich text in the database will be in Markdown mode by default. + The default for users will be based on the 'default_use_rich_text'
+ setting in siteconfig. Right now, this is not exposed in the UI, but it + will be in a separate change. + There were a few places left in the codebase where we were assigning
default values for rich_text fields, and those have been removed, allowing the UI to control the default based on this setting instead. - Commit:
-
a05e106bd635267ee6becc2ee192c0d583ba9229f7da22951239b85490f0c280e2373f799f3a3da6
- Diff:
-
Revision 3 (+46 -7)
-
Tool: Pyflakes Processed Files: reviewboard/admin/siteconfig.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/models/review_request_draft.py reviewboard/accounts/forms/pages.py reviewboard/accounts/models.py reviewboard/accounts/evolutions/profile_default_use_rich_text.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/base.html Tool: PEP8 Style Checker Processed Files: reviewboard/admin/siteconfig.py reviewboard/accounts/evolutions/__init__.py reviewboard/reviews/models/review_request_draft.py reviewboard/accounts/forms/pages.py reviewboard/accounts/models.py reviewboard/accounts/evolutions/profile_default_use_rich_text.py reviewboard/changedescs/models.py Ignored Files: reviewboard/templates/base.html
-