Custom Admin Emoji Panel (Djblets)

Review Request #11884 — Created Nov. 27, 2021 and discarded

mxwang
Djblets
release-2.x
djblets

Adds a page to the admint panel which allows an admin to upload a custom emoji by uploading a name, shortcode, description, and image. These fields are editable whenever the user re-vists the page. The emoji data is loaded from, and saved into SiteConfiguration, while the image data is loaded from and saved to DefaultStorage.

Further work that needs to be done: * Enforcing mandatory fields that user must fill out before clicking "Save", so as to not raise an error. * Adding labels to the form fields, and removing the extra "name" field at the very top of the form. * Rendering a preview of the emoji when loading the page (through get_context() in EmojiFileUpload).



Summary Author
ListEditDictionaryField Patch from Michelle Aubin.
mxiuwang
[WIP] Adding custom emojis in admin emoji dashboard.
mxiuwang
[WIP] rendering images.
mxiuwang
[WIP] Render images.
mxiuwang
Add docstring, code cleanup.
mxiuwang
Description From Last Updated

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (141 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (96 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (100 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (199 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

Col: 87 Missing semicolon.

reviewbotreviewbot

Col: 62 Missing semicolon.

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (141 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (96 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (100 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (87 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (199 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

E261 at least two spaces before inline comment

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

Col: 87 Missing semicolon.

reviewbotreviewbot

Col: 62 Missing semicolon.

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

E231 missing whitespace after ','

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

F401 'django.core.files.storage.DefaultStorage' imported but unused

reviewbotreviewbot

F401 'django.utils.html.format_html_join' imported but unused

reviewbotreviewbot

F401 'django.utils.html.format_html' imported but unused

reviewbotreviewbot

E302 expected 2 blank lines, found 1

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W292 no newline at end of file

reviewbotreviewbot

Col: 87 Missing semicolon.

reviewbotreviewbot

Col: 62 Missing semicolon.

reviewbotreviewbot
Checks run (2 failed)
flake8 failed.
JSHint failed.

flake8

JSHint

mxwang
Review request changed

Commits:

Summary Author
-
ListEditDictionaryField Patch from Michelle Aubin.
mxiuwang
-
[WIP] Adding custom emojis in admin emoji dashboard.
mxiuwang
+
ListEditDictionaryField Patch from Michelle Aubin.
mxiuwang
+
[WIP] Adding custom emojis in admin emoji dashboard.
mxiuwang
+
[WIP] rendering images.
mxiuwang

Diff:

Revision 2 (+950 -214)

Show changes

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

mxwang
Review request changed

Summary:

-ListEditDictionaryField Patch from Michelle Aubin.
+Custom Admin Emoji Panel (Djblets)

Description:

~  

[WIP] Adding custom emojis in admin emoji dashboard.

  ~

Adds a page to the admint panel which allows an admin to upload a custom emoji by uploading a name, shortcode, description, and image. These fields are editable whenever the user re-vists the page. The emoji data is loaded from, and saved into SiteConfiguration, while the image data is loaded from and saved to DefaultStorage.

  +
  +

  +
  +

Further work that needs to be done:

  + * Enforcing mandatory fields that user must fill out before clicking "Save", so as to not raise an error.
  + * Adding labels to the form fields, and removing the extra "name" field at the very top of the form.
  + * Rendering a preview of the emoji when loading the page (through get_context() in EmojiFileUpload).

Commits:

Summary Author
-
ListEditDictionaryField Patch from Michelle Aubin.
mxiuwang
-
[WIP] Adding custom emojis in admin emoji dashboard.
mxiuwang
-
[WIP] rendering images.
mxiuwang
+
ListEditDictionaryField Patch from Michelle Aubin.
mxiuwang
+
[WIP] Adding custom emojis in admin emoji dashboard.
mxiuwang
+
[WIP] rendering images.
mxiuwang
+
[WIP] Render images.
mxiuwang
+
Add docstring, code cleanup.
mxiuwang

Diff:

Revision 3 (+1012 -286)

Show changes

Checks run (2 failed)

flake8 failed.
JSHint failed.

flake8

JSHint

mxwang
Review request changed

Status: Discarded

Loading...