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 page design changes #134

Merged
merged 86 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
faea974
Add Wallet Information
easteregg Jun 2, 2019
622cfe5
Add Price movement and p/l column
easteregg Jun 2, 2019
5a0b012
Change badge transactions to normal text
easteregg Jun 2, 2019
c36677d
Add Transfer Icon
easteregg Jun 2, 2019
7f5fec8
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 9, 2019
797ecc8
Merge branch 'add-design-elements-to-reports' of github.com:easteregg…
msamprz Jun 12, 2019
70c68e5
Merge pull request #1 from msamprz/reports-redesign
easteregg Jun 12, 2019
3f4b809
Add CompositeCalendar Component
easteregg Jun 9, 2019
10529a6
Revert "Change badge transactions to normal text"
easteregg Jun 12, 2019
989f41f
+ Addressed ESLint issues
msamprz Jun 12, 2019
9e0bbce
Merge branch 'add-design-elements-to-reports' of github.com:easteregg…
msamprz Jun 12, 2019
7e0c0d8
Merge pull request #2 from msamprz/reports-redesign
easteregg Jun 12, 2019
d654eaf
+ Added `IconDemo` to icons
msamprz Jun 12, 2019
9e5349c
Added popover to market symbol icons
msamprz Jun 12, 2019
39d7f39
+ Set `active_symbols` on trade `init()`
msamprz Jun 13, 2019
1389326
Merge pull request #3 from msamprz/reports-redesign
easteregg Jun 13, 2019
b73024f
resolve conflict
zaki-hanafiah Jun 13, 2019
f3e9665
fix underwhyling typo
zaki-hanafiah Jun 13, 2019
43ed09b
popover fest time
zaki-hanafiah Jun 13, 2019
9ecdcbd
Fix two-month-pop-up
easteregg Jun 16, 2019
21917a2
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 16, 2019
77472a9
Merge pull request #4 from zakibinary/contract_and_reports_update
easteregg Jun 16, 2019
a9220c8
Fix Bad merge conflict
easteregg Jun 16, 2019
3906e35
Add Statement Filter
easteregg Jun 18, 2019
485a072
Fix Failing tests
easteregg Jun 18, 2019
2716259
ˆ
easteregg Jun 18, 2019
076a789
Remove unused filter component
easteregg Jun 18, 2019
b1aa9f5
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 18, 2019
9217be2
remove From the start label
easteregg Jun 18, 2019
840c4f1
Remove onclick when hidden
easteregg Jun 18, 2019
a42673e
Remove unused string
easteregg Jun 18, 2019
54ccadb
Update src/javascript/app/App/Components/Form/CompositeCalendar/compo…
easteregg Jun 18, 2019
4a2afa9
Fix import spaces
easteregg Jun 18, 2019
294f528
Merge remote-tracking branch 'origin/add-design-elements-to-reports' …
easteregg Jun 18, 2019
8249f54
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 18, 2019
a6e7e4a
Make Icons clickable
easteregg Jun 18, 2019
7fc9a45
Add Placeholder for inputs
easteregg Jun 18, 2019
d2a6800
Add Light theme support for datepickers
easteregg Jun 18, 2019
44b42e9
Change design of input fields
easteregg Jun 19, 2019
3b2523c
Update dark theme input backgrounds
easteregg Jun 19, 2019
31f93c3
Update Validation ranges
easteregg Jun 19, 2019
180d2a2
Validation for date-pickers
easteregg Jun 19, 2019
a8bebf6
Disable direct date manipulation
easteregg Jun 19, 2019
35e659c
Fix order of columns in open positions
easteregg Jun 19, 2019
c100b86
Highlight today
easteregg Jun 19, 2019
90fa7d3
Fix footer color data-table
easteregg Jun 19, 2019
ce07f66
Add Sameday support
easteregg Jun 19, 2019
d1e9d0a
fix profit-loss text
easteregg Jun 19, 2019
576a485
save report filter state when going into contract mode
easteregg Jun 19, 2019
27c5bab
fix indicative cell icon
easteregg Jun 19, 2019
d382e92
Fix placeholder colors
easteregg Jun 20, 2019
97465a2
Add Fast-forward button to two-month date picker
easteregg Jun 23, 2019
8fcc2fe
Prevent cached data to be displayed when switching accounts when stat…
easteregg Jun 23, 2019
ac018f0
Fix Partially Loading Profit Table data and Statement, with debouncin…
easteregg Jun 23, 2019
0b0ac78
remove total potential payout from the footer
easteregg Jun 24, 2019
a1492cd
Put a fallback loader for currency config
easteregg Jun 24, 2019
e2c4552
Bring back tick-stream
easteregg Jun 24, 2019
4f38445
Add missing icons
easteregg Jun 24, 2019
7f7051c
Fix unsupported icons
easteregg Jun 24, 2019
52d4d79
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 24, 2019
78cc0cb
Use proper key to detect loginid change
easteregg Jun 25, 2019
d1028e9
Fix tick step colors
easteregg Jun 25, 2019
e26fdb1
fix indicative
easteregg Jun 25, 2019
2710d05
Fix datefrom partial load
easteregg Jun 25, 2019
81c4e19
Fix showing Resale status in the table_footer
easteregg Jun 25, 2019
9c2d731
fix indicative alignment and movement
easteregg Jun 25, 2019
d464135
Speedup mounting
easteregg Jun 25, 2019
7448eeb
Left align sell_time and purchase_time
easteregg Jun 25, 2019
53244be
Fix eslint
easteregg Jun 25, 2019
3813dcd
compact tabel data
easteregg Jun 26, 2019
6907661
Fix partially loading items
easteregg Jun 26, 2019
07f0bcb
Fix test cases
easteregg Jun 26, 2019
a506f6c
Fix partial loading of now items when filtering the past
easteregg Jun 27, 2019
1cc1eb5
Fix Loading previous dates
easteregg Jun 27, 2019
8695106
Add sensible default for date_to
easteregg Jun 27, 2019
f744e0c
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jun 27, 2019
9690b69
Fix setting date_to to tomorrow instead of today, on all time
easteregg Jun 27, 2019
e5a9f03
Fix statement date-filter not showing up
easteregg Jun 30, 2019
f4b03bf
Use React window to boost performance
easteregg Jun 30, 2019
46de57c
Add Resize listener
easteregg Jul 1, 2019
2a8bbfd
Do not push the cache if the result is empty
easteregg Jul 1, 2019
c7eb73d
Use store instead of internal state
easteregg Jul 1, 2019
0f4f142
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jul 2, 2019
dede17e
Add Localized Market name and category
easteregg Jul 2, 2019
cbb3efa
Refactor Conditions for more readability
easteregg Jul 2, 2019
ab10694
Merge branch 'dev' into add-design-elements-to-reports
easteregg Jul 3, 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 @@ -19,6 +19,7 @@ const CalendarHeader = ({
calendar_view,
disable_month_selector,
disable_year_selector,
hide_disabled_periods,
isPeriodDisabled,
navigateTo,
switchView,
Expand All @@ -42,20 +43,26 @@ const CalendarHeader = ({
const is_next_month_disabled = isPeriodDisabled(addMonths(moment_date, 1), 'month');
const is_next_year_disabled = isPeriodDisabled(addYears(moment_date, num_of_years), 'month');
const is_select_year_disabled = isPeriodDisabled(moment_date.clone().year(end_of_decade), 'year') || disable_year_selector;
const should_hide_next_month = is_next_month_disabled && hide_disabled_periods;
const should_hide_prev_month = is_prev_month_disabled && hide_disabled_periods;
const should_hide_prev_year = is_prev_year_disabled && hide_disabled_periods;
const should_hide_next_year = is_next_year_disabled && hide_disabled_periods;

return (
<div className='calendar__header'>
<CalendarButton
className={classNames('calendar__nav calendar__nav--prev-year', {
'calendar__nav--disabled': is_prev_year_disabled,
'calendar__nav--disabled' : is_prev_year_disabled,
'calendar__nav--is-hidden': should_hide_prev_year,
})}
onClick={is_prev_year_disabled ? undefined : () => navigateTo(subYears(calendar_date, num_of_years))}
easteregg marked this conversation as resolved.
Show resolved Hide resolved
>
<Icon icon='IconChevronDoubleLeft' className='calendar__icon' />
</CalendarButton>
<CalendarButton
className={classNames('calendar__nav calendar__nav--prev-month', {
'calendar__nav--disabled': is_prev_month_disabled,
'calendar__nav--disabled' : is_prev_month_disabled,
'calendar__nav--is-hidden': should_hide_prev_month,
})}
is_hidden={!is_date_view}
onClick={is_prev_month_disabled ? undefined : () => navigateTo(subMonths(calendar_date, 1))}
easteregg marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -96,7 +103,8 @@ const CalendarHeader = ({

<CalendarButton
className={classNames('calendar__nav calendar__nav--next-month', {
'calendar__nav--disabled': is_next_month_disabled,
'calendar__nav--disabled' : is_next_month_disabled,
'calendar__nav--is-hidden': should_hide_next_month,
})}
is_hidden={!is_date_view}
onClick={is_next_month_disabled ? undefined : () => navigateTo(addMonths(calendar_date, 1))}
Expand All @@ -105,7 +113,8 @@ const CalendarHeader = ({
</CalendarButton>
<CalendarButton
className={classNames('calendar__nav calendar__nav--next-year', {
'calendar__nav--disabled': is_next_year_disabled,
'calendar__nav--disabled' : is_next_year_disabled,
'calendar__nav--is-hidden': should_hide_next_year,
})}
onClick={is_next_year_disabled ? undefined : () => navigateTo(addYears(calendar_date, num_of_years))}
easteregg marked this conversation as resolved.
Show resolved Hide resolved
>
Expand All @@ -116,10 +125,15 @@ const CalendarHeader = ({
};

CalendarHeader.propTypes = {
calendar_date : PropTypes.string,
calendar_date: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
PropTypes.number,
]),
calendar_view : PropTypes.string,
disable_month_selector: PropTypes.bool,
disable_year_selector : PropTypes.bool,
hide_disabled_periods : PropTypes.bool,
isPeriodDisabled : PropTypes.func,
navigateTo : PropTypes.func,
switchView : PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const getDays = ({
calendar_date,
date_format,
has_range_selection,
hide_others,
holidays,
hovered_date,
isPeriodDisabled,
Expand Down Expand Up @@ -104,6 +105,7 @@ const getDays = ({
'calendar__cell--active-duration': is_active && has_range_selection && !is_today,
'calendar__cell--today-duration' : is_today && has_range_selection,
'calendar__cell--disabled' : is_disabled,
'calendar__cell--is-hidden' : is_other_month && hide_others,
'calendar__cell--other' : is_other_month,
'calendar__cell--between-hover' : is_between_hover && has_range_selection,
'calendar__cell--between' : is_between && has_range_selection,
Expand Down
13 changes: 11 additions & 2 deletions src/javascript/app/App/Components/Elements/Label/label.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ const available_modes = [
'warn',
'danger',
'info',
'success-invert',
'warn-invert',
];

const Label = ({ mode, children }) => {
const available_sizes = [
'regular',
'large',
];

const Label = ({ mode, children, size = 'regular' }) => {
const type = available_modes.some(m => m === mode) ? mode : 'default';
const scale = available_sizes.some(s => s === size) ? size : 'regular';

return (
<span className={classNames('label', {
[`label--${type}`]: type,
[`label--${scale}`]: scale,
[`label--${type}`] : type,
})}
>{children}
</span>
Expand Down
16 changes: 10 additions & 6 deletions src/javascript/app/App/Components/Elements/Popover/popover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Popover extends React.PureComponent {
is_open : !this.state.is_open && Boolean(this.props.message),
target_rectangle: this.target_reference.current.getBoundingClientRect(),
});
}
};

render() {
const {
Expand All @@ -35,6 +35,7 @@ class Popover extends React.PureComponent {
classNameBubble,
classNameTarget,
classNameTargetIcon,
disable_target_icon,
has_error,
icon,
margin,
Expand All @@ -49,11 +50,13 @@ class Popover extends React.PureComponent {
onMouseLeave={this.toggleIsOpen}
>
<div className={classNames(classNameTarget, 'popover__target')} ref={this.target_reference}>
<i className={message ? 'popover__target__icon' : 'popover__target__icon--disabled'}>
{(icon === 'info') && <Icon icon='IconInfoOutline' className={icon_class_name} /> }
{(icon === 'question') && <Icon icon='IconQuestion' className={icon_class_name} />}
{(icon === 'dot') && <Icon icon='IconRedDot' className={icon_class_name} />}
</i>
{ !disable_target_icon &&
<i className={message ? 'popover__target__icon' : 'popover__target__icon--disabled'}>
{(icon === 'info') && <Icon icon='IconInfoOutline' className={icon_class_name} /> }
{(icon === 'question') && <Icon icon='IconQuestion' className={icon_class_name} />}
{(icon === 'dot') && <Icon icon='IconRedDot' className={icon_class_name} />}
</i>
}

{ children }
</div>
Expand All @@ -79,6 +82,7 @@ Popover.propTypes = {
classNameBubble : PropTypes.string,
classNameTarget : PropTypes.string,
classNameTargetIcon: PropTypes.string,
disable_target_icon: PropTypes.bool,
has_error : PropTypes.bool,
icon : PropTypes.string,
margin : PropTypes.number,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import classNames from 'classnames';
import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import Icon from 'Assets/icon.jsx';
Expand All @@ -7,6 +8,7 @@ class VerticalTabContentContainer extends React.PureComponent {
render() {
const {
action_bar,
action_bar_classname,
is_routed,
items,
selected,
Expand All @@ -17,11 +19,17 @@ class VerticalTabContentContainer extends React.PureComponent {
return (
<div className='vertical-tab__content'>
{ action_bar &&
<div className='vertical-tab__action-bar'>
<div className={classNames('vertical-tab__action-bar', {
[action_bar_classname]: !!action_bar_classname,
})}
>
{
action_bar.map(({ icon, onClick, title }) => (
<Icon className='vertical-tab__action-bar--icon' key={title} icon={icon} onClick={onClick} />
))
action_bar.map(({ component, icon, onClick, title }) => {
const Component = component;
return (
component ? <Component key={title} /> : <Icon className='vertical-tab__action-bar--icon' key={title} icon={icon} onClick={onClick} />
);
})
}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class VerticalTab extends React.PureComponent {
/>
<VerticalTabContentContainer
action_bar={this.props.action_bar}
action_bar_classname={this.props.action_bar_classname}
items={this.props.list}
selected={this.state.selected}
is_routed={this.props.is_routed}
Expand All @@ -59,16 +60,18 @@ class VerticalTab extends React.PureComponent {
VerticalTab.propTypes = {
action_bar: PropTypes.arrayOf(
PropTypes.shape({
icon : PropTypes.string,
onClick: PropTypes.func,
title : PropTypes.string,
component: PropTypes.func,
icon : PropTypes.string,
onClick : PropTypes.func,
title : PropTypes.string,
})
),
current_path : PropTypes.string,
header_title : PropTypes.string,
is_full_width: PropTypes.bool,
is_routed : PropTypes.bool,
list : PropTypes.arrayOf(
action_bar_classname: PropTypes.string,
current_path : PropTypes.string,
header_title : PropTypes.string,
is_full_width : PropTypes.bool,
is_routed : PropTypes.bool,
list : PropTypes.arrayOf(
PropTypes.shape({
default: PropTypes.bool,
icon : PropTypes.string,
Expand Down
Loading