-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat: revise Favorites by introducing active folder to reduce ambiguity #2189
feat: revise Favorites by introducing active folder to reduce ambiguity #2189
Conversation
6eed09c
to
a9af107
Compare
e2b865b
to
a48d899
Compare
b74bd52
to
5b88148
Compare
How about we rebrand this feature to “Bookmarks” to align with browsers. |
not the same senario, one deals with url while the other deals with word. maybe leave it for later discussion. not in this one PR |
issue 2,the word in already in the active folder, but the text is |
614f834
to
51cb213
Compare
51cb213
to
15385eb
Compare
e862bf4
to
1aedbc6
Compare
This can be merged as is. The favourites have various other issues unrelated to this feature. |
The group's favorite folder is set to the word was added to root folder the word should be added to root (consider there is no such favorite folder ) or create the actual folder |
174c46f
to
d58ac85
Compare
89a2564
to
7446926
Compare
issue 3 is fixed by removing it for now. Need to decouple two menus #2189 (comment) issue 4 require a manually created folder for now. (Part of issue 4 is fixed by early return) They will be done next time (new PRs). #2194 |
The early return should be fixed now. There is another issue: original GD automatically switching group when clicking word and the word is in user's group->folder association. I think this is another design error, because when clicking other word without group->folder association. There is no way to know what group to switch back. Anyway, I retain this design for now. And I added this to Let's hear some feedbacks. |
Also note that this feature is not recursive. Consider this one: if recursive for word `b`
Init state -> 🌟 -> click -> remove from `f2` ->
New state -> ⚪ -> click -> add to `f1`
^ inconsistency here
This is less powerful, because recursive makes it hard to manage f1 without affecting f2
if not recursive for word `b`
Init state -> ⚪ -> click -> add to `f1` ->
New state -> 🌟 -> click -> remove from `f1`
^ preditable here
This is more powerful because user can could add/remove word in f1 & f2 independently
.
├── a
├── f1 <- active
│ ├── f2
│ │ ├── a
│ │ ├── b
│ │
│ ├── c
|
a1f6449
to
58afa92
Compare
|
I like this one ,when |
return nullptr; // no match | ||
} | ||
|
||
QModelIndex FavoritesModel::getModelIndexByFullPath( const QStringList & fullPath ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a little complex , but this can do for now.
Implement #2178 (comment)
Breakage / Enhancement:
Original GD's folder is ambiguous, group->folder mapping only maps the name.
Now requires the path fully specified like
b/a
for b->a folder anda
is for folder a that is directly under top level only.The group->folder is now only used when switching groups. Switching to a new group -> auto active folder of chosen.
Coding:
The central data is just a QStringList hat represents the nested folder.
Then various accompanying methods to utilize it.
Main idea: the 🌟 now associated with the active folder
and consider the top level as the default folder.