-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
3771 mark post as reply #3778
3771 mark post as reply #3778
Conversation
@@ -207,8 +207,8 @@ fun TimelineStatusWithAccount.toViewData(gson: Gson, isDetailed: Boolean = false | |||
id = status.serverId, | |||
url = null, // no url for reblogs | |||
account = this.reblogAccount!!.toAccount(gson), | |||
inReplyToId = null, | |||
inReplyToAccountId = null, | |||
inReplyToId = status.inReplyToId, |
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.
Would be consistent (a boost can also be a reply).
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.
But the boost itself is not the reply, right? The actionable status is the reply
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.
What is boosted ("status") can be a reply (too).
This info is "unused".
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.
Ah, I see now, this is here as a hack to populate the inreplyto timeline account of the concrete statusviewdata when it's a boost of a reply.
…but as you say, we're not displaying that information, so it could be reverted to avoid confusing the issue (although the status/actionable thing is already confusing)
.../java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineRemoteMediator.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/keylesspalace/tusky/db/TimelineStatusEntity.kt
Outdated
Show resolved
Hide resolved
8e37063
to
b19cf1e
Compare
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.
A couple of low-hanging things I spotted. Later today I'll check this out locally and take a proper look.
.../java/com/keylesspalace/tusky/components/timeline/viewmodel/NetworkTimelineRemoteMediator.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/keylesspalace/tusky/db/TimelineStatusEntity.kt
Outdated
Show resolved
Hide resolved
I haven't tested this yet, but I've just observed the following:
So, in protected void setIsReply(boolean isReply) {
super setIsReply(isReply);
if (isReply) {
statusInfo.text = getString(R.string.post_replied_format, ...)
}
} ? Also, what should happen if the status was a reply, and it was reblogged? https://chaos.social/@jollysea/110668273086228868 is an example post that is a reply that was reblogged by @mcclure.
Note that that status above is an interesting edge case for this, because it's mcc reblogging a reply to her own post, so although option 3 might be generally good, it would lead to "mcc boosted this reply to mcc". Which might be more mcc than a single line can handle :-) |
Instead of what? |
I kind of like option 3. At the moment (in my code) reblog is more important than reply. So an "if ... else if" logic. |
@@ -17,7 +17,7 @@ | |||
android:layout_marginStart="14dp" | |||
android:layout_marginTop="@dimen/status_reblogged_bar_padding_top" | |||
android:layout_marginEnd="14dp" | |||
android:drawableStart="@drawable/ic_reblog_18dp" | |||
android:drawableStart="@drawable/ic_reblog_24dp" |
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.
Why is this switching to the bigger icon? It causes the effective left margin of the text to change.
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.
Also, you could copy ic_reply_24dp.xml
to ic_reply_18dp.xml`, and then use that for replies.
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.
The size is determined by the component (height of TextView).
Already before: The text behind the drawable is not alligned with the name or the content below. This does not change here.
So I could leave it as 18 but that would not change it graphically.
@Lakoja Can you take a look at Lakoja#4, and see if you want to merge that in to this PR? I figured that was easier than more back-and-forth. You'll want to merge Some quick screenshots: It shows reply and boost, with a bullet between themIf the account isn't known, but mentioned, it uses the @-form of the user nameLong lines are truncated / ellipsisedI'm not 100% convinced that moving the left margin over is a good idea, but as you can see from the screenshots, sometimes the line does get quite long. WDYT? |
I find the lines with two information quite hard to parse visually. |
I think that might be a problem, because with this PR we're trying to use the statusInfo to show two difference pieces of information. Currently the statusInfo answers the "Why am I seeing this in my timeline?" question. It tells the user "You are seeing this because someone you follow has boosted it". This PR extends that to also answer the "Can I tap on this post to read a thread?" question. I'm not sure that only ever showing one bit of information is a good idea, because it means that users will not be able to rely on the information in the statusInfo -- what's shown will vary, and it will be difficult for users to figure out why it's varying. By which I mean that some replies -- replies from people that the user follows -- will be marked as replies, and the user will know they can tap the post to see the thread. But other replies -- replies from people they don't follow that have been boosted by someone they do -- will not be marked as replies. [I know the "reply" icon at the bottom of the post will change as well, but as we see from the bug reports, this is also something that users don't always notice] If we flip that example around, and decide that showing that it's part of a thread is more important than showing that it's a boost, then we get the problem that a user can see "user-i-dont-follow replied to ..." in the statusInfo, and not know why this post is appearing in their timeline. The first screenshot in my previous comment is an example of that. I don't follow rain, but I do follow Norm. Both of those seem like a recipe for user confusion. I think we can collapse some of the information down. For example, if someone boosts their own post there's no need to show their display name again. And we could experiment with putting some of the information elsewhere. I'm not sure a two-line statusInfo is a good idea,
[Edit: Putting a reply icon next to the display name is a bad idea -- users could easily add an emoji to their display name that looks like a reply icon (or other), which would be very confusing.] I'll try some mockups and see what happens. |
Some of #3883 is relevant to this as well. There's one, possibly two additional values that can be included in the status_info, but they're mutually exclusive with the others (I think). They are:
or similar. Possibly with "direct message" in that text in bold, or bold tusky_red, or something like that, to make it even more distinctive. |
3f94d4d
to
9e7fcff
Compare
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.
Doesn't this need a database migration for TimelineAccountEntity
?
@@ -207,8 +207,8 @@ fun TimelineStatusWithAccount.toViewData(gson: Gson, isDetailed: Boolean = false | |||
id = status.serverId, | |||
url = null, // no url for reblogs | |||
account = this.reblogAccount!!.toAccount(gson), | |||
inReplyToId = null, | |||
inReplyToAccountId = null, | |||
inReplyToId = status.inReplyToId, |
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.
But the boost itself is not the reply, right? The actionable status is the reply
boolean sensitive = !TextUtils.isEmpty(status.getActionable().getSpoilerText()); | ||
boolean expanded = status.isExpanded(); | ||
|
||
setupCollapsedState(sensitive, expanded, status, listener); | ||
|
||
Status reblogging = status.getRebloggingStatus(); | ||
if (reblogging == null || status.getFilterAction() == Filter.Action.WARN) { | ||
boolean isReply = status.getStatus().getInReplyToId() != null; |
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.
Don't you need to use status.getActionable
here, and on line 90?
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 was searching for some time for the right location with the right information.
"actionable" was not it if I remember correctly.
It is working and plausible at the moment.
(Would need to look deep(er) into the code if you want me to be 100% certain about this.)
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.
You're right, the inreplyto timeline account is only available on status, but without the timeline type mapper change, the correct thing to check for the inreplyto id is the actionable status. (And if status.getActionable().getInReplyToId()
is nonnull, then status.getInReplyToAccount()
will be as well.)
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.
What is the meaning of "actionable" in current code?
I see that it only has a value if "reblog" is true (Status.kt:59), so the thinking is probably "the item the action was taken for"?
(The "reply stuff" I have aligned more with the extsting "inReplyToAccountId".)
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.
Yeah, my understanding is that the "outer" status is the boost itself, and the actionable status is the status that was boosted
There is no change there? All info here is present (in rare cases the "replied to account info" might be missing and then the name is not show). |
What does this patch do if a post is BOTH a reply AND an RT? |
Oh, it looks super weird in the thread view - is that intentional? |
I guess this change should be applied to the notification timeline as well? (Maybe in a second pass after the refactor lands?) |
No. I fixed it by not showing the status info in the thread view. But I guess the introduced flag should/could be part of "StatusDisplayOptions" object? |
Yes, probably and yes. |
gradle/libs.versions.toml
Outdated
@@ -120,6 +120,7 @@ glide-compiler = { module = "com.github.bumptech.glide:ksp", version.ref = "glid | |||
glide-core = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } | |||
glide-okhttp3-integration = { module = "com.github.bumptech.glide:okhttp3-integration", version.ref = "glide" } | |||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" } | |||
kapt = { module = "androidx.room:room-compiler", version.ref = "androidx-room" } |
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.
Not sure why this is needed now (starting today)?
If I don't have this there will be a build error that the (automatically generated) AppDatabase_Impl does not implement all needed dao factory methods.
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.
This should not be necessary as we migrated Room to ksp. If you get an error, try a clean build.
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.
Removed.
4e1ac16
to
202968f
Compare
imo the changes look ok, but it will have to be rebased again after #4026 lands (after the 25.0 release) 😐 |
202968f
to
e6bbf90
Compare
Should we in turn get rid of the double arrow on the reply button that currently indicates replies? It wouldn't be necessary anymore. |
e6bbf90
to
82476a3
Compare
82476a3
to
d383e77
Compare
d383e77
to
04d7cd6
Compare
Replaced by: #4834 |
Fixes #3771 / partly addresses #1469
This shows in a timeline the status info "In reply to < username>" just like the existing "< username> boosted" above a status.
This is a more or less low-hanging fruit as the information is available and the web gui does this (but see review comments here for details).
This is NOT the requested "Show thread" functionality - which would still need to be discussed; i.e. every reply makes a thread?