Skip to content
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

Reports redesign #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
11cf80a
icon.jsx : finish mapping up to NavBar based on filesystem order
gohanko May 28, 2019
7846e1e
icon : map all icons in assets folder
gohanko May 28, 2019
50b1248
<Icon /> is functional
gohanko Jun 3, 2019
cb39469
changed all usage to proposed one
gohanko Jun 3, 2019
9c0ee58
Common : all import is now default
gohanko Jun 3, 2019
e5452d6
improvement
gohanko Jun 3, 2019
7e49bce
upgrade enzyme and enzyme adaptor to latest which contains fixes that…
gohanko Jun 4, 2019
239948e
fix circular dependency
gohanko Jun 4, 2019
7792332
use correct icons
gohanko Jun 4, 2019
f99a496
icon name changes
gohanko Jun 4, 2019
b3f1b71
merge conflicts resolved
gohanko Jun 4, 2019
0b91a40
fix broken icons
gohanko Jun 4, 2019
ca18a57
fix tests
gohanko Jun 4, 2019
6c8df39
clean up comments
gohanko Jun 5, 2019
5e0cfcc
fix warnings
gohanko Jun 5, 2019
408fa91
change Notifications list proptype to array as oppose to object
gohanko Jun 5, 2019
0cb5cc4
resolve merge conflicts
gohanko Jun 5, 2019
ddd7676
fix test
gohanko Jun 5, 2019
5c5184a
fix import spaces
gohanko Jun 5, 2019
6196001
timepicker : add return statements that got forgotten :skull:
gohanko Jun 5, 2019
91df79a
+ Added support for legacy contracts
msamprz Jun 10, 2019
06bc4aa
Addressed review
msamprz Jun 10, 2019
344020c
Merge pull request #148 from msamprz/fix-legacy-contract-types
negarn Jun 10, 2019
4af772c
removed redundant withdrawal and deposit icons and use the proper one
gohanko Jun 10, 2019
4f7af07
Merge branch 'dev' into icon_improvements
ashkanx Jun 10, 2019
8f27caa
Merge pull request #138 from ahkuma/icon_improvements
ashkanx Jun 10, 2019
48af295
align calendar red dot
arash-fs Jun 10, 2019
43cedf2
Merge pull request #149 from arash-binary/tooltip
negarn Jun 11, 2019
797ecc8
Merge branch 'add-design-elements-to-reports' of github.com:easteregg…
msamprz Jun 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 74 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"connect-modrewrite": "0.9.0",
"deep-diff": "0.3.8",
"emphasize": "2.0.0",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.8.0",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-config-binary": "1.0.2",
"eslint-config-prettier": "2.9.0",
Expand Down
14 changes: 8 additions & 6 deletions src/javascript/_common/base/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ const Login = (() => {
const marketing_queries = `&signup_device=${signup_device}${date_first_contact ? `&date_first_contact=${date_first_contact}` : ''}`;
const default_binary_url = `https://oauth.binary.com/oauth2/authorize?app_id=${getAppId()}&l=${language}${marketing_queries}`;

return ((server_url && /qa/.test(server_url)) ?
`https://${server_url}/oauth2/authorize?app_id=${getAppId()}&l=${language}${marketing_queries}` :
getAppId() === domain_app_ids['deriv.app'] ?
default_binary_url
: urlForCurrentDomain(default_binary_url)
);
if (server_url && /qa/.test(server_url)) {
return `https://${server_url}/oauth2/authorize?app_id=${getAppId()}&l=${language}${marketing_queries}`;
}
if (getAppId === domain_app_ids['deriv.app']) {
return default_binary_url;
}

return urlForCurrentDomain(default_binary_url);
};

// TODO: update this to handle logging into /app/ url
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/_common/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Url = (() => {
if (/localhost|binary\.sx/.test(domain)) {
domain = `https://binary.com/${url_lang}/`;
} else {
domain = domain.replace(/deriv\.app/, 'binary\.com');
domain = domain.replace(/deriv\.app/, 'binary.com');
}
}
const new_url = `${domain}${(normalizePath(path) || 'home')}.html${(pars ? `?${pars}` : '')}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
Icon,
IconCalendarToday } from 'Assets/Common';
import { localize } from '_common/localize';
import PropTypes from 'prop-types';
import React from 'react';
import Icon from 'Assets/icon.jsx';
import { localize } from '_common/localize';

const CalendarFooter = ({
footer,
Expand All @@ -20,7 +18,7 @@ const CalendarFooter = ({
{ has_range_selection && <span className='calendar__text'>{ `${!is_minimum ? localize('Duration: ') : ''}${duration_date}` }</span> }
{ has_today_btn &&
<Icon
icon={IconCalendarToday}
icon='IconCalendarToday'
className='calendar__icon'
onClick={onClick}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import {
Icon,
IconChevronDoubleLeft,
IconChevronDoubleRight,
IconChevronLeft,
IconChevronRight } from 'Assets/Common';
import { month_headers } from 'Constants/date-time';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import Icon from 'Assets/icon.jsx';
import { month_headers } from 'Constants/date-time';
import {
addMonths,
addYears,
subMonths,
subYears,
toMoment } from 'Utils/Date';
import CalendarButton from './calendar-button.jsx';
toMoment } from 'Utils/Date';
import CalendarButton from './calendar-button.jsx';
import {
getCentury,
getDecade } from './helper';
getDecade } from './helper';

const CalendarHeader = ({
calendar_date,
Expand Down Expand Up @@ -56,7 +51,7 @@ const CalendarHeader = ({
})}
onClick={is_prev_year_disabled ? undefined : () => navigateTo(subYears(calendar_date, num_of_years))}
>
<Icon icon={IconChevronDoubleLeft} className='calendar__icon' />
<Icon icon='IconChevronDoubleLeft' className='calendar__icon' />
</CalendarButton>
<CalendarButton
className={classNames('calendar__nav calendar__nav--prev-month', {
Expand All @@ -65,7 +60,7 @@ const CalendarHeader = ({
is_hidden={!is_date_view}
onClick={is_prev_month_disabled ? undefined : () => navigateTo(subMonths(calendar_date, 1))}
>
<Icon icon={IconChevronLeft} className='calendar__icon' />
<Icon icon='IconChevronLeft' className='calendar__icon' />
</CalendarButton>

<React.Fragment>
Expand Down Expand Up @@ -106,15 +101,15 @@ const CalendarHeader = ({
is_hidden={!is_date_view}
onClick={is_next_month_disabled ? undefined : () => navigateTo(addMonths(calendar_date, 1))}
>
<Icon icon={IconChevronRight} className='calendar__icon' />
<Icon icon='IconChevronRight' className='calendar__icon' />
</CalendarButton>
<CalendarButton
className={classNames('calendar__nav calendar__nav--next-year', {
'calendar__nav--disabled': is_next_year_disabled,
})}
onClick={is_next_year_disabled ? undefined : () => navigateTo(addYears(calendar_date, num_of_years))}
>
<Icon icon={IconChevronDoubleRight} className='calendar__icon' />
<Icon icon='IconChevronDoubleRight' className='calendar__icon' />
</CalendarButton>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const getDays = ({
message={message}
/>
}
{moment_date.date()}
<span className='calendar__cell-date'>{moment_date.date()}</span>
</span>
);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import classNames from 'classnames';
import moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Localize from 'App/Components/Elements/localize.jsx';
import { Icon, IconArrowBold } from 'Assets/Common';
import classNames from 'classnames';
import moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Localize from 'App/Components/Elements/localize.jsx';
import Icon from 'Assets/icon.jsx';

const Pair = ({ value, label }) => (
<div className='pair'>
Expand Down Expand Up @@ -66,7 +66,7 @@ class ContractAudit extends Component {
onClick={this.toggleVisibility.bind(this)}
>
<Icon
icon={IconArrowBold}
icon='IconArrowBold'
className={classNames('contract-audit__arrow', {
'contract-audit__arrow--is-open': this.state.is_visible,
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { Component } from 'react';
import { withRouter } from 'react-router';
import { CSSTransition } from 'react-transition-group';
import { localize } from '_common/localize';
import { Icon, IconBack } from 'Assets/Common';
import Icon from 'Assets/icon.jsx';
import Localize from 'App/Components/Elements/localize.jsx';
import { UnderlyingIcon } from 'App/Components/Elements/underlying-icon.jsx';
import Button from 'App/Components/Form/button.jsx';
Expand Down Expand Up @@ -173,7 +173,7 @@ class ContractDrawer extends Component {
className='contract-drawer__heading'
onClick={() => this.props.history.goBack()}
>
<Icon icon={IconBack} />
<Icon icon='IconBack' />
<h2><Localize str={this.props.heading || 'Contract'} /></h2>
</div>
<div className='contract-drawer__body'>{body_content}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { localize } from '_common/localize';
import {
Icon,
IconClose } from 'Assets/Common';
import Icon from 'Assets/icon.jsx';

export const DrawerHeader = ({
alignment,
Expand All @@ -16,7 +14,7 @@ export const DrawerHeader = ({
{alignment && alignment === 'right' ?
<div className={drawer_header_class}>
<div className='drawer__icons drawer__icons-btn-close' onClick={closeBtn}>
<Icon icon={IconClose} className='drawer__icons-icon-close' />
<Icon icon='IconClose' className='drawer__icons-icon-close' />
</div>
<div className='drawer__notifications'>
<h4 className='drawer__notifications-header'>{localize('all notifications')}</h4>
Expand All @@ -25,7 +23,7 @@ export const DrawerHeader = ({
:
<div className={drawer_header_class}>
<div className='drawer__icons drawer__icons-btn-close' onClick={closeBtn}>
<Icon icon={IconClose} className='drawer__icons-icon-close' />
<Icon icon='IconClose' className='drawer__icons-icon-close' />
</div>
<div className='drawer__icons drawer__brand-logo'>
<div className='drawer__image' />
Expand Down
Loading