Custom Admin Emoji Panel (Reviewboard)

Review Request #11862 — Created Nov. 3, 2021 and discarded — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

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).


 

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 12. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10
11
12

Commits

First Last Summary ID Author
Upload Emojis wip.
81d9db02ab1196cf653dc46a1bc7789d57123591 mxiuwang
Upload Emojis using Models model, soon to be changed to Forms model.
441e0104edac5f50a79c1679f9fda40e5f2cf126 mxiuwang
[WIP] use forms to upload images
146aa88a4d69d36aff0c6a7a16c9bd56a98ec4f2 mxiuwang
[WIP] load() and save() functions.
bfa9548136e4a6ebe929a4f2f4a25d66e49abc48 mxiuwang
[WIP] Emoji working, trying to validate save().
d10c4cd84e9463db47c12985406532600b42d944 mxiuwang
reviewboard/staticbundles.py
reviewboard/admin/models.py
reviewboard/admin/urls.py
reviewboard/admin/views.py
reviewboard/admin/forms/emoji_settings.py
reviewboard/static/rb/css/ui/emoji_settings.less
reviewboard/templates/admin/emoji_settings.html
Loading...