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

NT-1914: UX – Post new comment #1274

Merged
merged 21 commits into from
Jun 7, 2021

Conversation

sunday-okpoluaefe
Copy link
Contributor

πŸ“² What

UX – Post new comment

πŸ€” Why

  • User is scrolled to the top if not there already

  • After posting a new comment we want to guarantee it’s visible, therefore scrolling to the top.

πŸ›  How

  • Added a delay after inserting comment to ensure the scroll takes effect
 /*
         * A little delay after new item is inserted
         * This is necessary for the scroll to take effect
         */
        viewModel.outputs.insertComment()
            .compose(bindToLifecycle())
            .delay(200, TimeUnit.MILLISECONDS)
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe {
                binding.commentsRecyclerView.scrollToPosition(0)
            }

πŸ‘€ See

| Before πŸ› | After πŸ¦‹ |

scroll.mp4

πŸ“‹ QA

  • Create a comment on any backed project. The new comment should be shown and scrolled to the top

Story πŸ“–

https://kickstarter.atlassian.net/browse/NT-1914

@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #1274 (1382960) into master (615c324) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1274   +/-   ##
=========================================
  Coverage     74.34%   74.34%           
  Complexity      739      739           
=========================================
  Files           221      221           
  Lines          6646     6646           
  Branches        405      405           
=========================================
  Hits           4941     4941           
  Misses         1569     1569           
  Partials        136      136           

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 615c324...1382960. Read the comment docs.

@sunday-okpoluaefe sunday-okpoluaefe merged commit 8c51083 into master Jun 7, 2021
@sunday-okpoluaefe sunday-okpoluaefe deleted the sunday-nt-1914-ux-post-comment branch June 7, 2021 12:23
Arkariang added a commit that referenced this pull request Jun 7, 2021
…tin/NT-2024

* 'master' of github.com:kickstarter/android-oss:
  NT-1911 :UX – Error posting comment (#1273)
  NT-1914: UX – Post new comment (#1274)

# Conflicts:
#	app/src/main/java/com/kickstarter/ui/activities/CommentsActivity.kt
#	app/src/main/java/com/kickstarter/viewmodels/CommentsViewModel.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants