feat: ProjectsList Search, Layout Improvements#679
feat: ProjectsList Search, Layout Improvements#679j-px merged 45 commits intoSketchware-Pro:mainfrom khaled-0:search-projects
Conversation
It's properly centered now.
Removed Create new project fab and re-used the one at the top of the list
j-px
left a comment
There was a problem hiding this comment.
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.
|
I might work on making the UI better myself, but I'm not sure. |
|
Add this search features, this great for many projects |
|
let's just hold the search until we can come to a good ui decision |
|
What about these two same UIs :)
|
|
Two FABs is an absolute no-go, and the always-visible search bar is wasting space. |
j-px
left a comment
There was a problem hiding this comment.
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.
|
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 |
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.
Suggested by lint
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


Read commit messages.
Video: https://cdn.discordapp.com/attachments/797576098627977257/1055184881870704670/Screenrecorder-2022-12-22-00-07-13-538.mp4