-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Backer dash header #154
Backer dash header #154
Conversation
self.setSelectedButton = Signal.merge( | ||
self.backedButtonTitleText.skip(first: 1).mapConst(.backed), | ||
self.backedButtonTitleText.skip(first: 1).mapConst(.backed).take(first: 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, let me explain this line:
We prefix the user fetch with the current user, which doesn't contain the number of backed projects (hi graphql!), so we have to skip the first emission and wait for the api to return with the full user data. I am adding the .take(first: 1)
because when the user leaves this screen, we want to keep their place. In the current version, this is a bug - it resets the tab and indicator view to always select "backed".
This looks cool! Did you consider a |
@justinswart not sure i understand how you could switch between table views that way? If you use the same table view and just refresh the data, then you wouldn't be able to save your place after scrolling in the different sections. Know what I mean? |
@theginbin aah, good point! I guess it wouldn't work in this scenario. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is all good! I just have one question...
self.vm.inputs.viewWillAppear(false) | ||
self.isRefreshing.assertValues([true, false, true]) | ||
self.vm.inputs.viewWillAppear(true) | ||
self.isRefreshing.assertValues([true, false, true], "Projects refresh after swipe animation.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this reset you back to the first page? like if I paginate a few times, swipe left and then swipe back to the right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does keep your place after paginating and swiping between tabs (i've also tested swiping with paginating through the project navigator and all seems well), but I will doublecheck paginating several times with swipes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbrandonw so you're right, it jumps back anywhere from 1 to 6 cells back after reloading OR paginating. I didn't see it because I had DiscoveryParams.lens.perPage
set to 20
for our test account with fewer backed projects. The higher I set this value, the better it seems. Thoughts on how to keep the positioning other than loading more projects up front?
WHAT
Some improvements to the Backer Dashboard, including collapsible header, swiping between tabs, and bug fixes.