-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: favourite ui feature #8210
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8210 +/- ##
=======================================
Coverage 41.93% 41.93%
=======================================
Files 176 176
Lines 22992 22992
=======================================
Hits 9641 9641
Misses 11966 11966
Partials 1385 1385 Continue to review full report at Codecov.
|
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.
Looks good on the Tiles View. How about List View?
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.
One minor comment. This is a great feature!
: favlist.push(app.metadata.name); | ||
services.viewPreferences.updatePreferences({appList: {...pref.appList, favouritesApplist: favlist}}); | ||
}}> | ||
<i |
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.
Can we right justify the star all the way? The easiest way to accomplish this is to wrap the application title and star button in a flexbox (display: flex
), and set margin-left
to auto
for the star.
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.
Either right-justified, or a little right-padded next to the application name would be my ask as well.
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.
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.
Minor comments on code improvement. And maybe rename the filter with something like "Favourites Only"? Because without the check, it already shows favorites, just mixed with non-favorites.
Btw, Favourites
seems British English, maybe we want to keep it US English^^;;?
@@ -28,6 +31,7 @@ export function getFilterResults(applications: Application[], pref: AppsListPref | |||
sync: pref.syncFilter.length === 0 || pref.syncFilter.includes(app.status.sync.status), | |||
health: pref.healthFilter.length === 0 || pref.healthFilter.includes(app.status.health.status), | |||
namespaces: pref.namespacesFilter.length === 0 || pref.namespacesFilter.some(ns => app.spec.destination.namespace && minimatch(app.spec.destination.namespace, ns)), | |||
favourite: !pref.showFavourites || pref.favouritesApplist.includes(app.metadata.name), |
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.
favouritesApplist
should follow camelcase naming rule, like favouritesAppList
.
ctx.navigation.goto('.', {showFavourites: val}, {replace: true}); | ||
services.viewPreferences.updatePreferences({appList: {...props.pref, showFavourites: val}}); | ||
}} | ||
/>{' '} |
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.
Good use of {' '}
👍 , better practice than
.
<i className={'icon argo-icon-' + (app.spec.source.chart != null ? 'helm' : 'git')} /> | ||
<span className='applications-list__title'>{app.metadata.name}</span> | ||
{pref => { | ||
let favlist = pref.appList.favouritesApplist || []; |
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.
favlist
should be favList
.
Since favorites should be able to be quickly accessed, how about moving the filter "Favorites only" to the top of the filter list? What do people think about this? |
haha, school taught me british english - I am ok with any spelling - what do you suggest @rbreeze , @jannfis |
I agree it should probably be "Favorites" to match the American English in the rest of the UI. Also I agree with the change to "Favorites Only" |
8eeb6bb
to
247182a
Compare
@rbreeze - which is preferred? |
I prefer the latter with the larger star. |
Signed-off-by: saumeya <[email protected]> lint fix Signed-off-by: saumeya <[email protected]>
@saumeya Can you please resolve the merge conflicts? |
Signed-off-by: saumeya <[email protected]>
Signed-off-by: saumeya <[email protected]> use splice instead of filter Signed-off-by: saumeya <[email protected]>
247182a
to
02656bc
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.
Thanks for the thorough review, everyone!
@rbreeze can you please approve as well so I can merge ( unless you want to request some changes ) |
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.
LGTM!
* feat: favourite ui feature (#8210) Signed-off-by: saumeya <[email protected]>
* feat: favourite ui feature (argoproj#8210) Signed-off-by: saumeya <[email protected]> Signed-off-by: pashavictorovich <[email protected]>
Signed-off-by: saumeya [email protected]
closes #5936
54886c83-7e66-4a2f-9899-f4ec865fce2a.mp4
Signed-off-by: saumeya [email protected]
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: