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

[Profile] Other profile screen UI #8776

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Aug 19, 2019

fixes: #8071

after #8069 as been merged I integrate my part with the work from the great @bitsikka

regarding large_toolbar:

  • I "componentized" more large_toolbar, decoupling styles too.
  • i changed large_toolbarimplementation on flat-list's on-scroll events
  • shadow animations are now interpolated with scroll
  • minimized toolbar fade-in\fade-out is still triggered on a certain point (not interpolated. this can be changed if needed)
  • animation variables are now local to the views (if multiple screens uses the component, variables remain separated and state remains consistent while navigating)

then i implemented the "other profile". It is still not supporting multiple details (main chat account is listed) but the basis for listing multiple accounts\wallets is there.

status: ready

@tbenr tbenr requested a review from a team as a code owner August 19, 2019 11:40
@auto-assign auto-assign bot removed the request for review from a team August 19, 2019 11:40
@ghost
Copy link

ghost commented Aug 19, 2019

Pull Request Checklist

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

@tbenr tbenr changed the title [Profile] Other profile screen UI #8071 [Profile] Other profile screen UI Aug 19, 2019
@status-im-auto
Copy link
Member

status-im-auto commented Aug 19, 2019

Jenkins Builds

Click to see older builds (83)
Commit #️⃣ Finished (UTC) Duration Platform Result
677d0cd #1 2019-08-19 11:43:37 ~3 min ios 📄 log
677d0cd #1 2019-08-19 11:49:14 ~9 min android-e2e 📄 log
677d0cd #1 2019-08-19 11:49:25 ~9 min android 📄 log
08aaa52 #2 2019-08-20 21:58:56 ~30 sec android 📄 log
08aaa52 #2 2019-08-20 21:58:57 ~28 sec ios 📄 log
08aaa52 #2 2019-08-20 22:07:58 ~9 min android-e2e 📄 log
a354322 #3 2019-08-20 22:57:14 ~2 min ios 📄 log
a354322 #3 2019-08-20 23:03:15 ~9 min android-e2e 📄 log
a354322 #3 2019-08-20 23:03:19 ~9 min android 📄 log
98d1d35 #4 2019-08-21 17:15:37 ~4 min ios 📄 log
98d1d35 #4 2019-08-21 17:16:49 ~5 min android-e2e 📄 log
58b1e5d #6 2019-08-21 17:24:44 ~2 min ios 📄 log
58b1e5d #6 2019-08-21 17:25:43 ~3 min android-e2e 📄 log
58b1e5d #6 2019-08-21 17:29:09 ~7 min android 📄 log
2076fc1 #7 2019-08-21 17:57:05 ~3 min ios 📄 log
2076fc1 #7 2019-08-21 17:57:46 ~3 min android-e2e 📄 log
2076fc1 #7 2019-08-21 17:58:02 ~4 min android 📄 log
36ff826 #8 2019-08-22 17:34:28 ~3 min ios 📄 log
36ff826 #8 2019-08-22 17:35:13 ~4 min android-e2e 📄 log
36ff826 #8 2019-08-22 17:38:37 ~7 min android 📄 log
43db7dd #9 2019-08-22 18:24:36 ~2 min ios 📄 log
43db7dd #9 2019-08-22 18:24:49 ~3 min android-e2e 📄 log
43db7dd #9 2019-08-22 18:24:54 ~3 min android 📄 log
b16767e #10 2019-08-23 07:32:39 ~2 min ios 📄 log
b16767e #10 2019-08-23 07:33:30 ~3 min android-e2e 📄 log
b16767e #10 2019-08-23 07:33:30 ~3 min android 📄 log
04337f5 #11 2019-08-25 14:53:41 ~3 min ios 📄 log
04337f5 #11 2019-08-25 15:01:04 ~10 min android-e2e 📄 log
04337f5 #11 2019-08-25 15:01:04 ~10 min android 📄 log
✔️ 057cc95 #12 2019-08-25 16:43:40 ~11 min ios 📦 ipa
✔️ 057cc95 #12 2019-08-25 16:48:25 ~16 min android 📦 apk
✔️ 057cc95 #12 2019-08-25 16:48:40 ~16 min android-e2e 📦 apk
79b8b17 #13 2019-08-26 17:02:02 ~25 sec android 📄 log
79b8b17 #13 2019-08-26 17:02:03 ~23 sec ios 📄 log
✔️ 17612b4 #14 2019-08-26 17:23:15 ~11 min ios 📦 ipa
✔️ 17612b4 #14 2019-08-26 17:29:31 ~17 min android-e2e 📦 apk
✔️ 17612b4 #14 2019-08-26 17:30:48 ~18 min android 📦 apk
c5d567f #15 2019-09-02 19:57:03 ~13 min ios 📄 log
c5d567f #15 2019-09-02 20:01:02 ~17 min android 📄 log
c5d567f #15 2019-09-02 20:01:14 ~17 min android-e2e 📄 log
✔️ e153533 #16 2019-09-03 07:40:00 ~11 min ios 📦 ipa
✔️ e153533 #16 2019-09-03 07:42:15 ~13 min android 📦 apk
✔️ e153533 #16 2019-09-03 07:42:27 ~13 min android-e2e 📦 apk
d0c8de1 #17 2019-09-04 21:29:24 ~7 min ios 📄 log
✔️ d0c8de1 #17 2019-09-04 21:37:39 ~15 min android-e2e 📦 apk
✔️ d0c8de1 #17 2019-09-04 21:41:40 ~19 min android 📦 apk
833a555 #18 2019-09-05 12:08:04 ~9 min ios 📄 log
✔️ 833a555 #18 2019-09-05 12:12:11 ~14 min android 📦 apk
c8a2b2c #19 2019-09-05 13:24:06 ~7 min ios 📄 log
✔️ c8a2b2c #19 2019-09-05 13:33:30 ~17 min android-e2e 📦 apk
✔️ c8a2b2c #19 2019-09-05 13:36:33 ~20 min android 📦 apk
5613a3f #20 2019-09-05 15:26:49 ~9 min ios 📄 log
✔️ 5613a3f #20 2019-09-05 15:29:51 ~12 min android 📦 apk
✔️ 5613a3f #20 2019-09-05 15:31:44 ~14 min android-e2e 📦 apk
✔️ 5613a3f #21 2019-09-05 18:20:57 ~18 min ios 📦 ipa
✔️ 0539265 #22 2019-09-07 11:46:17 ~11 min ios 📦 ipa
✔️ 0539265 #21 2019-09-07 11:55:09 ~19 min android 📦 apk
✔️ 0539265 #21 2019-09-07 11:55:11 ~20 min android-e2e 📦 apk
d57a08b #23 2019-09-11 18:05:08 ~31 sec ios 📄 log
✔️ d57a08b #22 2019-09-11 18:26:37 ~22 min android 📦 apk
✔️ d57a08b #22 2019-09-11 18:26:47 ~22 min android-e2e 📦 apk
✔️ d57a08b #24 2019-09-12 12:10:55 ~8 min ios 📦 ipa
✔️ e56b538 #25 2019-09-12 15:59:19 ~8 min ios 📦 ipa
✔️ e56b538 #23 2019-09-12 16:07:08 ~16 min android 📦 apk
✔️ e56b538 #23 2019-09-12 16:07:11 ~16 min android-e2e 📦 apk
✔️ 953a244 #26 2019-09-12 22:13:37 ~8 min ios 📦 ipa
✔️ 953a244 #24 2019-09-12 22:20:35 ~15 min android 📦 apk
✔️ 953a244 #24 2019-09-12 22:21:51 ~16 min android-e2e 📦 apk
befa420 #27 2019-09-13 19:29:36 ~9 min ios 📄 log
befa420 #25 2019-09-13 19:35:43 ~15 min android-e2e 📄 log
befa420 #25 2019-09-13 19:35:53 ~15 min android 📄 log
✔️ 660c9bd #1 2019-09-15 22:09:42 ~8 min ios 📦 ipa
✔️ 660c9bd #1 2019-09-15 22:15:28 ~14 min android 📦 apk
✔️ 660c9bd #1 2019-09-15 22:15:33 ~14 min android-e2e 📦 apk
660c9bd #1 2019-09-17 06:54:59 ~4 min macos 📄 log
660c9bd #1 2019-09-17 06:56:46 ~6 min windows 📄 log
660c9bd #1 2019-09-17 06:57:34 ~6 min linux 📄 log
ae60247 #2 2019-09-17 11:18:34 ~2 min macos 📄 log
ae60247 #2 2019-09-17 11:18:46 ~3 min linux 📄 log
ae60247 #2 2019-09-17 11:18:59 ~3 min windows 📄 log
✔️ ae60247 #2 2019-09-17 11:24:14 ~8 min ios 📦 ipa
✔️ ae60247 #2 2019-09-17 11:30:12 ~14 min android-e2e 📦 apk
✔️ ae60247 #2 2019-09-17 11:30:25 ~14 min android 📦 apk
Commit #️⃣ Finished (UTC) Duration Platform Result
e4660e8 #3 2019-09-18 18:13:27 ~3 min macos 📄 log
e4660e8 #3 2019-09-18 18:13:37 ~3 min linux 📄 log
e4660e8 #3 2019-09-18 18:13:46 ~3 min windows 📄 log
✔️ e4660e8 #3 2019-09-18 18:18:58 ~8 min ios 📦 ipa
✔️ e4660e8 #3 2019-09-18 18:26:23 ~16 min android 📦 apk
✔️ e4660e8 #3 2019-09-18 18:26:30 ~16 min android-e2e 📦 apk
✔️ dc2625f #4 2019-09-19 17:22:50 ~8 min ios 📦 ipa
✔️ dc2625f #4 2019-09-19 17:25:48 ~11 min macos 📦 dmg
✔️ dc2625f #4 2019-09-19 17:28:08 ~13 min linux 📦 App
✔️ dc2625f #4 2019-09-19 17:29:21 ~15 min android-e2e 📦 apk
✔️ dc2625f #4 2019-09-19 17:29:22 ~15 min android 📦 apk
✔️ dc2625f #4 2019-09-19 17:29:35 ~15 min windows 📦 exe

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 677d0cd to 08aaa52 Compare August 20, 2019 21:58
@tbenr tbenr requested a review from a team August 20, 2019 21:58
@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 08aaa52 to a354322 Compare August 20, 2019 22:53
@flexsurfer
Copy link
Member

@tbenr is this still wip?

@tbenr
Copy link
Contributor Author

tbenr commented Aug 21, 2019

@flexsurfer yes, need to remove unused files and a couple of other things.. this evening i should finish.

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch 3 times, most recently from 9accc93 to 58b1e5d Compare August 21, 2019 17:21
@tbenr
Copy link
Contributor Author

tbenr commented Aug 21, 2019

@flexsurfer I think we can start the review.

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 58b1e5d to 2076fc1 Compare August 21, 2019 17:53
[{:keys [db] :as cofx} public-key]
(fx/merge cofx
{:db (update db :contacts/contacts dissoc public-key)
:data-store/tx [(contacts-store/delete-contact-tx public-key)]}))
Copy link
Member

Choose a reason for hiding this comment

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

i believe we don't use :data-store/tx for contacts anymore @cammellos could you assist, please?

Copy link
Contributor

Choose a reason for hiding this comment

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

for sure we don't, the question is do we have a "shhext_deleteContact" rpc method to replace it? @cammellos

if we don't I'd say just add a TODO here that says the contact is not actually remove, because this is a UI PR and there is no point blocking it waiting for a core feature. Remove that :data-store/tx it the delete-contact-tx function won't exist once you rebase anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i added a TODO

Copy link
Contributor

Choose a reason for hiding this comment

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

should we remove the contact completely (needs a new endpoint in status-go), or is it enough to remove the contacts/added tag (does not need a new endpoint)?

If we delete it completely, it will come back (maybe not in the list if we are filtering by contact/added tag), next contact update, so not sure how useful it is, but I don't have much context on this task.

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose we just want to remove contacts/added, it removes the user from the contact list right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about that, I would guess so as it should only show contacts that we added.

Essentially we can just remove the contact/added tag and call save-contact in status-im.data-store.contacts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cammellos @yenda take a look to the latest push

src/status_im/ui/screens/profile/contact/views.cljs Outdated Show resolved Hide resolved

(defn- contact->details
"prepare a sequence of datails from a given contact"
[contact]
Copy link
Member

Choose a reason for hiding this comment

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

could you elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@flexsurfer the function should "prepare" a list of details (accounts\wallet) from the current contact. Since i don't know how will actually wallet\accounts be stored in db for a given contact, I prepared a function for the purpose.
Currently it just create an array with current account.

Copy link
Contributor

Choose a reason for hiding this comment

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

contact will always be a map, wallet and accounts will be part of it. I'd just remove this fn a use contact directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yenda I missed this comment, later this afternoon i'll remove it.

@flexsurfer flexsurfer requested a review from cammellos August 22, 2019 07:20
@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 2076fc1 to 36ff826 Compare August 22, 2019 17:30
@tbenr
Copy link
Contributor Author

tbenr commented Aug 22, 2019

@flexsurfer i added :share accessory to list-item component. But I have an issue on list-item which I'm struggling to fix:

wrong (long name):
image

ok (short name):
image

the accessory goes off-screen. Any hint?

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 36ff826 to 43db7dd Compare August 22, 2019 18:21
@tbenr
Copy link
Contributor Author

tbenr commented Aug 22, 2019

I also implemented sheet for "block this user"
image

@bitsikka
Copy link
Contributor

bitsikka commented Aug 23, 2019

@flexsurfer i added :share accessory to list-item component. But I have an issue on list-item which I'm struggling to fix:

wrong (long name):
image

ok (short name):
image

the accessory goes off-screen. Any hint?

@tbenr let me chime in here.

As a critical part of #8070 I am adjusting the list-item namespace as well, and this is related.

  • In the structural improvements I have made,

    wrong (long name):

    does not happen

  • Also, the :share accessory could be categorized as interactive accessory like check-box, radio-button or toggle-switch for which the :accessories vector already accepts component as an accessory. So, instead of adding :share accessory in the list-item namespace, you could pass the share button as a component in :accessories vector. cc @flexsurfer @errorists

I am almost done with the PR for #8070 and will be pushing it soon

@jakubgs
Copy link
Member

jakubgs commented Sep 15, 2019

Sorry for that, this time was about permissions due to branch not being in the repo.
Should be building now.

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from 660c9bd to ae60247 Compare September 17, 2019 11:15
@tbenr
Copy link
Contributor Author

tbenr commented Sep 17, 2019

@flexsurfer @churik @Serhy can we try to test again?

@rachelhamlin
Copy link
Contributor

@tbenr apologies for any delay - we're on our team offsite in Istanbul this week so will be responding a bit more slowly than usual. Would love to get this one finalized so we can pay you! Will see if we can prioritize it.

@bitsikka
Copy link
Contributor

Merging this will also help me with PRs I'm working on 🙌 :)
Thanks! @tbenr and everyone

@churik
Copy link
Member

churik commented Sep 18, 2019

@tbenr sorry for delay, we all on offsite in Istanbul.
I'll come back it today or tomorrow.

@statustestbot
Copy link

91% of end-end tests have passed

Total executed tests: 46
Failed tests: 4
Passed tests: 42

Failed tests (4)

Click to expand
1. test_block_user_from_public_chat

Device 1: Looking for message with text 'Before block from 2'
Device 1: Tap on MemberPhoto

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

Device sessions

2. test_long_press_to_delete_public_chat

Device 1: Looking for a message by text: 'test message'
Device 1: Wait for ChatElementByText

Chat history is shown

Device sessions

3. test_add_contact_from_public_chat

Device 1: Tap on StartNewChatButton
Device 1: Looking for an element by text: 'Splendid Corny Pangolin'

'Add to contacts' is not changed to 'In contacts'

Device sessions

4. test_send_two_transactions_one_after_another_in_dapp

Device 1: Wait for EnterPasswordInput
Device 1: Wait for EnterPasswordInput

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

Device sessions

Passed tests (42)

Click to expand
1. test_filters_from_daap
Device sessions

2. test_copy_and_paste_messages
Device sessions

3. test_send_transaction_from_daap
Device sessions

4. test_deploy_contract_from_daap
Device sessions

5. test_open_transaction_on_etherscan
Device sessions

6. test_public_chat_messaging
Device sessions

7. test_long_press_to_delete_1_1_chat
Device sessions

8. test_password_in_logcat_sign_in
Device sessions

9. test_text_message_1_1_chat
Device sessions

10. test_add_to_contacts
Device sessions

11. test_sign_typed_message
Device sessions

12. test_unread_messages_counter_1_1_chat
Device sessions

13. test_ens_in_public_chat
Device sessions

14. test_logcat_send_transaction_from_daap
Device sessions

15. test_send_message_in_group_chat
Device sessions

16. test_logcat_send_transaction_from_wallet
Device sessions

17. test_send_token_with_7_decimals
Device sessions

18. test_offline_messaging_1_1_chat
Device sessions

19. test_modify_transaction_fee_values
Device sessions

20. test_send_eth_from_wallet_to_address
Device sessions

21. test_add_account_to_multiaccount_instance
Device sessions

22. test_manage_assets
Device sessions

23. test_send_emoji
Device sessions

24. test_search_chat_on_home
Device sessions

25. test_logcat_recovering_account
Device sessions

26. test_can_add_existing_ens
Device sessions

27. test_messaging_in_different_networks
Device sessions

28. test_logcat_sign_message_from_daap
Device sessions

29. test_switch_users_and_add_new_account
Device sessions

30. test_send_stt_from_wallet
Device sessions

31. test_login_with_new_account
Device sessions

32. test_start_chat_with_ens
Device sessions

33. test_password_in_logcat_creating_account
Device sessions

34. test_backup_recovery_phrase
Device sessions

35. test_offline_status
Device sessions

36. test_open_google_com_via_open_dapp
Device sessions

37. test_unread_messages_counter_public_chat
Device sessions

38. test_sign_message_from_daap
Device sessions

39. test_user_can_remove_profile_picture
Device sessions

40. test_share_contact_code_and_wallet_address
Device sessions

41. test_refresh_button_browsing_app_webview
Device sessions

42. test_backup_recovery_phrase_warning_from_wallet
Device sessions

@churik
Copy link
Member

churik commented Sep 18, 2019

@tbenr two small issues:

  1. for label "Unblock this user" we have accesibility-id "block-contact" and vice versa, so they are messed up.
  2. for "remove from contacts" translation is missing
    image

Thank you for hard work!

@tbenr
Copy link
Contributor Author

tbenr commented Sep 18, 2019

@churik damn :) i'll fix it when back home... thanks for patient

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from ae60247 to e4660e8 Compare September 18, 2019 18:09
@tbenr
Copy link
Contributor Author

tbenr commented Sep 18, 2019

@churik MAYBE HOPEFULLY this is the last time :)

@statustestbot
Copy link

50% of end-end tests have passed

Total executed tests: 2
Failed tests: 1
Passed tests: 1

Failed tests (1)

Click to expand
1. test_block_user_from_public_chat

Device 1: Tap on MemberPhoto
Device 1: Tap on ProfileBlockContactButton

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

Device sessions

Passed tests (1)

Click to expand
1. test_add_contact_from_public_chat
Device sessions

@status-im status-im deleted a comment from statustestbot Sep 19, 2019
@churik
Copy link
Member

churik commented Sep 19, 2019

@tbenr :)
we lost dialog about the confirmation of "Block contact".
This is last one from my side.
#8776 (comment) - bottom sheet is required for blocking contact. I'm really sorry for confusion - but afaik @flexsurfer meant only for add/remove contact - so bottom sheet with explanation should definitely be shown when you blocked contact.

And I believe we already got confirmation from @errorists that he is OK with new view.
So only get back message when blocking users.
And specific thank you for accessibility-ids, it helped a lot!

@tbenr
Copy link
Contributor Author

tbenr commented Sep 19, 2019

@churik ahh ok I reactivate it once back home. No problems:)

@tbenr tbenr force-pushed the Other_profile_screen_UI_#8071 branch from e4660e8 to dc2625f Compare September 19, 2019 17:13
@tbenr
Copy link
Contributor Author

tbenr commented Sep 19, 2019

@churik reenabled sheet on block, rebased too.

@churik
Copy link
Member

churik commented Sep 20, 2019

@tbenr many thanks for your patience!

Signed-off-by: yenda <[email protected]>
@yenda yenda force-pushed the Other_profile_screen_UI_#8071 branch from dc2625f to f707601 Compare September 20, 2019 15:54
@yenda yenda merged commit f707601 into status-im:develop Sep 20, 2019
@tbenr tbenr deleted the Other_profile_screen_UI_#8071 branch September 20, 2019 15:58
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.

[Profile] Other profile screen UI