Skip to content

Update documentation and sample for #544 #567

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

Merged
merged 149 commits into from
Mar 6, 2017
Merged

Update documentation and sample for #544 #567

merged 149 commits into from
Mar 6, 2017

Conversation

SUPERCILEX
Copy link
Collaborator

@SUPERCILEX SUPERCILEX commented Feb 1, 2017

This PR is built on top of #544 and updates documentation and the sample with the changes from #544. It should be merged only if #544 is merged.

  • Update README links in new adapters

Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
…lback

# Conflicts:
#	app/src/main/java/com/firebase/uidemo/database/ChatActivity.java
#	database/src/main/java/com/firebase/ui/database/FirebaseArray.java
#	database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java
#	database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
# Conflicts:
#	database/src/main/java/com/firebase/ui/database/FirebaseArray.java
# Conflicts:
#	database/src/androidTest/java/com/firebase/ui/database/TestUtils.java
# Conflicts:
#	database/src/androidTest/java/com/firebase/ui/database/TestUtils.java
…lback

# Conflicts:
#	app/src/main/java/com/firebase/uidemo/database/ChatActivity.java
#	database/src/androidTest/java/com/firebase/ui/database/TestUtils.java
#	database/src/main/java/com/firebase/ui/database/FirebaseArray.java
#	database/src/main/java/com/firebase/ui/database/FirebaseIndexArray.java
#	database/src/main/java/com/firebase/ui/database/FirebaseListAdapter.java
#	database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
SUPERCILEX and others added 10 commits February 24, 2017 12:51
… works

Change-Id: I6a62e69a58d0023c5feffb0984613e8e95be2ecc
Change-Id: Ia72a6942c947464ade5070aa07fade1e133c0f8d
Change-Id: I831fd0bae52970ff7db6f4ab1ae2fdb7aa04200a
… object, change type name to `E` in ObservableSnapshotArray to unhide type T in toArray method, remove getSnapshots(int) method from FirebaseArray since there's already get(int), use `index` instead of `newIndex` in onKeyMove in FirebaseIndexArray

Signed-off-by: Alex Saveau <[email protected]>
@googlebot
Copy link

CLAs look good, thanks!

@samtstern
Copy link
Contributor

@SUPERCILEX this one's next!

…itical-#544

# Conflicts:
#	database/src/main/java/com/firebase/ui/database/FirebaseRecyclerAdapter.java
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX
Copy link
Collaborator Author

@samtstern Merged!

Query lastFifty = mChatRef.limitToLast(50);
mAdapter = new FirebaseRecyclerAdapter<Chat, ChatHolder>(
Chat.class, R.layout.message, ChatHolder.class, lastFifty) {
mAdapter = new FirebaseIndexRecyclerAdapter<Chat, ChatHolder>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have a really strong preference to keeping this since I was able to find issues with the index stuff by testing with this branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

While I definitely appreciate your constant testing of the indexed bits, the purpose of ChatActivity is to show off the basic FBUI integration, and I think FirebaseRecyclerAdapter is the most popular. People are likely to copy and paste from this class and I want them to get the least surprising thing.

Is there somewhere else we can put the indexed code? Maybe in another Activity that's not exposed in the main chooser?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@samtstern Hmmm, I didn't think about people copypasta-ing code straight from ChatActivity... If that's the case, then I agree with you that the code should be as simple as possible and I like the idea of a separate activity for the index stuff. What do you think of 758b692?

View v,
ContextMenu.ContextMenuInfo menuInfo) {
menu.add("Delete")
.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should we keep this? (I just did it for testing, but it's kinda nice)

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea but the ratio of "lines of code" to "how much it teaches you about FirebaseUI" may be too low here. If you don't have a strong preference I'd say remove it to keep ChatActivity as short as possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

SGTM!

@samtstern
Copy link
Contributor

@SUPERCILEX thanks for merging! To be honest I have not looked at this one in many moons (was focusing on #544) so I will give it a pass in the morning. I don't expect this to take more than one round of back-and-forth before merging too, thanks for keeping this one up to date.

@samtstern
Copy link
Contributor

LGTM! Gonna squash and merge.

@samtstern samtstern merged commit cf144b4 into firebase:version-2.0.0-dev Mar 6, 2017
@SUPERCILEX SUPERCILEX deleted the non-critical-#544 branch March 6, 2017 21:02
@SUPERCILEX
Copy link
Collaborator Author

Awesome!

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.

3 participants