Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drafts for posts and comments #700

Merged
merged 11 commits into from
Sep 8, 2023

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Sep 1, 2023

Pull Request Description

This PR introduces drafts for posts and comments. Drafts are saved upon exiting the edit screen (without posting) and on a timer (in case the app is quit/crashes). They are saved per community or post/comment.

At this time, only title/url/text are saved.

I also cleaned up some spots that were still using the modal for comments, which was broken (#716, #721).

I also found that replying to comments with no post context (e.g., inbox replies, user profile comments) is currently broken (to be addressed later).

P.S. I would like to do undo/redo in the future as well.

Issue Being Fixed

Inability to save drafts.

Screenshots / Recordings

qemu-system-x86_64_z2Z9WOrgGJ.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@CTalvio
Copy link
Collaborator

CTalvio commented Sep 1, 2023

YYYYEEEEEEEESSSSSSSSS!!!!!!!!!

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, thanks for taking this on! This is going to be a really nice QoL feature to have :D

I just left a few comments on some parts to consider, but other than those, I think it was done pretty well! One test I would also try out is import/exporting settings and see if the drafts also come with it. I think the appropriate behaviour there is to ensure that we ignore the drafts when we export/import settings

lib/community/pages/create_post_page.dart Outdated Show resolved Hide resolved
lib/community/pages/create_post_page.dart Outdated Show resolved Hide resolved
lib/community/widgets/community_sidebar.dart Show resolved Hide resolved
lib/core/enums/local_settings.dart Show resolved Hide resolved
@hjiangsu hjiangsu merged commit d36a033 into thunder-app:develop Sep 8, 2023
1 check passed
@micahmo micahmo deleted the feature/post-comment-drafts branch September 9, 2023 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants