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 popup menu support for chat header and chat list #6671

Merged
merged 1 commit into from
Dec 1, 2018

Conversation

vitvly
Copy link
Contributor

@vitvly vitvly commented Nov 9, 2018

Fixes #5311 #5314

@ghost
Copy link

ghost commented Nov 9, 2018

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

@vitvly vitvly self-assigned this Nov 9, 2018
@vitvly vitvly added the desktop label Nov 9, 2018
@vitvly vitvly changed the title [WIP] Add popup menu support for chat header [WIP] Add popup menu support for chat header and chat list Nov 9, 2018
@vitvly vitvly changed the title [WIP] Add popup menu support for chat header and chat list Add popup menu support for chat header and chat list Nov 9, 2018
Copy link
Contributor

@rcullito rcullito left a comment

Choose a reason for hiding this comment

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

Nice PR! Included a couple questions inline.

(def popup-menu-options (adapt-class (.-MenuOptions js-dependencies/popup-menu)))
(def popup-menu-option (adapt-class (.-MenuOption js-dependencies/popup-menu)))
(def popup-menu-trigger (adapt-class (.-MenuTrigger js-dependencies/popup-menu)))
(def popup-menu-renderers (js->clj (.-renderers js-dependencies/popup-menu) :keywordize-keys true))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm lacking context here clearly, but what is the guideline for converting to clj data structure in the last form versus adapt-class in the others? Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renderers is not a class, but a folder inside react-native-popup-menu. In this case (.-renderers js-dependencies/popup-menu) returns a js object with string keys (map of class names to objects) So we convert it to a Clojure-style keyword map.

Copy link
Contributor

Choose a reason for hiding this comment

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

great, thanks for clarifying.

{:keys [group-chat public? public-key] :as chat}]]
[popup-menu/wrap-with-menu
[chat-list-item-inner-view (assoc chat :chat-id chat-id)]
(remove nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

which set of chats are expected to not be removed here? just private, or are we up to additional categories? 👁️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove affects menu items for this particular chat item, not the chat list. So for public/group chats we cannot execute View Profile, for example. Will write the doc for wrap-with-menu, sorry for confusion.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, no that makes total sense. my own confusion for missing at what level the remove was acting upon. thanks!

@churik
Copy link
Member

churik commented Nov 13, 2018

@siphiuel can it be tested? If yes, can you please rebase it and move to TO TEST column? Thanks!

@vitvly
Copy link
Contributor Author

vitvly commented Nov 13, 2018

Rebased and moved to TO TEST.

@status-comment-bot
Copy link

✅ CI BUILD SUCCESSFUL

Jenkins job: #8

Mobile
Desktop

@status-comment-bot
Copy link

#9 CI BUILD SUCCESSFUL in 25 min and counting (65a7813)

Android(e2e) iOS MacOS AppImage Windows

@churik
Copy link
Member

churik commented Nov 16, 2018

@SlizkovaGanna
any blockers here so far? do you need any help?

@SlizkovaGanna
Copy link

SlizkovaGanna commented Nov 16, 2018

Tested on MacOS and Linux (emulated)

Issues found:

1. The 'Unknown' user it triggered when selecting 'View profile' on right-click from the chat list, reproduces for all contacts every time
Steps to reproduce:

  1. Login to Status and go to your Home screen with at least 1-1 chat with a contact
  2. Right-click on that chat and select 'View profile' from the menu
    Expected result: User's profile is shown with 'Add to contacts' being inactive
    Current result: 'Unknown' profile is displayed, not from your contacts.
    Note: If you add that 'Unknown' to contacts - you will see two people in contact list - the initial contact you had 1-1 chat with at the start, and the 'Unknown'

image

  1. Click 'Send message' - a new 1-1 chat with the 'Unknown' will appear
    Expected result: User is redirected to the already existing 1-1 chat
    Current result: A new 1-1 chat with the 'Unknown' will appear

image

  1. Start typing a message
    Expected result: Message input as usual
    Current result: With every symbol, 'Unknown''s icon changes to a different default one in the chat list on the left

image

image

2. When triggering the right-click menu in the chat list, the menu contains options for the chat that the mouse pointer is at, but performs actions for the chat that is selected at the moment
In some cases, it leads to even crashing the app:

image

Steps to reproduce:

  1. Create a group chat, 1-1 chat and join a public chat

image

  1. Select the 1-1 chat, but right-click the group chat area and select 'Group info'
    Expected result: Not sure what the expected result it - a menu for the highlighted chat (if so - there should be no 'group info' option) or the chat that the mouse pointer is at (if so - group info of the group chat should be displayed); either way menus should not mix up like they do
    Current result: The group info of 1-1 chat is displayed, as if it was a group chat:

image

Same for a public chat:

image

Also tested:

  • view profile/group info (1-1, group), both menus
  • deleting history (1-1, group, public) and checking it doesn't re-appear, both menus
  • deleting chats (1-1, group, public) and checking it doesn't re-appear, both menus
  • messaging (regular, different symbols, offline, fetching messages)

@status-comment-bot
Copy link

#12 CI BUILD SUCCESSFUL in 21 min and counting (861e5ab)

Android(e2e) iOS MacOS AppImage Windows

@status-comment-bot
Copy link

#13 CI BUILD SUCCESSFUL in 20 min and counting (21f1388)

Android(e2e) iOS MacOS AppImage Windows

@status-comment-bot
Copy link

#14 CI BUILD SUCCESSFUL in 25 min and counting (4bd6a28)

Android(e2e) iOS MacOS AppImage Windows

@SlizkovaGanna SlizkovaGanna removed their assignment Nov 29, 2018
@SlizkovaGanna SlizkovaGanna self-assigned this Nov 30, 2018
@asemiankevich
Copy link
Contributor

asemiankevich commented Nov 30, 2018

@rcullito @Maxris builds are failing in Jenkins, i restarted it not sure about success, please take a look https://ci.status.im/job/status-react/job/pull%20requests/view/change-requests/job/PR-6671/

@asemiankevich
Copy link
Contributor

@siphiuel please rebase :)

@vitvly vitvly force-pushed the feature/add-popup-menu branch 2 times, most recently from 8e8c91d to faa733d Compare November 30, 2018 16:48
@status-comment-bot
Copy link

#22 CI BUILD SUCCESSFUL in 35 min and counting (faa733d5de35e5c5e20008c9e932ed182a5c8f06)

Android(e2e) iOS MacOS AppImage Windows

@statustestbot
Copy link

97% of end-end tests have passed

Total executed tests: 59
Failed tests: 2
Passed tests: 57

Failed tests (2)

Click to expand
1. test_user_can_interact_with_public_chat

Device 1: Scrolling down to HistoryTimeMarker
Device 1: Looking for an element by text: 'Yesterday'

'Yesterday' chat marker is not shown

Device sessions

2. test_network_mismatch_for_send_request_commands

Device 1: Tap on GotItButton
Device 1: Looking for a message by text: '0.01130203128'

Device 1: 'ChatElementByText' is not found on the screen

Device sessions

Passed tests (57)

Click to expand
1. test_create_account
Device sessions

2. test_user_can_switch_network
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_request_and_receive_tokens_in_1_1_chat
Device sessions

7. test_delete_cut_and_paste_messages
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_offline_login
Device sessions

10. test_pass_phrase_validation
Device sessions

11. test_public_chat_messaging
Device sessions

12. test_password_in_logcat_sign_in
Device sessions

13. test_set_profile_picture
Device sessions

14. test_text_message_1_1_chat
Device sessions

15. test_add_to_contacts
Device sessions

16. test_unread_messages_counter_1_1_chat
Device sessions

17. test_logcat_send_transaction_from_daap
Device sessions

18. test_onboarding_screen_when_requesting_tokens_for_new_account
Device sessions

19. test_logcat_send_transaction_from_wallet
Device sessions

20. test_send_token_with_7_decimals
Device sessions

21. test_modify_transaction_fee_values
Device sessions

22. test_token_with_more_than_allowed_decimals
Device sessions

23. test_send_eth_from_wallet_to_address
Device sessions

24. test_send_transaction_details_in_1_1_chat
Device sessions

25. test_manage_assets
Device sessions

26. test_wallet_set_up
Device sessions

27. test_logcat_send_transaction_in_1_1_chat
Device sessions

28. test_request_and_receive_eth_in_1_1_chat
Device sessions

29. test_swipe_to_delete_public_chat
Device sessions

30. test_passphrase_whitespaces_ignored_while_recovering_access
Device sessions

31. test_send_emoji
Device sessions

32. test_add_contact_by_pasting_public_key
Device sessions

33. test_logcat_recovering_account
Device sessions

34. test_messaging_in_different_networks
Device sessions

35. test_send_tokens_in_1_1_chat
Device sessions

36. test_logcat_sign_message_from_daap
Device sessions

37. test_swipe_to_delete_1_1_chat
Device sessions

38. test_switch_users_and_add_new_account
Device sessions

39. test_send_stt_from_wallet
Device sessions

40. test_send_eth_in_1_1_chat
Device sessions

41. test_login_with_new_account
Device sessions

42. test_send_eth_from_wallet_to_contact
Device sessions

43. test_add_contact_from_public_chat
Device sessions

44. test_send_request_not_enabled_tokens
Device sessions

45. test_send_message_to_newly_added_contact
Device sessions

46. test_password_in_logcat_creating_account
Device sessions

47. test_backup_recovery_phrase
Device sessions

48. test_offline_status
Device sessions

49. test_open_google_com_via_open_dapp
Device sessions

50. test_unread_messages_counter_public_chat
Device sessions

51. test_sign_message_from_daap
Device sessions

52. test_user_can_remove_profile_picture
Device sessions

53. test_share_contact_code_and_wallet_address
Device sessions

54. test_request_eth_in_wallet
Device sessions

55. test_refresh_button_browsing_app_webview
Device sessions

56. test_backup_recovery_phrase_warning_from_wallet
Device sessions

57. test_recover_account
Device sessions

@SlizkovaGanna
Copy link

Tested on MacOS and Linux (emulated)

There were no specific PR-related issues found, all the general ones found will be reported separately.
The only things I can possible name is a different design of the pop-up window on Linux

Linux:
image

MaxOS:
image

@siphiuel if its possible to fix, I'll create a separate low priority issue for it.

Tested:

  • The 'Unknown' user it triggered when selecting 'View profile' on right-click from the chat list, reproduces for all contacts every time - fixed

@Serhy Also checked scenarios for 'Unknown' issue from #6210
scenario #1 - waiting for 24 h to pass
scenario #2 - does not reproduce on this build
Would need to recheck the general issue after this PR is merged.

  • When triggering the right-click menu in the chat list, the menu contains options for the chat that the mouse pointer is at, but performs actions for the chat that is selected at the moment - fixed

  • view profile/group info (1-1, group), both menus

  • deleting history (1-1, group, public) and checking it doesn't re-appear, both menus

  • deleting chats (1-1, group, public) and checking it doesn't re-appear, both menus

  • messaging (regular, different symbols, offline, fetching messages)

  • pairing

Automated tests fails are expected.
Tested on MacOs and Linux (emulated)

Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
@vitvly vitvly merged commit dc4841f into develop Dec 1, 2018
@status-comment-bot
Copy link

#23 CI BUILD SUCCESSFUL in 21 min and counting (e7ff692aaaa1ff344edbefcac5090bdfa2074110)

Android(e2e) iOS MacOS AppImage Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants