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

Implement static loading skeleton #16474

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

Parveshdhull
Copy link
Member

@Parveshdhull Parveshdhull commented Jul 3, 2023

fixes: #16473

Summary

PR implements a loading skeleton as per Figma design parameters and also adds missing content types.
PR just adds a static loading skeleton, animation of the loading skeleton will be implemented separately.
Once the animation is implemented we can remove the current implementation, until then we have to keep both.
(will create an issue for that)

Testing

Manual testing doesn't require, PR just implements the quo2 component.

status: ready

@Parveshdhull Parveshdhull self-assigned this Jul 3, 2023
@@ -67,7 +67,6 @@
[status-im2.contexts.quo-preview.notifications.toast :as toast]
[status-im2.contexts.quo-preview.onboarding.small-option-card :as small-option-card]
[status-im2.contexts.quo-preview.password.tips :as tips]
[status-im2.contexts.quo-preview.posts-and-attachments.messages-skeleton :as messages-skeleton]
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably outdated, currently just a blank screen. Animated skeleton will be part of new preview screen

@status-im-auto
Copy link
Member

status-im-auto commented Jul 3, 2023

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 01fa31f #1 2023-07-03 22:51:23 ~6 min ios 📱ipa 📲
✔️ 01fa31f #1 2023-07-03 22:51:30 ~6 min android-e2e 🤖apk 📲
✔️ 01fa31f #1 2023-07-03 22:53:00 ~7 min android 🤖apk 📲
✔️ 01fa31f #1 2023-07-03 22:53:28 ~8 min tests 📄log
✔️ d87b706 #2 2023-07-04 11:16:18 ~5 min ios 📱ipa 📲
✔️ d87b706 #2 2023-07-04 11:16:28 ~6 min android-e2e 🤖apk 📲
✔️ d87b706 #2 2023-07-04 11:16:36 ~6 min android 🤖apk 📲
✔️ d87b706 #2 2023-07-04 11:17:51 ~7 min tests 📄log

@status-im-auto
Copy link
Member

91% of end-end tests have passed

Total executed tests: 33
Failed tests: 3
Passed tests: 30
Not executed tests: 1
IDs of not executed tests: 703202 
IDs of failed tests: 702732,703086,702731 

Not executed tests (1)

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

    Click to expand
  • Rerun failed tests

  • Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_mark_all_messages_as_read, id: 703086

    Device 1: Find Button by accessibility id: mark-as-read
    Device 1: Tap on found: Button

    critical/test_public_chat_browsing.py:837: in test_community_mark_all_messages_as_read
        self.errors.verify_no_errors()
    base_test_case.py:182: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     New messages counter is not shown in home > Commmunity element
    



    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_pin_messages, id: 702731

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Pin feature is in development]]

    Passed tests (30)

    Click to expand

    Class TestActivityMultipleDevicePR:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_navigation_jump_to, id: 702936
    Device sessions

    3. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    4. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    2. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    2. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    5. test_community_mentions_push_notification, id: 702786
    Device sessions

    6. test_community_message_delete, id: 702839
    Device sessions

    7. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    8. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    9. test_community_message_edit, id: 702843
    Device sessions

    10. test_community_leave, id: 702845
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    4. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    5. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    6. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    7. test_1_1_chat_edit_message, id: 702855
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    ^{:key index}
    [skeleton-item (mod index 4) content color]))]))

    (def view (theme/with-theme internal-view))
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    🙌

    @@ -113,6 +114,7 @@
    (def checkbox quo2.components.selectors.selectors.view/checkbox)
    (def filter quo2.components.selectors.filter.view/view)
    (def skeleton quo2.components.loaders.skeleton/skeleton)
    (def static-skeleton quo2.components.loaders.skeleton.view/view)
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    could you make a loaders section and move it to that? same for other loaders in this file!

    Copy link
    Member

    @smohamedjavid smohamedjavid left a comment

    Choose a reason for hiding this comment

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

    @Parveshdhull - Thank you for the PR!

    I found that the skeleton works only on Light mode and Dark mode + blur. Is this expected? I believe this is not the case. Correct me if i'm wrong.

    Light Mode Light Mode + Blur Dark Mode Dark Mode + Blur


    (defn content-view
    [{:keys [type index content color]}]
    (let [{:keys [width height margin-bottom margin-top]}
    Copy link
    Member

    Choose a reason for hiding this comment

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

    margin-top is not in constants/content-dimensions.

    :content content
    :color color})}])]])

    (defn internal-view
    Copy link
    Member

    Choose a reason for hiding this comment

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

    Small Improvement: Updating internal-view as private would prevent using it without theme context.

    {:label "Blur?"
    :key :blur?
    :type :boolean}
    {:label "Animated?" ;; Not implemented yet
    Copy link
    Member

    Choose a reason for hiding this comment

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

    Is it fine to not have this option until the animation is implemented?

    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.

    Looks great, nice work @Parveshdhull!
    Consider adding a few component spec test if possible too. 👍

    @Parveshdhull Parveshdhull force-pushed the chore/refactor-loading-skeletong branch from 01fa31f to d87b706 Compare July 4, 2023 11:10
    @Parveshdhull Parveshdhull mentioned this pull request Jul 4, 2023
    3 tasks
    @Parveshdhull
    Copy link
    Member Author

    Parveshdhull commented Jul 4, 2023

    Hi @smohamedjavid and @J-Son89, Thank you very much for reviewing PR.
    Created a follow-up issue #16482

    I found that the skeleton works only on Light mode and Dark mode + blur. Is this expected? I believe this is not the case. Correct me if i'm wrong.

    Thanks for spotting it. The problem was in the preview screen itself. It was using the same color as the loading skeleton in dark mode.
    Light mode + blur is just white color with opacity, so should not be visible.

    @Parveshdhull Parveshdhull merged commit affd2a5 into develop Jul 4, 2023
    @Parveshdhull Parveshdhull deleted the chore/refactor-loading-skeletong branch July 4, 2023 11:25
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Refactor loading skeleton
    4 participants