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

v20190522_0 #93

Merged
merged 24 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e783200
fix full page modal initial loading and animation fix
cakasuma May 21, 2019
4aa09a0
Merge branch 'dev' of github.com:binary-com/deriv-app into amam/fix_d…
cakasuma May 21, 2019
7b2a81f
check test
cakasuma May 21, 2019
ed4e9e6
enable asset information chart
cakasuma May 21, 2019
f98b40a
Merge branch 'dev' of github.com:binary-com/deriv-app into amam/fix_d…
cakasuma May 21, 2019
61e9a36
fix z-index loader
cakasuma May 21, 2019
730ce83
remove solid 1 color
cakasuma May 21, 2019
2c98074
fix overlap
cakasuma May 21, 2019
7da108f
remove console log
cakasuma May 21, 2019
02050f5
remove OHLC by comment
cakasuma May 21, 2019
c59dc1e
remove zindex
cakasuma May 21, 2019
f9944b1
put loading after updatequery string and listener
cakasuma May 21, 2019
457777c
children proptypes object
cakasuma May 21, 2019
98bc8a2
initial loading only for initial loading
cakasuma May 21, 2019
b6a36ef
Merge branch 'dev' of github.com:binary-com/deriv-app into amam/fix_d…
cakasuma May 21, 2019
94ab0df
update loading logic
cakasuma May 21, 2019
7d9e3c7
add todo
cakasuma May 21, 2019
d20739a
hide menu links only on mobile
zaki-hanafiah May 21, 2019
eb87d03
Ignore responses using gtm
easteregg May 21, 2019
753da87
Merge branch 'dev' into add-ignored-responses-to-trackjs
easteregg May 21, 2019
ef312cb
button hover go to reports
cakasuma May 21, 2019
f1bcaf8
Merge pull request #76 from cakasuma/amam/fix_design
ashkanx May 21, 2019
36a978a
Merge branch 'dev' into add-ignored-responses-to-trackjs
ashkanx May 21, 2019
9b293ed
Merge pull request #88 from easteregg/add-ignored-responses-to-trackjs
ashkanx May 21, 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
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ class FullPageModal extends React.Component {
children,
confirm_button_text,
onCancel,
is_loading,
is_visible,
title,
} = this.props;
return (
<PoseGroup>
{is_visible && [
{(is_visible && !is_loading) && [
<ModalBackground
className='full-page-modal__background'
key='full-page-modal__background'
Expand Down Expand Up @@ -120,6 +121,7 @@ FullPageModal.propTypes = {
hideAppBlur : PropTypes.func,
is_closed_on_cancel : PropTypes.bool,
is_closed_on_confirm: PropTypes.bool,
is_loading : PropTypes.bool,
is_visible : PropTypes.bool,
onCancel : PropTypes.func,
onConfirm : PropTypes.func,
Expand All @@ -130,6 +132,7 @@ FullPageModal.propTypes = {
const full_page_modal = connect(
({ ui }) => ({
hideAppBlur: ui.hideAppBlur,
is_loading : ui.is_loading,
showAppBlur: ui.showAppBlur,
}),
)(FullPageModal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import MediaItem, {
} from 'App/Components/Elements/Media';
import Checkbox from 'App/Components/Form/Checkbox';
import RadioGroup from 'App/Components/Form/Radio';
import OHLCDisabledLightIcon from 'Images/app/settings/OHLC-disabled.svg';
import OHLCEnabledLightIcon from 'Images/app/settings/OHLC-enabled.svg';
import ChartPositionEnabledLightIcon from 'Images/app/settings/bottom.svg';
import OHLCDisabledDarkIcon from 'Images/app/settings/dark/OHLC-disabled.svg';
import OHLCEnabledDarkIcon from 'Images/app/settings/dark/OHLC-enabled.svg';

// TODO: enable asset information
// import OHLCDisabledLightIcon from 'Images/app/settings/OHLC-disabled.svg';
// import OHLCEnabledLightIcon from 'Images/app/settings/OHLC-enabled.svg';
// import OHLCDisabledDarkIcon from 'Images/app/settings/dark/OHLC-disabled.svg';
// import OHLCEnabledDarkIcon from 'Images/app/settings/dark/OHLC-enabled.svg';

import ChartPositionEnabledDarkIcon from 'Images/app/settings/dark/bottom.svg';
import IntervalDurationDisabledDarkIcon from 'Images/app/settings/dark/interval-disabled.svg';
import IntervalDurationEnabledDarkIcon from 'Images/app/settings/dark/interval-enabled.svg';
Expand All @@ -24,11 +27,12 @@ import IntervalDurationEnabledLightIcon from 'Images/app/settings/interval-enab
import ChartPositionDisabledLightIcon from 'Images/app/settings/left.svg';

const ChartSettings = ({
is_asset_visible,
// TODO: enable asset information
// is_asset_visible,
// toggleAsset,
is_countdown_visible,
is_dark_mode,
is_layout_default,
toggleAsset,
toggleCountdown,
toggleLayout,
}) => (
Expand Down Expand Up @@ -62,7 +66,8 @@ const ChartSettings = ({
</div>
</MediaDescription>
</MediaItem>
<MediaItem>
{/* TODO: enable asset information
<MediaItem>
<MediaHeading>
<Localize
str='Open-high-low-close [_1](OHLC) information[_2]'
Expand All @@ -83,7 +88,7 @@ const ChartSettings = ({
/>
</div>
</MediaDescription>
</MediaItem>
</MediaItem> */}
<MediaItem>
<MediaHeading>
<Localize str='Interval duration' />
Expand Down
15 changes: 14 additions & 1 deletion src/javascript/app/Services/trackjs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
Responses that should be ignored upon receiving errors.
We still log them, but having an error inside of these
will not break the queue and send them to trackjs.
This will look for predefined `ignored_responses_in_trackjs` from GTM, if
there is none, then it just does not filter out any response.
*/
const ignored_responses_in_trackjs = window.ignored_responses_in_trackjs || [];

class ResponseQueue {
constructor() {
Expand Down Expand Up @@ -46,7 +54,12 @@ export const ApiCallProxyHandler = {
queue.push(response);
if (window.TrackJS) window.TrackJS.console.log(queue.list);
queue.fresh();
if (window.TrackJS) window.TrackJS.track(response.error.code);
if (
window.TrackJS &&
!ignored_responses_in_trackjs.some(item => item === response.error.code)
) {
window.TrackJS.track(response.error.code);
}
}
queue.push(response);
return_value = response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ export default class SmartChartStore extends BaseStore {
@computed
get settings() {
return (({ common, ui } = this.root_store) => ({
assetInformation: ui.is_chart_asset_info_visible,
// TODO: enable asset information
assetInformation: false, // ui.is_chart_asset_info_visible,
countdown : ui.is_chart_countdown_visible,
lang : common.current_language,
position : ui.is_chart_layout_default ? 'bottom' : 'left',
Expand Down
5 changes: 3 additions & 2 deletions src/javascript/app/Stores/Modules/Trading/trade-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,10 @@ export default class TradeStore extends BaseStore {

@action.bound
onLoadingMount() {
BinarySocket.wait('history').then(() => {
// TODO: find better way to remove initial loader
setTimeout(() => {
this.root_store.ui.setAppLoading(false);
});
}, 2200);
}

@action.bound
Expand Down
12 changes: 7 additions & 5 deletions src/javascript/app/Stores/ui-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class UIStore extends BaseStore {
// @observable is_purchase_lock_on = false;

// SmartCharts Controls
@observable is_chart_asset_info_visible = true;
// TODO: enable asset information
// @observable is_chart_asset_info_visible = true;
@observable is_chart_countdown_visible = false;
@observable is_chart_layout_default = true;

Expand Down Expand Up @@ -164,10 +165,11 @@ export default class UIStore extends BaseStore {
this.is_chart_layout_default = !this.is_chart_layout_default;
}

@action.bound
toggleChartAssetInfo() {
this.is_chart_asset_info_visible = !this.is_chart_asset_info_visible;
}
// TODO: enable asset information
// @action.bound
// toggleChartAssetInfo() {
// this.is_chart_asset_info_visible = !this.is_chart_asset_info_visible;
// }

@action.bound
toggleChartCountdown() {
Expand Down
10 changes: 9 additions & 1 deletion src/sass/app/_common/drawer/contract-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ $header-height: 4em;
display: flex;
justify-content: flex-start;
align-items: center;
height: 56px;
margin-bottom: 1em;
padding: 0.5em;
border-radius: 4px;
cursor: pointer;

@include typeface(--title-left-bold-black);
@include themify($themes) {
color: themed('text_primary_color');
}

&:hover {
@include themify($themes) {
background: themed('tab_hover_color');
}
}
}
&__icon {
margin-right: 16px;
Expand Down
5 changes: 5 additions & 0 deletions src/sass/app/_common/drawer/positions-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ $header-height: 4em;
border-color: themed('background_button_color');
}

&:hover {
@include themify($themes) {
background-color: themed('tab_hover_color');
}
}
.btn__text {
font-size: 1.2em;
font-weight: bold;
Expand Down
3 changes: 1 addition & 2 deletions src/sass/app/_common/form/button-toggle-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
background-color: themed('container_color');

&:hover:not(.button-menu__button--active) {
background-color: themed('tab_hover_color');
background-color: rgba(themed('tab_hover_color'), 0.08);
}
}

Expand Down Expand Up @@ -55,7 +55,6 @@

.button-menu {
&__button, &__button--active {
background-color: rgba(0, 0, 0, 0) !important;
z-index: 1;
}
&__button:nth-last-child(2) {
Expand Down
10 changes: 6 additions & 4 deletions src/sass/app/_common/layout/layouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,12 @@
div.cq-chart-controls {
box-shadow: none;
}
div.ciq-asset-information {
z-index: 0;
display: none;
}
// TODO: enable asset information
// div.ciq-asset-information {
// z-index: 0;
// top: 0;
// left: 0;
// }
div.stx_jump_today.home > svg {
top: 6px;
left: 8px;
Expand Down