tshenry
(Taylor)
July 15, 2020, 11:04pm
1
This theme component is deprecated now that it is a core feature.
This is a very small theme component that will allow users to submit a new/edited topic or reply directly from the mobile composer preview.
Theme Creator Demo (Meta account required): https://theme-creator.discourse.org/theme/tshenry/submit-from-preview
Installation
Repository Link
https://github.com/tshenry/discourse-submit-from-preview
If you are unfamiliar with theme components and how to install them, check out the theme installation guide . And if you’d like to learn more about Discourse themes, take a look at this guide .
Feel free to reply with any suggestions or bug reports!
15 Likes
sam
(Sam Saffron)
July 16, 2020, 12:25am
2
I am not sure about this being just a component, feels like a nice addition to core
@codinghorror should we add this?
14 Likes
tshenry
(Taylor)
July 22, 2020, 4:27pm
6
This functionality has been merged into core!
master ← submit-from-mobile-composer
merged 04:17PM - 22 Jul 20 UTC
This will bring the behavior of the [Submit From Preview mobile theme component]… (https://meta.discourse.org/t/submit-from-preview-mobile/157881) into core.
**Before**
<img width="504" alt="before" src="https://user-images.githubusercontent.com/22733864/88114279-63d28600-cb68-11ea-949a-3ee6cfc26007.png">
**After**
<img width="500" alt="after" src="https://user-images.githubusercontent.com/22733864/88114287-68973a00-cb68-11ea-8b81-d5b95b2239e9.png">
**Behavior Notes**
- A bottom-border has been added to the preview to effectively create a "button footer". I think this makes the buttons much more readable.
- Submitting a post that does not meet title, body, etc requirements will immediately close the preview, exposing the relevant requirement tips that are normally displayed in the composer.
- While the preview is open, the auto-save checkmark may display next to the submit button as it would when the preview is not displayed
- The cancel/trash draft icons are suppressed while the preview is open. I don't think we need to expose _every_ button option in the preview.
I am closing this topic and adding a “deprecated” label to the title. Please remove the component from your theme once you have updated your site.
2 Likes