-
-
Notifications
You must be signed in to change notification settings - Fork 915
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
Presets: remember and show last used presets #3026
Conversation
7c39cce
to
01012a0
Compare
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.
Happy to add more suggestions once it's not draft 😉
src/tabs/presets/FavoritePresets.js
Outdated
} | ||
|
||
_purgeOldPresets() { | ||
this._favoritePresetsList.splice(s_maxFavoritePresetsCount, this._favoritePresetsList.length); |
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.
Why not this._favoritePresetsList = [];
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.
this does not clean the list, it just makes sure it does not have more elements than s_maxFavoritePresetsCount
so it removes all elements starting from s_maxFavoritePresetsCount + 1
. (i just added + 1)
Max number of elements to be removed is this._favoritePresetsList.length
.
01012a0
to
007f005
Compare
007f005
to
6266f29
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Do you want to test this code? Here you have an automated build: |
AUTOMERGE: (FAIL)
|
Simply remembers the last 50 used presets and shows them above other presets in the search results if any are matching with the search parameters.
Allows users to quickly reuse the presets without the actual search.
Sorts favorite presets by the last date/time they were applied.
Remembers presets by the full relative path in the repo without the repo url.
So all presets repos are sharing the same "favorite" presets list.
To test: pick and save one or a few presets.
Check if they appear above the other presets in the search results.