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

quo2 documentation drawer component #15674

Merged
merged 1 commit into from
May 4, 2023

Conversation

ajayesivan
Copy link
Contributor

@ajayesivan ajayesivan commented Apr 18, 2023

fixes #15016

To test the component: quo2 preview -> drawers -> documentation drawers

Todo

  • Fix scroll not working on Android.
  • Shell theme

Screencast iOS

documentation-drawer-ios-zip.mov

Screencast Android

documentation-drawer-android-zip.mov

Areas that may be impacted

This PR introduces a new blur background option - for the bottom sheets. Currently, we are only using this feature in the documentation drawer component(only added in quo2 preview). However, it would be wise to test other places where bottom sheets are used in our UI to ensure that this change does not impact the existing design and functionality.

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Apr 18, 2023

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
7cd64e5 #1 2023-04-18 08:28:42 ~3 min tests 📄log
✔️ 7cd64e5 #1 2023-04-18 08:31:51 ~6 min android-e2e 🤖apk 📲
✔️ 7cd64e5 #1 2023-04-18 08:32:28 ~7 min android 🤖apk 📲
✔️ 7cd64e5 #1 2023-04-18 08:33:14 ~8 min ios 📱ipa 📲
25439d2 #2 2023-04-19 07:09:16 ~3 min tests 📄log
✔️ 25439d2 #2 2023-04-19 07:11:42 ~5 min android-e2e 🤖apk 📲
✔️ 25439d2 #2 2023-04-19 07:11:48 ~5 min android 🤖apk 📲
✔️ 25439d2 #2 2023-04-19 07:12:27 ~6 min ios 📱ipa 📲
✔️ fb47b90 #5 2023-04-19 07:45:44 ~6 min android 🤖apk 📲
✔️ fb47b90 #5 2023-04-19 07:45:56 ~6 min android-e2e 🤖apk 📲
✔️ fb47b90 #5 2023-04-19 07:46:11 ~6 min tests 📄log
✔️ fb47b90 #5 2023-04-19 07:46:16 ~6 min ios 📱ipa 📲
552b248 #7 2023-04-19 10:09:57 ~3 min tests 📄log
✔️ 552b248 #7 2023-04-19 10:13:45 ~6 min android 🤖apk 📲
✔️ 552b248 #7 2023-04-19 10:13:47 ~6 min android-e2e 🤖apk 📲
✔️ 552b248 #7 2023-04-19 10:15:12 ~8 min ios 📱ipa 📲
✔️ b6bf1c0 #8 2023-04-19 10:49:06 ~5 min android-e2e 🤖apk 📲
✔️ b6bf1c0 #8 2023-04-19 10:50:00 ~6 min android 🤖apk 📲
✔️ b6bf1c0 #8 2023-04-19 10:50:08 ~6 min tests 📄log
✔️ b6bf1c0 #8 2023-04-19 10:50:34 ~7 min ios 📱ipa 📲
✔️ 65de6f0 #9 2023-04-20 13:47:29 ~6 min android 🤖apk 📲
✔️ 65de6f0 #9 2023-04-20 13:48:21 ~7 min android-e2e 🤖apk 📲
✔️ 65de6f0 #9 2023-04-20 13:48:23 ~6 min tests 📄log
✔️ 65de6f0 #9 2023-04-20 14:15:43 ~34 min ios 📱ipa 📲
✔️ 92f74fc #10 2023-04-27 12:19:48 ~5 min android 🤖apk 📲
✔️ 92f74fc #10 2023-04-27 12:19:55 ~6 min android-e2e 🤖apk 📲
✔️ 92f74fc #10 2023-04-27 12:21:31 ~7 min tests 📄log
✔️ 92f74fc #10 2023-04-27 12:23:29 ~9 min ios 📱ipa 📲
✔️ 87e7776 #11 2023-05-01 17:57:21 ~5 min tests 📄log
✔️ 87e7776 #11 2023-05-01 17:57:57 ~6 min android 🤖apk 📲
✔️ 87e7776 #11 2023-05-01 17:57:59 ~6 min android-e2e 🤖apk 📲
✔️ 87e7776 #11 2023-05-01 17:58:03 ~6 min ios 📱ipa 📲
✔️ 94a3f7d #12 2023-05-03 15:07:10 ~5 min android-e2e 🤖apk 📲
✔️ 94a3f7d #12 2023-05-03 15:07:14 ~5 min tests 📄log
✔️ 94a3f7d #12 2023-05-03 15:07:16 ~5 min android 🤖apk 📲
✔️ 94a3f7d #12 2023-05-03 15:08:00 ~6 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3849551 #13 2023-05-03 15:28:09 ~6 min ios 📱ipa 📲
✔️ 3849551 #13 2023-05-03 15:28:15 ~6 min android-e2e 🤖apk 📲
✔️ 3849551 #13 2023-05-03 15:28:20 ~6 min android 🤖apk 📲
✔️ 3849551 #13 2023-05-03 15:28:28 ~6 min tests 📄log
✔️ 32b7101 #14 2023-05-04 12:01:57 ~5 min android 🤖apk 📲
✔️ 32b7101 #14 2023-05-04 12:02:36 ~6 min ios 📱ipa 📲
✔️ 32b7101 #14 2023-05-04 12:03:13 ~6 min android-e2e 🤖apk 📲
✔️ 32b7101 #14 2023-05-04 12:03:16 ~7 min tests 📄log

@@ -0,0 +1,27 @@
(ns quo2.components.drawers.documentation-drawers.component-spec
(:require [quo2.components.drawers.documentation-drawers.view :as quo]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be more readable if you change to :as documentation-drawer?

(defn view
"Options
- `title` Title text
- `cta?` Show CTA button
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need cta? prop, you can just do when on-press-cta ... below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cta? is used to show/hide the button.

Copy link
Contributor

@J-Son89 J-Son89 Apr 18, 2023

Choose a reason for hiding this comment

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

yes but do we not only need the button when there is an on-press action 🤔
Maybe I have it wrong :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can do that. In the component design it's a 'Read more' button and when clicked it will show the full content and hide the button. So I thought it's better to add a separate prop to control the visibility of the button. But we can achieve it using on-press, should I remove cta??

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yea, you're right. Let's leave it as is so 👌

"Options
- `title` Title text
- `cta?` Show CTA button
- `cta-label` CTA button label
Copy link
Contributor

Choose a reason for hiding this comment

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

consider something simple like "button" in place of cta. i.e

on-press-button
button-icon

@@ -0,0 +1,10 @@
(ns quo2.components.drawers.documentation-drawers.style)

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, this is lacking the color variations? There should be light, dark and shell themes. 🤔 or you'll do that in a follow up?

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 will add it.

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'm using text, button and bottom-sheet components so dark & light variations will be handled by those components. For shell variant I have updated the bottom-sheet with a blur? option. Please check the the bottom-sheet/view file. Design only has shell variant in the dark theme so I think it will only be used in dark theme. Should we confirm this with the design team?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that makes sense about the components.
shell theme is another variation of dark theme, let's confirm with them just to make sure it's all setup as expected 👍 .

@@ -65,7 +65,7 @@
{:opacity bg-opacity}
{:flex 1 :background-color colors/neutral-100-opa-70})}]]
;; sheet
[gesture/gesture-detector {:gesture sheet-gesture}
[gesture/gesture-detector {:gesture sheet-gesture} ;; FIXME: This gesture handler is interfering with scrollview on android.
Copy link
Contributor

@J-Son89 J-Son89 Apr 18, 2023

Choose a reason for hiding this comment

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

we use TODO and it should include a github link to that issue.
Unless this is just for your pr while it's in draft ofc :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just for me to fix before moving the PR to ready. I will use TODO for adding future tasks 👍

@ajayesivan ajayesivan force-pushed the 15016-quo2-documentation-drawer-component branch 3 times, most recently from 96bd656 to fb47b90 Compare April 19, 2023 07:39
@ajayesivan ajayesivan marked this pull request as ready for review April 19, 2023 10:13
@@ -12,7 +12,7 @@
:margin-vertical 8})

(defn sheet
[{:keys [top bottom]} window-height override-theme]
[{:keys [top bottom]} window-height override-theme blur?]
Copy link
Contributor

Choose a reason for hiding this comment

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

you will probably need QA to review this pr since this adjusts the bottom sheet in app 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@J-Son89 Do I just need to add the 'request-manual-qa' label for this, or is there anything else that needs to be done?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, once you have a dev approval (which you now do) then you can add that label . Also good to give a comment or update description of what area should be tested

Copy link
Contributor

@J-Son89 J-Son89 left a comment

Choose a reason for hiding this comment

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

nice work 🎉

@ajayesivan ajayesivan force-pushed the 15016-quo2-documentation-drawer-component branch from b6bf1c0 to 65de6f0 Compare April 20, 2023 13:41
@ajayesivan ajayesivan force-pushed the 15016-quo2-documentation-drawer-component branch 2 times, most recently from 92f74fc to 87e7776 Compare May 1, 2023 17:51
@status-im-auto
Copy link
Member

93% of end-end tests have passed

Total executed tests: 30
Failed tests: 2
Passed tests: 28
IDs of failed tests: 702850,702838 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_decline, id: 702850

    Device 2: Find `Button` by `accessibility id`: `close-activity-center`
    Device 2: Tap on found: Button

    medium/test_activity_center.py:73: in test_activity_center_contact_request_decline
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Username is not shown on 'Add contact' page after entering valid public key 
    

    [[Blocked by 15500]]

    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:410: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:927: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Passed tests (28)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_leave, id: 702845
    Device sessions

    6. test_community_unread_messages_badge, id: 702841
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    3. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    9. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    3. test_navigation_jump_to, id: 702936
    Device sessions

    4. test_activity_center_mentions, id: 702957
    Device sessions

    @churik churik self-assigned this May 2, 2023
    @churik
    Copy link
    Member

    churik commented May 2, 2023

     @ajayesivan
    Thank you for PR!
    I do not see that component affects the current bottom sheets, however, noticed that if SHELL=TRUE, the color gets brown:
    IMAGE 2023-05-02 13:53:10

    Is it something expected for now?

    @ajayesivan ajayesivan force-pushed the 15016-quo2-documentation-drawer-component branch 2 times, most recently from 94a3f7d to 3849551 Compare May 3, 2023 15:21
    @ajayesivan
    Copy link
    Contributor Author

    @churik Background color is correct. I have fixed the text color.

    Shell theme background is the same on both light & dark themes.

    @pavloburykh pavloburykh self-assigned this May 4, 2023
    @status-im-auto
    Copy link
    Member

    81% of end-end tests have passed

    Total executed tests: 26
    Failed tests: 5
    Passed tests: 21
    Not executed tests: 4
    
    IDs of not executed tests: 702846,702742,702850,702851 
    
    IDs of failed tests: 702958,702957,702731,702808,702838 
    

    Not executed tests (4)

    Click to expand
  • Rerun not executed tests
  • Failed tests (5)

    Click to expand
  • Rerun failed tests

  • Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_send_check_timestamps_sender_username, id: 702838

    Device 2: Verifying that 'hello' is under today
    Device 2: Looking for a message by text: hello

    critical/test_public_chat_browsing.py:410: in test_community_message_send_check_timestamps_sender_username
        channel.verify_message_is_under_today_text(message, self.errors)
    ../views/chat_view.py:927: in verify_message_is_under_today_text
        message_element.wait_for_visibility_of_element()
    ../views/base_element.py:135: in wait_for_visibility_of_element
        raise TimeoutException(
     Device 2: ChatElementByText by xpath:`//*[starts-with(@text,'hello')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen after wait_for_visibility_of_element 
    

    [[blocked by 14797]]

    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_admin_notification_accept_swipe, id: 702958

    Test setup failed: base_test_case.py:356: in setup_method
        driver.execute_script("sauce:context=Started %s" % method.__name__)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:634: in execute_script
        return self.execute(command, {
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:31: in check_response
        raise wde
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:26: in check_response
        super().check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:208: in check_response
        raise exception_class(value)
     ERROR The test with session id 00e659f087124af99c8cfc8fd1340609 has already finished, and can't receive further commands.
    E   You can learn more at https://app.eu-central-1.saucelabs.com/tests/00e659f087124af99c8cfc8fd1340609
    E   For help, please check https://docs.saucelabs.com/dev/error-messages
    



    2. test_activity_center_mentions, id: 702957

    Test setup failed: base_test_case.py:356: in setup_method
        driver.execute_script("sauce:context=Started %s" % method.__name__)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:634: in execute_script
        return self.execute(command, {
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute
        self.error_handler.check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:31: in check_response
        raise wde
    /home/jenkins/.local/lib/python3.10/site-packages/appium/webdriver/errorhandler.py:26: in check_response
        super().check_response(response)
    /home/jenkins/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:208: in check_response
        raise exception_class(value)
     ERROR The test with session id 00e659f087124af99c8cfc8fd1340609 has already finished, and can't receive further commands.
    E   You can learn more at https://app.eu-central-1.saucelabs.com/tests/00e659f087124af99c8cfc8fd1340609
    E   For help, please check https://docs.saucelabs.com/dev/error-messages
    



    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Device 1: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView
    Device 2: Find Button by xpath: //*[@content-desc='pins-count']//android.widget.TextView

    critical/chats/test_1_1_public_chats.py:1100: in test_1_1_chat_pin_messages
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Pinned messages count is 2 but should be 3 for user 2
    



    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_offline_pn, id: 702808

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    critical/chats/test_group_chat.py:258: in test_group_chat_offline_pn
        self.errors.verify_no_errors()
    base_test_case.py:184: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     message from old member PN was not fetched from offline
    E    message from new member PN was not fetched from offline
    



    Device sessions

    Passed tests (21)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    2. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_leave, id: 702845
    Device sessions

    6. test_community_unread_messages_badge, id: 702841
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    2. test_1_1_chat_edit_message, id: 702855
    Device sessions

    3. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    4. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    5. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    8. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    @pavloburykh
    Copy link
    Contributor

    @ajayesivan thanx for the fix. Ready to be merged.

    @ajayesivan ajayesivan force-pushed the 15016-quo2-documentation-drawer-component branch from 3849551 to 32b7101 Compare May 4, 2023 11:55
    @ajayesivan ajayesivan merged commit 0226a92 into develop May 4, 2023
    @ajayesivan ajayesivan deleted the 15016-quo2-documentation-drawer-component branch May 4, 2023 13:45
    @@ -21,9 +21,20 @@
    :right 0
    :border-top-left-radius 20
    :border-top-right-radius 20
    :overflow :hidden
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    This change caused bottom-sheet selected item to not show.
    Fixed in #15677

    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.

    Implement Quo2 component Drawers/ Documentation drawers
    7 participants