Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated TableView * Updated the UI of the TableView to more closely match the UIKit 2.0 mocks in Figma * Included a new `Row` component for conveniently configuring a table with props instead of Component imports (not required, just an additive change) * Stories for both "Custom" and "Basic" table * TableView linter errors * Upgrade Profile TableViews * Update the default styling of the Avatar Icon * Connected campus name and like count to real user data * Liked Content empty state * Check In * check in * check in * rename queries * resolve lint errors * resolve tests * updated snaps * Remove the lint:fix script * start adding snapshots * add snaps * dep updates * font sizes converted to rem helper * Update @apollo/client version across all packages * Update slides.tests.js.snap * updated template yarn lock Co-authored-by: Vincent Wilson <vince@classyh.at> Co-authored-by: Michael Neeley <micneeley14@gmail.com>
- Loading branch information
1 parent
f2a6a32
commit ffccb48
Showing
78 changed files
with
5,217 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/apollos-ui-connected/src/PersonFollowingConnected/FollowListItem/ConfirmButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import useFollowPerson from '../hooks/useFollowPerson'; | ||
import useAcceptFollowRequest from '../hooks/useAcceptFollowRequest'; | ||
|
||
import { Button, H6, useTheme } from '@apollosproject/ui-kit'; | ||
import { ListItemStyles } from '../PersonFollowingConnected.styles'; | ||
|
||
const ConfirmButton = ({ personId, onCompleted }) => { | ||
const theme = useTheme(); | ||
const { isFollowingCurrentUser } = useFollowPerson(personId); | ||
const [ | ||
acceptFollowRequest, | ||
{ loading: mutationLoading }, | ||
] = useAcceptFollowRequest(personId); | ||
const disabled = mutationLoading; | ||
|
||
return ( | ||
<Button | ||
style={ListItemStyles.button(theme)} | ||
pill={false} | ||
type="primary" | ||
onPress={async () => { | ||
await acceptFollowRequest({ | ||
// use this to immediately offer a follow-up action and avoid complex loading states on buttons | ||
optimisticResponse: { | ||
acceptFollowRequest: { | ||
...isFollowingCurrentUser, | ||
state: 'ACCEPTED', | ||
}, | ||
}, | ||
}); | ||
onCompleted(); | ||
}} | ||
disabled={disabled} | ||
> | ||
<H6>{'Confirm'}</H6> | ||
</Button> | ||
); | ||
}; | ||
|
||
ConfirmButton.propTypes = { | ||
personId: PropTypes.string.isRequired, | ||
onCompleted: PropTypes.func, | ||
}; | ||
|
||
ConfirmButton.defaultProps = { | ||
onCompleted: () => null, | ||
}; | ||
|
||
export default ConfirmButton; |
42 changes: 42 additions & 0 deletions
42
packages/apollos-ui-connected/src/PersonFollowingConnected/FollowListItem/FollowListImage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* FollowListImage.js | ||
* | ||
* Avatar of a person that sits to the left of the FollowListItem | ||
*/ | ||
|
||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import { ListItemStyles } from '../PersonFollowingConnected.styles'; | ||
|
||
import { | ||
Avatar, | ||
ImageSourceType, | ||
withIsLoading, | ||
useTheme, | ||
} from '@apollosproject/ui-kit'; | ||
|
||
const FollowListImage = ({ profile }) => { | ||
const theme = useTheme(); | ||
const themeSize = theme.sizing.baseUnit * 4; | ||
|
||
return ( | ||
<Avatar | ||
size="small" | ||
profile={profile} | ||
themeSize={themeSize} | ||
containerStyle={ListItemStyles.avatar} | ||
/> | ||
); | ||
}; | ||
|
||
FollowListImage.propTypes = { | ||
isLoading: PropTypes.bool, | ||
profile: PropTypes.shape({ | ||
firstName: PropTypes.string, | ||
lastName: PropTypes.string, | ||
photo: ImageSourceType, | ||
}), | ||
}; | ||
|
||
export default withIsLoading(FollowListImage); |
Oops, something went wrong.