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

Space Switching: Accordion-Style Bottom Sheet #6907

Merged
merged 8 commits into from
Aug 26, 2022

Conversation

ericdecanini
Copy link
Contributor

@ericdecanini ericdecanini commented Aug 22, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Changes the space sheet style back to accordion style as it is in the old app layout

Other not-so-obvious changes:

  • Long clicking on a space now opens space settings for that space instead of drag-and-drop repositioning

Motivation and context

Closes #6815

Screenshots / GIFs

Light Dark Black
image image image

Tests

  • Open the space sheet
  • See that spaces that have subspaces can be expanded
  • See that this holds true for subspaces too
  • See that selected space / subspace is highlighted grey
  • See that long clicking space / subspace opens space settings for that space

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 12

Checklist

@ericdecanini ericdecanini requested review from ElementBot, a team, fedrunov and bmarty and removed request for ElementBot, a team and fedrunov August 22, 2022 12:42
@ericdecanini ericdecanini marked this pull request as ready for review August 22, 2022 12:43
) {
val host = this
newSpaceListHeaderItem {
id("space_list_header")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is removed in another PR (#6877) so I didn't bother abstracting this

@ElementBot
Copy link

ElementBot commented Aug 22, 2022

Warnings
⚠️

vector/src/main/res/layout/item_new_space.xml#L11 - Attribute android:foreground has no effect on API levels lower than 23 (current min is 21)

⚠️

vector/src/main/res/layout/item_new_space.xml#L11 - Attribute android:foreground has no effect on API levels lower than 23 (current min is 21)

⚠️

vector/src/main/res/layout/item_new_sub_space.xml#L11 - Attribute android:foreground has no effect on API levels lower than 23 (current min is 21)

⚠️

vector/src/main/res/layout/item_new_sub_space.xml#L11 - Attribute android:foreground has no effect on API levels lower than 23 (current min is 21)

Generated by 🚫 dangerJS against d8398c2

Copy link
Contributor

@fedrunov fedrunov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Just small remarks, else LGTM!


override fun bind(holder: Holder) {
super.bind(holder)
holder.rootView.onClick(listener)
holder.root.onClick(onSpaceSelectedListener)
holder.root.setOnLongClickListener { onLongClickListener?.invoke(holder.root).let { true } }
Copy link
Member

Choose a reason for hiding this comment

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

.let { true } is maybe not useful. it is not used.
Having return true is probably better.

android:src="@drawable/ic_arrow_right"
android:visibility="visible"
android:background="?selectableItemBackground"
android:contentDescription="@string/a11y_expand_space_children"
Copy link
Member

Choose a reason for hiding this comment

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

contentDescription has to be updated when the state is expanded.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ericdecanini ericdecanini merged commit b67c3ce into develop Aug 26, 2022
@ericdecanini ericdecanini deleted the feature/eric/accordion-bottom-sheet branch August 26, 2022 12:04
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.

Space Switching: Spaces Bottom Sheet Should Have Expandable Subspaces
4 participants