-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Mobile drafts #8280
Mobile drafts #8280
Conversation
/update-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Some comments.
/update-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Rajat-Dabade
Most flows around
- Creating Draft in DM, GM, Channel, Threads, Private Chanel, under deleted thread ✅
- Sending Threads, Editing threads work as expected. ✅
There couple of flow I wanted to bring to your notice
-
On the Draft Screen, if we hit on Android's back button (not the back arrow of MM app) the app closes instead of going back to channels list page
-
Once all drafts are sent out from the draft page, we have an empty page looking like below. would it be nice to add a 'No drafts at the moment' icon, like in web app. @asaadmahmood thoughts?
Thank you @yasserfaraazkhan for reviewing the code.
Let me check on this.
I remember having an empty screen for the draft view, let me add it. |
Can you please review again? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Rajat-Dabade
just 1 last change, in below flow
Scenarios 1:
Steps:
- From Draft page, Edit a draft. Verify you are taken to the Channel/DM/GM
- Edit the Draft in the Channel
- Click on the
<
back Icon on the channel
This is taking user to Draft page
. should it take user to Channels List page?
Scenarios 2:
With above steps, if we edit draft message (without sending it) and Click back button, the draft message is not updated.
Screen.Recording.2024-11-19.at.12.16.41.AM.mov
Scenario 3:
- The User group Name is shown like below
![Screenshot 2024-11-19 at 12 29 22 AM](https://private-user-images.githubusercontent.com/15979783/387351858-efdf05a3-0476-47dd-a4c4-e82f7441a993.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1Nzk2MjYsIm5iZiI6MTczOTU3OTMyNiwicGF0aCI6Ii8xNTk3OTc4My8zODczNTE4NTgtZWZkZjA1YTMtMDQ3Ni00N2RkLWE0YzQtZTgyZjc0NDFhOTkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjg0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmNWY5Yzc2MjYwMTIyM2JkMjdjMTJjYWI3NmE0MWNmYzg3ZjFmM2M4MWM2ZGNkMTkwMDc3ZDQ4YTcwOTI0ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zqzGXac8YUflu78cLf1Wi7eyTGLzFWW4zxg9Tdq_Q1s)
on web app it show as below
![image](https://private-user-images.githubusercontent.com/15979783/387352125-64137399-c1d6-4979-b8b3-292692b15f5f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1Nzk2MjYsIm5iZiI6MTczOTU3OTMyNiwicGF0aCI6Ii8xNTk3OTc4My8zODczNTIxMjUtNjQxMzczOTktYzFkNi00OTc5LWI4YjMtMjkyNjkyYjE1ZjVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjg0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY0M2UwOWRjMGJiOTMyMDg4NjNkYjliMzRmMTNhNTcwNWFjMjkyNGU4MWRkZWRmZmU1YTc0ZmNhZTUwNDc3NWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1u4maqZGSqVDcBwIh7UG8zxZnQXB216YvHKk91_iLGQ)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, minor changes though.
Thank you @Rajat-Dabade
![]() |
@yasserfaraazkhan Thank you for testing. Regarding the issue you mentioned: I have created a ticket for it: https://mattermost.atlassian.net/browse/MM-62513. It's not a blocker. Will take care of this issue in subsequent PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we just need to update the drafts icon to:
icon-send-outline
.
Done @asaadmahmood Updated the Icon. ![]() |
Elias is OOO, his feedback has been addressed and Rahim was included for additional review
Cherry pick is scheduled. |
* refactor: started with draft, done until new tabs for draft * refactor: change the query and added the screen for draft * added condition for fetching draft for channel delete or not * refactor: added draft screen * linter fixes * Added draft post component * added avatar and header display name for the draft post list * added channel info component * channel info completed * proper naming * added image file markdown acknowledgement support * draft actions * Fix the draft receiver in drafts * separated send message handler * Done with send drafts * done with delete drafts * change save to send draft * handle lengthy message with show more button * done with persistent message edit, send and delete drafts * added alert for sending message * added update at time for the drafts * en.json extract fix * Updated dependencies for useCallback * refactor: added drafts list to animated list * added swipeable component and delete conformation for drafts * done with rendering of images in markdown for drafts * en.json issue fixed * fix en.json issue * refactor: en.json fix * addressed review comments * updated image metadata handling code * linter fixes * added the empty draft screen * linter fix * style fix * back button an android takes to the channel list page * en.json fix * draft actions theme compatible * CSS fix for draft channel_info and avatar component * removed the badge icon and change font style drafts * fix send alert sender name for GMs * updated snapshot * added testId to the drafts components * updated send draft test id * clicking on draft takes to the channel * Added toptip for draft tours * intl extract * Rebase to main and reverted local testing changes * Added tooltip for drafts * addressed review comments * reset navigation when click on a draft in draft tabs * fix the theme issue and navigation issue * reverted back the draft click navigation changes * observing draft when hitting back button * removed the unwanted animiation * updated regex for parsing markdown * removed unnecessary checks and change folder name * removed react memo and merge unwanted observes function * removed unnecessary comments * changed the name for observing and querying draft function * removed memo from component level * Text to FormattedText component * Text to formatted text, change image name * added confirmation modal for deleting draft from bottomsheet * using common send_handler for both draft and post * removed magic number for tooltip and bottomsheet * renamed channel_info to draft_post_header * text to formattedText for Edit drafts * removed unnecessary changes * minor fixes * mounting draft only when there is draft * map to reduce * renamed SwipeableDraft to DraftSwipeAction * name fixes * isValidUrl to isParsableUrl and added test * added test and addressed minor review comments * added inline component for the duplicate code * inlt fixes * clearDraft is not optional * optimised categories_list.tsx component * Swipeable to ReanimatedSwipeable, TouchableWithoutFeedback to Pressable and folder name changes * Added comment and disabled eslint rule for showing warning * fixed component file name * minor' * Removed deprecated Animated createAnimatedComponent flatlist * added test for missing protocol check * import change for SwipeableMethod * active tab for tablet view * Updated the drafts icons * Updated compass-icon version to v0.1.48 --------- Co-authored-by: Mattermost Build <[email protected]> (cherry picked from commit 84eded1)
* refactor: started with draft, done until new tabs for draft * refactor: change the query and added the screen for draft * added condition for fetching draft for channel delete or not * refactor: added draft screen * linter fixes * Added draft post component * added avatar and header display name for the draft post list * added channel info component * channel info completed * proper naming * added image file markdown acknowledgement support * draft actions * Fix the draft receiver in drafts * separated send message handler * Done with send drafts * done with delete drafts * change save to send draft * handle lengthy message with show more button * done with persistent message edit, send and delete drafts * added alert for sending message * added update at time for the drafts * en.json extract fix * Updated dependencies for useCallback * refactor: added drafts list to animated list * added swipeable component and delete conformation for drafts * done with rendering of images in markdown for drafts * en.json issue fixed * fix en.json issue * refactor: en.json fix * addressed review comments * updated image metadata handling code * linter fixes * added the empty draft screen * linter fix * style fix * back button an android takes to the channel list page * en.json fix * draft actions theme compatible * CSS fix for draft channel_info and avatar component * removed the badge icon and change font style drafts * fix send alert sender name for GMs * updated snapshot * added testId to the drafts components * updated send draft test id * clicking on draft takes to the channel * Added toptip for draft tours * intl extract * Rebase to main and reverted local testing changes * Added tooltip for drafts * addressed review comments * reset navigation when click on a draft in draft tabs * fix the theme issue and navigation issue * reverted back the draft click navigation changes * observing draft when hitting back button * removed the unwanted animiation * updated regex for parsing markdown * removed unnecessary checks and change folder name * removed react memo and merge unwanted observes function * removed unnecessary comments * changed the name for observing and querying draft function * removed memo from component level * Text to FormattedText component * Text to formatted text, change image name * added confirmation modal for deleting draft from bottomsheet * using common send_handler for both draft and post * removed magic number for tooltip and bottomsheet * renamed channel_info to draft_post_header * text to formattedText for Edit drafts * removed unnecessary changes * minor fixes * mounting draft only when there is draft * map to reduce * renamed SwipeableDraft to DraftSwipeAction * name fixes * isValidUrl to isParsableUrl and added test * added test and addressed minor review comments * added inline component for the duplicate code * inlt fixes * clearDraft is not optional * optimised categories_list.tsx component * Swipeable to ReanimatedSwipeable, TouchableWithoutFeedback to Pressable and folder name changes * Added comment and disabled eslint rule for showing warning * fixed component file name * minor' * Removed deprecated Animated createAnimatedComponent flatlist * added test for missing protocol check * import change for SwipeableMethod * active tab for tablet view * Updated the drafts icons * Updated compass-icon version to v0.1.48 --------- Co-authored-by: Mattermost Build <[email protected]> (cherry picked from commit 84eded1) Co-authored-by: Rajat Dabade <[email protected]>
* Mobile drafts (#8280) * refactor: started with draft, done until new tabs for draft * refactor: change the query and added the screen for draft * added condition for fetching draft for channel delete or not * refactor: added draft screen * linter fixes * Added draft post component * added avatar and header display name for the draft post list * added channel info component * channel info completed * proper naming * added image file markdown acknowledgement support * draft actions * Fix the draft receiver in drafts * separated send message handler * Done with send drafts * done with delete drafts * change save to send draft * handle lengthy message with show more button * done with persistent message edit, send and delete drafts * added alert for sending message * added update at time for the drafts * en.json extract fix * Updated dependencies for useCallback * refactor: added drafts list to animated list * added swipeable component and delete conformation for drafts * done with rendering of images in markdown for drafts * en.json issue fixed * fix en.json issue * refactor: en.json fix * addressed review comments * updated image metadata handling code * linter fixes * added the empty draft screen * linter fix * style fix * back button an android takes to the channel list page * en.json fix * draft actions theme compatible * CSS fix for draft channel_info and avatar component * removed the badge icon and change font style drafts * fix send alert sender name for GMs * updated snapshot * added testId to the drafts components * updated send draft test id * clicking on draft takes to the channel * Added toptip for draft tours * intl extract * Rebase to main and reverted local testing changes * Added tooltip for drafts * addressed review comments * reset navigation when click on a draft in draft tabs * fix the theme issue and navigation issue * reverted back the draft click navigation changes * observing draft when hitting back button * removed the unwanted animiation * updated regex for parsing markdown * removed unnecessary checks and change folder name * removed react memo and merge unwanted observes function * removed unnecessary comments * changed the name for observing and querying draft function * removed memo from component level * Text to FormattedText component * Text to formatted text, change image name * added confirmation modal for deleting draft from bottomsheet * using common send_handler for both draft and post * removed magic number for tooltip and bottomsheet * renamed channel_info to draft_post_header * text to formattedText for Edit drafts * removed unnecessary changes * minor fixes * mounting draft only when there is draft * map to reduce * renamed SwipeableDraft to DraftSwipeAction * name fixes * isValidUrl to isParsableUrl and added test * added test and addressed minor review comments * added inline component for the duplicate code * inlt fixes * clearDraft is not optional * optimised categories_list.tsx component * Swipeable to ReanimatedSwipeable, TouchableWithoutFeedback to Pressable and folder name changes * Added comment and disabled eslint rule for showing warning * fixed component file name * minor' * Removed deprecated Animated createAnimatedComponent flatlist * added test for missing protocol check * import change for SwipeableMethod * active tab for tablet view * Updated the drafts icons * Updated compass-icon version to v0.1.48 --------- Co-authored-by: Mattermost Build <[email protected]> * View custom profile attributes (#8460) * feat: Add custom attributes section to user profile * Add tests for actions/websocket/posts (#8465) * Add tests for actions/websocket/event (#8470) * MM-59585 Add tests for utils/url (#8462) * Add tests for utils/url * Update per review feedback * fix spacing between bookmarks, align + icon (#8476) * Add tests for queries/app/servers (#8477) * Add android detox apk build workflow (#8405) * Add some improvements to thread handling (#8407) * Add some improvements to thread handling * Add missing changes * Android changes * iOS changes * Avoid copys * Refactor getReplyAt * MM-62411 Retrying SSO does not trigger a redirect (#8458) * The server url is being registered as invalid. Even if the URL is valid upon retry, it is still being registered as invalid. * Delete unnecessary import * Delete serverUrl * Delete serverUrl props on test * Update dependencies and upgrade to RN 0.76.5 (#8421) * update dev deps * partial update dependencies * update watermelondb * update rn to 0.76.5, expo to 52.0.18 and others * upgrade android firebase * upgrade detox deps * fix package-lock.json * update emm and paste-input * update turbo-log * update network library * fix tests * review feedback * fix Keyboard blocking signIn button * Fall back to iphone 14 iOS 17.2 simulator as app crashes on iOS 17.4 * changes in deleteCredentialsForServer is causing a crash * withOptions x2 clearly is wrong * re-add cli-platform-apple fix * fix: RN 0.76.5 issue with bottom sheet disappearing (#8478) * experiment, using view vs BottomSheetView * revert previous & try disabling enableDynamicSizing * revert an unintended removal --------- Co-authored-by: yasserfaraazkhan <[email protected]> Co-authored-by: Mattermost Build <[email protected]> Co-authored-by: Rahim Rahman <[email protected]> * Fix package lock identation (#8484) * forgot to push changes --------- Co-authored-by: Rajat Dabade <[email protected]> Co-authored-by: Mattermost Build <[email protected]> Co-authored-by: Guillermo Vayá <[email protected]> Co-authored-by: Joram Wilander <[email protected]> Co-authored-by: yasserfaraazkhan <[email protected]> Co-authored-by: Daniel Espino García <[email protected]> Co-authored-by: kondo <[email protected]> Co-authored-by: Elias Nahum <[email protected]>
Summary
Separate tab for Drafts in mobile.
Ticket Link
https://mattermost.atlassian.net/browse/MM-39356
Checklist
E2E iOS tests for PR
.Device Information
This PR was tested on: iOS version 17.5 (Both on iPhone and ipad)
Screenshots
Release Note
Note:
Will cover all the test case for this PR in separate PR.