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

Lowfi: WalkthrougTopicListFragment Part 2 #812

Closed
rt4914 opened this issue Mar 16, 2020 · 10 comments · Fixed by #836
Closed

Lowfi: WalkthrougTopicListFragment Part 2 #812

rt4914 opened this issue Mar 16, 2020 · 10 comments · Fixed by #836
Assignees
Labels
Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@rt4914
Copy link
Contributor

rt4914 commented Mar 16, 2020

Mock: https://xd.adobe.com/view/e8aa4198-3940-47f9-514a-f41cc54457f6-9e9b/screen/92becc49-3a10-498b-885c-4cde95f73d51/WT-Topic-List-

WalkthroughTopicListFragment implementation should match as per mocks.

@rt4914 rt4914 changed the title Lowfi: Walkthrough Part 2 Lowfi: WalkthrougTopicListFragment Part 2 Mar 16, 2020
@rt4914 rt4914 added Priority: Nice-to-have This work item is nice to have for its milestone. Workstream: Lowfi UI labels Mar 16, 2020
@aggarwalpulkit596
Copy link
Contributor

aggarwalpulkit596 commented Mar 16, 2020

@rt4914 Can you please explain this workflow how to display the list what action to do perform on user selection etc

@rt4914
Copy link
Contributor Author

rt4914 commented Mar 16, 2020

@rt4914 Can you please explain this workflow how to display the list what action to do perform on user selection etc

Actually this implementation resembles the implementation of HomeFragment in a lot of ways because in that also we are showing list of topics. But I would suggest you to focus on part-1 first as the concept which you will use in that can easily be used in here too. If you want to work on this right now, you can check various implementations of such lists in OngoingTopicListActivity, CompletedStoryListActivity, StoryActivity.

@aggarwalpulkit596
Copy link
Contributor

aggarwalpulkit596 commented Mar 18, 2020

@rt4914 should I make a separate adapter for this or should reuse the existing code because TopicListViewHolder will be exactly same as before

@aggarwalpulkit596
Copy link
Contributor

aggarwalpulkit596 commented Mar 18, 2020

@rt4914 also how do I have to handle the selection of a topic because in this PR I have to make things in order to fulfill the needs of the last walkthrough fragment

@rt4914
Copy link
Contributor Author

rt4914 commented Mar 19, 2020

@rt4914 should I make a separate adapter for this or should reuse the existing code because TopicListViewHolder will be exactly same as before

There are two approaches to this:

  1. We can create a new adapter, but in long run we will definitely replace that adapter with a BindableAdapter.
  2. We can directly use BindableAdapter at this stage only.

I would suggest you to apply step 2 instead of 1, as learning about BindableAdapter is important for this project.
Now as a reference you can actually see the implementation in StoryActivity where we are using a bindable adapter. In that implementation you will see that there are two different types of views:
a. VIEW_TYPE_HEADER and b. VIEW_TYPE_CHAPTER now similar to this you will have two views VIEW_TYPE_HEADER (containing text What do you want to learn?) and VIEW_TYPE_TOPIC which will contain each topic.

The above description is for Adapter/data only.

Second part of this implementation is how data is arranged because the index0 item is the text and other items are a grid layout manager. So it looks like it is a combination of LinearLayoutManager and GridLayoutManager. So for this you can take help from

val homeLayoutManager = GridLayoutManager(activity.applicationContext, 2)

@aggarwalpulkit596
Copy link
Contributor

@rt4914 actually I was using the second approach and already gone through all these files /codes
Thanks anyway

@rt4914
Copy link
Contributor Author

rt4914 commented Mar 19, 2020

@rt4914 actually I was using the second approach and already gone through all these files /codes
Thanks anyway

@aggarwalpulkit596 Okay, so where you are exactly stuck right now?

@aggarwalpulkit596
Copy link
Contributor

aggarwalpulkit596 commented Mar 19, 2020

Nowhere just trying to implement without taking multiple reviews this time😅

@rt4914
Copy link
Contributor Author

rt4914 commented Mar 19, 2020

Nowhere just trying to implement without taking multiple reviews this time😅

Great to know that. :-)

@aggarwalpulkit596
Copy link
Contributor

@rt4914 should I make a separate file for topic_summary view as well?
Because that is bind to some ViewModel and i can't use that

rt4914 pushed a commit that referenced this issue Mar 20, 2020
* Add Header in WalkthroughTopicListFragment

* Add WalkthroughTopicSummaryViewModel

* Show Topic List in RecyclerView

* Handle topic item click

* handling topicId in WalkthroughFinalFragment

* Add WalkthroughTopicListFragment test

* nit changes

* undo refractor change

* nit changes
rt4914 pushed a commit that referenced this issue Apr 3, 2020
* Walkthrough Final Fragment Completed

* Add Test For Final Fragment

* updated test

* nit change
@BenHenning BenHenning added this to the Alpha milestone Jun 23, 2020
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

Successfully merging a pull request may close this issue.

3 participants