Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5486.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Spaces feedback section is removed from left panel
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,12 @@

package im.vector.app.features.spaces

import android.view.View
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick

@EpoxyModelClass(layout = R.layout.item_space_beta_header)
abstract class SpaceBetaHeaderItem : VectorEpoxyModel<SpaceBetaHeaderItem.Holder>() {

@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickAction: ClickListener? = null

override fun bind(holder: Holder) {
super.bind(holder)
holder.feedBackAction.onClick(clickAction)
}

class Holder : VectorEpoxyHolder() {
val feedBackAction by bind<View>(R.id.spaceBetaFeedbackAction)
}
class Holder : VectorEpoxyHolder()
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about completely deleting SpaceBetaHeaderItem class and item_space_beta_header.xml and improve GenericHeaderItem with a description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

text appearance of title in item_generic_header is a little bit different, so it will require confirmation from designers. I'd say we should do that as a part of design system implementation, which should happen soon 🤔

}
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ class SpaceSummaryController @Inject constructor(
val host = this
spaceBetaHeaderItem {
id("beta_header")
clickAction {
host.callback?.sendFeedBack()
}
}

// show invites on top
Expand Down
14 changes: 0 additions & 14 deletions vector/src/main/res/drawable/ic_feedback.xml

This file was deleted.

15 changes: 1 addition & 14 deletions vector/src/main/res/layout/item_space_beta_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
tools:viewBindingIgnore="true">

<TextView
Expand All @@ -27,18 +28,4 @@
android:text="@string/spaces_beta_welcome_to_spaces_desc"
android:textColor="?vctr_content_secondary" />

<TextView
android:id="@+id/spaceBetaFeedbackAction"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="@string/give_feedback"
android:textColor="@color/vector_info_color"
app:drawableStartCompat="@drawable/ic_feedback" />

</LinearLayout>
3 changes: 2 additions & 1 deletion vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,8 @@
<string name="you_may_contact_me">You may contact me if you have any follow up questions</string>
<string name="feedback_sent">Thanks, your feedback has been successfully sent</string>
<string name="feedback_failed">The feedback failed to be sent (%s)</string>
<string name="give_feedback">Give Feedback</string>
<!-- TODO TO BE REMOVED -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to see, thanks.

<string name="give_feedback" tools:ignore="UnusedResources">Give Feedback</string>
<string name="give_feedback_threads">Give Feedback</string>
<string name="send_feedback_threads_title">Threads Beta feedback</string>
<string name="send_feedback_threads_info">Threads are a work in progress with new, exciting upcoming features, such as improved notifications. We’d love to hear your feedback!</string>
Expand Down