diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ab0949a4..f3ef1455a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ -## Unreleased +# CHANGELOG + +## Not released +- Fix CategoryWidgetUI displaying no data while loading [#26](https://github.com/CartoDB/carto-react-lib/pull/26) - Animate CategoryWidget values [#30](https://github.com/CartoDB/carto-react-lib/pull/30) +- Make OAuthLogin component responsive [#28](https://github.com/CartoDB/carto-react-lib/pull/28) ## 1.0.0-beta5 (2020-11-25) - Fix addSource keeping optional credentials property in the payload [#24](https://github.com/CartoDB/carto-react-lib/pull/24) diff --git a/src/oauth/OAuthLogin.js b/src/oauth/OAuthLogin.js index e5576171d..95b2d39b2 100644 --- a/src/oauth/OAuthLogin.js +++ b/src/oauth/OAuthLogin.js @@ -1,16 +1,10 @@ import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { makeStyles } from '@material-ui/core/styles'; -import { Button, Grid } from '@material-ui/core'; +import { Button, Hidden, IconButton } from '@material-ui/core'; +import AccountCircleOutlinedIcon from '@material-ui/icons/AccountCircleOutlined'; import useOAuthLogin from './useOAuthLogin'; import { setTokenAndUserInfoAsync } from '../redux/oauthSlice'; -const useStyles = makeStyles(() => ({ - root: { - flexGrow: 1, - }, -})); - /** * Shows a login button. * When this button is clicked, the OAuth protocol flow is handled @@ -20,7 +14,6 @@ const useStyles = makeStyles(() => ({ */ export default function OAuthLogin() { const dispatch = useDispatch(); - const classes = useStyles(); const oauthApp = useSelector((state) => state.oauth.oauthApp); const onParamsRefreshed = (oauthParams) => { @@ -35,20 +28,17 @@ export default function OAuthLogin() { const [handleLogin] = useOAuthLogin(oauthApp, onParamsRefreshed); return ( -
- - - - - -
+ + + + + + + + + + ); } diff --git a/src/ui/theme/carto-theme.js b/src/ui/theme/carto-theme.js index ded89dd4a..0a06e1761 100644 --- a/src/ui/theme/carto-theme.js +++ b/src/ui/theme/carto-theme.js @@ -399,6 +399,13 @@ export const cartoThemeOptions = { background: variables.palette.action.focus, outline: 'none', }, + + // Mapbox controls + '.mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right': { + '@media (max-width: 600px)': { // sm + bottom: spacing(4) + } + } }, }, diff --git a/src/ui/widgets/CategoryWidgetUI.js b/src/ui/widgets/CategoryWidgetUI.js index 8bd0266fb..5c8df3885 100644 --- a/src/ui/widgets/CategoryWidgetUI.js +++ b/src/ui/widgets/CategoryWidgetUI.js @@ -497,7 +497,7 @@ function CategoryWidgetUI(props) { } /> )) - : data.length === 0 && ( + : (data.length === 0 && !loading) && ( NO DATA AVAILABLE There are no results for the combination of filters applied to your