Skip to content

Commit

Permalink
fix(map): design qa [EP-2999] (#193)
Browse files Browse the repository at this point in the history
* feat(map): metric download functionality [EP-1328]

* feat(map): metric download functionality [EP-1328]

* feat(map): metric download functionality [EP-1328]

* fix(map): metric download bugs [EP-2998, EP-2997]

* fix(map): design qa [EP-2999]

* fix(map): design qa [EP-2999]
  • Loading branch information
corinacioloca committed Oct 5, 2020
1 parent aa9e4d4 commit 33ba60c
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 58 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@kunukn/react-collapse": "^2.2.9",
"@loadable/component": "^5.6.1",
"@natgeosociety/marapp-uikit": "^1.0.10",
"@natgeosociety/marapp-uikit": "^1.0.11",
"assert": "^2.0.0",
"axios": "^0.18.0",
"axios-cache-adapter": "^2.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/earth-admin/src/pages-client/organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Link } from 'gatsby';
import { JSHINT } from 'jshint';
import React, { useEffect } from 'react';

import { isValidGroup, isSuperAdmin, Spinner } from '@marapp/earth-shared';
import { isSuperAdmin, isValidGroup, Spinner } from '@marapp/earth-shared';

import { useAuth0 } from '@app/auth/auth0';
import { BASE_URL } from '@app/config';
Expand Down
2 changes: 1 addition & 1 deletion packages/earth-map/src/components/map/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import React, { useContext } from 'react';
import isEqual from 'react-fast-compare';
import { APP_ABOUT } from 'theme';

import { Map, UserMenu, Spinner } from '@marapp/earth-shared';
import { Map, Spinner, UserMenu } from '@marapp/earth-shared';

import BasemapComponent from '../basemap';
import MapControls from './controls';
Expand Down
23 changes: 9 additions & 14 deletions packages/earth-map/src/components/widget/download/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,15 @@ const WidgetDownload = (props: IMetric) => {

return (
<div className="ng-position-relative marapp-qa-downloaddropdown" ref={closeOnClickOutside}>
<Tooltip
placement="top"
overlay={<span>Download metric</span>}
overlayClassName="c-rc-tooltip -default"
mouseLeaveDelay={0}
>
<i
className={classNames('ng-c-cursor-pointer ng-dropdown-button marapp-qa-actiondownload', {
'ng-icon-angle-up ng-dropdown-button-open': showDropdown,
'ng-icon-angle-down': !showDropdown,
})}
onClick={(e) => setShowDropdown(!showDropdown)}
/>
</Tooltip>
<i
className={classNames(
'ng-c-cursor-pointer ng-toolbar-button ng-icon-download-outline marapp-qa-actiondownload',
{
'ng-dropdown-button-open': showDropdown,
}
)}
onClick={(e) => setShowDropdown(!showDropdown)}
/>

<div className={classNames('ng-ep-download-dropdown', { 'ng-display-block': showDropdown })}>
<p className="ng-text-display-s ng-padding-medium-horizontal ng-padding-vertical ng-margin-remove">
Expand Down
15 changes: 0 additions & 15 deletions packages/earth-map/src/components/widget/download/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,4 @@
}
}

.ng-dropdown-button {
align-items: center;
font-size: 12px;
justify-content: center;
display: flex;
height: 40px;
width: 40px;
}

.ng-dropdown-button-open {
background: $marapp-gray-1;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.075);
border-radius: 20px;
color: $marapp-gray-8;
}

34 changes: 16 additions & 18 deletions packages/earth-map/src/components/widget/toolbar/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,23 @@ class WidgetToolbarComponent extends PureComponent<any, any> {
className={`marapp-qa-widgettoolbar c-widget-toolbar ng-flex
ng-flex-middle ng-margin-left ${classNames}`}
>
<div className="ng-margin-right">
<Tooltip
placement="top"
overlay={<span>Info</span>}
overlayClassName="c-rc-tooltip -default"
mouseLeaveDelay={0}
>
<button
className={classnames({
'-active': !!activeInfo,
})}
type="button"
onClick={onInfo}
>
<i className="ng-icon-info-circle" />
</button>
</Tooltip>
</div>
<WidgetDownload data={data} />
<Tooltip
placement="top"
overlay={<span>Info</span>}
overlayClassName="c-rc-tooltip -default"
mouseLeaveDelay={0}
>
<button
className={classnames('ng-toolbar-button', {
'-active': !!activeInfo,
})}
type="button"
onClick={onInfo}
>
<i className="ng-icon-info-circle" />
</button>
</Tooltip>
</div>
);
}
Expand Down
15 changes: 15 additions & 0 deletions packages/earth-map/src/components/widget/toolbar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,18 @@
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
*/
@import '~styles/config';

.ng-toolbar-button {
align-items: center;
justify-content: center;
display: flex;
height: 40px;
width: 40px;

&:hover, &.ng-toolbar-button-open {
background: $marapp-gray-7;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.075);
border-radius: 20px;
}
}
7 changes: 3 additions & 4 deletions packages/earth-map/src/pages/earth/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
*/
import React from 'react';

import { Tab, Tabs } from 'components/tabs';
import Header from 'components/header';
import Fullscreen from 'components/fullscreen';
import Header from 'components/header';
import Layers from 'components/layers';
import Map from 'components/map';
import Place from 'components/place';
import Places from 'components/places';
import Sidebar from 'components/sidebar';
import { Tab, Tabs } from 'components/tabs';
import Url from 'components/url';
import { EPanels } from 'modules/sidebar/model';
import React from 'react';
import { Icons as VizzIcons } from 'vizzuality-components';

import { URL_PROPS } from './url';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2743,10 +2743,10 @@
call-me-maybe "^1.0.1"
glob-to-regexp "^0.3.0"

"@natgeosociety/marapp-uikit@^1.0.10":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@natgeosociety/marapp-uikit/-/marapp-uikit-1.0.10.tgz#39034d9cb3df41aa87db2d2190ad482597277257"
integrity sha512-NRIl75Gnexz/txP6FwSd0+FsRHfO+l4/WGSaN1H+oex0oq4Tjl6HygW4HZ8cwpSbZJfeDMNMr8CWlXTrZ1ra2w==
"@natgeosociety/marapp-uikit@^1.0.11":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@natgeosociety/marapp-uikit/-/marapp-uikit-1.0.11.tgz#bce3573e29027a03bd684302a5c704520c980454"
integrity sha512-Lw1j1rJXGHZUPTVme9bMi83xySCVPICl3rXt+ZrV3yCrzFdyhv5G4WefAF2zH/vRlnxIVd/AmufoOXTZWtn+mA==
dependencies:
countup.js "1.8.5"
jquery "2.2.1"
Expand Down

0 comments on commit 33ba60c

Please sign in to comment.