Skip to content

feat: ProjectsList Search, Layout Improvements#679

Merged
j-px merged 45 commits intoSketchware-Pro:mainfrom
khaled-0:search-projects
Apr 23, 2023
Merged

feat: ProjectsList Search, Layout Improvements#679
j-px merged 45 commits intoSketchware-Pro:mainfrom
khaled-0:search-projects

Conversation

Removed Create new project fab and re-used the one at the top of the list
@j-px j-px added the feature A new feature label Dec 21, 2022
@j-px j-px self-assigned this Dec 21, 2022
@khaled-0 khaled-0 requested a review from j-px December 22, 2022 17:48
Copy link
Contributor

@j-px j-px left a comment

Choose a reason for hiding this comment

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

Searching works great with this, but I don't like the search view always taking up space. It would be greater if it was e.g. inside the toolbar, maybe hidden by default unless a search icon is pressed.

The two restore and create new project cards in one row also doesn't seem like a good UI choice imo.

@j-px
Copy link
Contributor

j-px commented Jan 7, 2023

I might work on making the UI better myself, but I'm not sure.

@indrawanalghifary
Copy link

Add this search features, this great for many projects

@khaled-0
Copy link
Contributor Author

let's just hold the search until we can come to a good ui decision

@abrihamdemisse
Copy link

abrihamdemisse commented Mar 6, 2023

What about these two same UIs :)

20230306_184921
20230306_185326

Searching works great with this, but I don't like the search view always taking up space. It would be greater if it was e.g. inside the toolbar, maybe hidden by default unless a search icon is pressed.

The two restore and create new project cards in one row also doesn't seem like a good UI choice imo.

@j-px
Copy link
Contributor

j-px commented Mar 6, 2023

Two FABs is an absolute no-go, and the always-visible search bar is wasting space.

@khaled-0
Copy link
Contributor Author

Sick gamer toolbar

Copy link
Contributor

@j-px j-px left a comment

Choose a reason for hiding this comment

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

That search view inside the toolbar looks and feels very nice. Just one thing, I don't think having a FAB that opens a dialog is okay. I'd prefer still having a CardView that handles the restore logic, and the FAB always opening the New Project dialog.

@j-px
Copy link
Contributor

j-px commented Mar 24, 2023

i'll work on some changes to this PR now, and if I get to make it how I'd like it, I'll merge this alongside your commits

j-px added 5 commits March 24, 2023 19:46
Makes ProjectsAdapter use RecyclerView's DiffUtil for easy and smooth data changes
Removes a useless filterData("") call, as well as a redundant runOnUiThread one.
Loading the raw projects list, especially on Android 11+, can take long.
j-px added 28 commits March 24, 2023 20:51
Inflating @layout/myprojects_item takes really long, so only change the adapter's data in refreshProjectsList() instead of creating an entirely new adapter.
This is needed for "auto"casted variables when using instanceof.
…dapter

This renames some fields, and since that causes many changes, this extra commit was created.
When searching, the search string must always be shorter than the to be searched string. Also stops the special on start handling from occurring while searching.
Having special items whose positions mustn't change has its downsides, it's complicated to handle. DiffUtil doesn't know about them and made the wrong items move.
Makes the app show the Lottie animation loading_3balls.json while loading projects for the first time.
Fixes this bug:
1. Enter search query that matches a single project
2. Delete that project
3. Get all projects listed again, even though the query wasn't changed
# Conflicts:
#	app/src/main/java/com/besome/sketch/ProjectsFragment.java
#	app/src/main/res/layout/toolbar.xml
#	app/src/main/res/values/strings.xml
@j-px j-px merged commit d8ca8ae into Sketchware-Pro:main Apr 23, 2023
@khaled-0 khaled-0 deleted the search-projects branch April 23, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants