-
Notifications
You must be signed in to change notification settings - Fork 14
Lakehead - CEM-2602 Profile list with counter #423
base: master
Are you sure you want to change the base?
Conversation
percypie
commented
Nov 24, 2021
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.
Not approving since todo let
|
||
`; | ||
|
||
//todo Make location change with amount of profiles (currently having issues trying to make Featured profile card not generate a new line without being able to edit it) |
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.
Why not update the original component to have this feature?
I assumed I wasn't allowed to edit the existing component, if I can edit the existing component then I can fix this very easily |
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.
What if the user doesn't want this. When you edit the existing component you need to make sure not to break existing users workflows ;)
{renderProfileCircles()} | ||
<FeaturedProfile icon key={ADD_USER_ICON_KEY} background="grey" /> | ||
</Container> | ||
<CountContainer>{profileData.length}</CountContainer> |
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 needs to be optional
Prop && Jsx
@@ -20,10 +20,13 @@ export interface IProfile { | |||
|
|||
export interface IFeaturedProfilesCardProps { | |||
profileData: IProfile[]; | |||
counterBool: boolean; |
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.
Documentation of Props goes here not on the component. You are doucmenting the type
} | ||
|
||
export const FeaturedProfilesCard: React.FC<IFeaturedProfilesCardProps> = ({ | ||
profileData, | ||
profileData, //the array of profiles to be displayed | ||
counterBool, //if true, the profile counter is displayed, and if false, the counter is not displayed |
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.
docs should not be on this line, put in TypeScript
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.
Fix the Comments before merging, LGTM
Basic.args = { | ||
profileData: profiles, | ||
counterBool: false, |
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.
Don't put Types in the Name
We dont say NameString, we just say Name.
Rename this to isCounterShowing or isCounterDisplayed or isProfileCountShowing
the prefix is denotes a Boolean value
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, I would update variable name