Conversation
2810867 to
5ff313d
Compare
tomasMizera
left a comment
There was a problem hiding this comment.
Good job. I like how simple you edited the model 👍
While testing this PR on my device I came across some bugs:
-
Search is not working in explore
-
When more projects are fetched, application jumps visually to the first project of the list. This is a big problem on Android because scrolling is slow, especially if this is like a 10th page loaded and you need to scroll all 10 pages in order to opt for 11th (and then scroll again for 12th, ..... )
-
Projects are no longer sorted alphabetically (my, shared nor explore). This is not that big of a problem when user has just a few projects, it only make finding my/shared project less user friendly. On the other hand, this issue together with previous ones makes explore basically unusable. Lets say I want to find project lutraconsulting/test_forms. Since projects are not sorted, I have no clue where it could be, so I am just stuck with scrolling and checking each project if it is not the one I am looking for. Search is not working and scrolling is slow.
Solution to this problem probably needs a help from Mergin, to return projects sorted alphabetically.
In the future, I think the best solution would be not using Fetch more button at all but pre-fetch projects when user is almost in the end of the list.
app/qml/ProjectDelegateItem.qml
Outdated
There was a problem hiding this comment.
Is it not possible to just stick a button on the end of the listview? Clicking on the button would fetch new entries and fill a model with them. We would then not need a new project status nor any other reserved projects name.
There was a problem hiding this comment.
Of course, there are multiple ways how to implement such button. Some of the ideas were discussed with Martin and we agreed on introducing an extra item which seems to be the easiest and fastest solution.
There was a problem hiding this comment.
Well, for me it seems as two different things and joining them can make some troubles in future (like checking on many places if the project in list is actually a project not some other button). But if you guys are ok with that, I am too :))
|
I have looked at Mergin API and I think that we do not need any change in Mergin in order to get sorted list of (public) projects. What if we simply add sorting into query, possibly with search string. Would it be too slow? |
5ff313d to
8d3f6a8
Compare
app/qml/ProjectDelegateItem.qml
Outdated
There was a problem hiding this comment.
Well, for me it seems as two different things and joining them can make some troubles in future (like checking on many places if the project in list is actually a project not some other button). But if you guys are ok with that, I am too :))
|
Manual tests have been modified accordingly. |
cleanups
some improvements
added timer for search
remove unused member mExpectedProjectCount
25f96cb to
9c79abd
Compare
Listing all projects has been replaced with listing with paging functionality.
Note:
NonProjectItemproject status has been introduced to easily distinguish real project items and fetch button item in a model (and view). This approach of introducing an extra item in the list has been agreed before the implementation.UPDATED:
Known issues:
myandsharedprojects are done on client side by the project model. Therefore search functionality is performed only on those projects which have been already fetched and stored in the model.closes #1043