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

[DTRA] Maryia/DTRA-1632/fix: Chart Scroll Behavior improvement for V2 #16434

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
21 changes: 14 additions & 7 deletions packages/trader/src/AppV2/Components/BottomNav/bottom-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,48 @@

&-container {
display: flex;
padding: var(--core-spacing-400);
padding: var(--core-spacing-200) var(--core-spacing-400);
align-items: flex-start;
gap: var(--core-spacing-500);
width: 100%;
height: var(--core-size-2800);
border-top: 1px solid var(--core-color-opacity-black-100); // waiting on quill tokens in deriv-app
background-color: var(--core-color-solid-slate-50);
}

&-selection {
flex: 1;
overflow: auto;
-ms-overflow-style: none;
scrollbar-width: none;
}

&-item {
all: unset;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1 0 0;
height: var(--core-size-2100);
height: var(--core-size-2400);

&--active {
.bottom-nav-item-label {
color: var(--core-color-opacity-coral-600);
}
svg {
fill: var(--core-color-opacity-coral-600);
svg,
svg path {
fill: var(--core-color-opacity-coral-600) !important;
}
}

&-label {
font-size: var(--core-fontSize-50);
line-height: var(--core-lineHeight-100);
}
span {
width: var(--core-size-1200);
height: var(--core-size-1200);
display: flex;
align-items: center;
justify-content: center;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const BottomNav = observer(({ children, className, onScroll }: BottomNavProps) =
{
icon: (
<LegacyMarketBasketIndicesIcon
iconSize='sm'
iconSize='xs'
fill='var(--semantic-color-monochrome-textIcon-normal-high)'
/>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ const TradeParametersContainer = ({
is_minimized_visible,
}: React.PropsWithChildren<TTradeParametersContainer>) =>
is_minimized ? (
<CSSTransition
in={is_minimized_visible}
timeout={0}
classNames={{
appear: 'trade-params__options__wrapper--minimized--enter',
enter: 'trade-params__options__wrapper--minimized--enter',
enterDone: 'trade-params__options__wrapper--minimized--enter-done',
exit: 'trade-params__options__wrapper--minimized--exit',
}}
unmountOnExit
>
{children}
</CSSTransition>
<div className='trade-params--minimized'>
<CSSTransition
in={is_minimized_visible}
timeout={0}
classNames={{
appear: 'trade-params__options__wrapper--minimized--enter',
enter: 'trade-params__options__wrapper--minimized--enter',
enterDone: 'trade-params__options__wrapper--minimized--enter-done',
exit: 'trade-params__options__wrapper--minimized--exit',
}}
unmountOnExit
>
{children}
</CSSTransition>
</div>
) : (
<section className='trade-params'>
<div className='trade-params__title'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
align-items: center;
justify-content: space-between;
}

&__options__wrapper {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -60,7 +59,6 @@
}
}
}

&__option {
&--minimized {
width: 16rem;
Expand All @@ -73,4 +71,8 @@
padding-inline-start: 0;
}
}
&--minimized {
height: var(--core-size-3600);
width: 100%;
}
}
2 changes: 1 addition & 1 deletion packages/trader/src/AppV2/Containers/Trade/trade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Trade = observer(() => {
if (current_chart_ref) {
const chart_bottom_Y = current_chart_ref.getBoundingClientRect().bottom;
const container_bottom_Y = window.innerHeight - HEIGHT.BOTTOM_NAV;
setIsMinimizedParamsVisible(chart_bottom_Y < container_bottom_Y);
setIsMinimizedParamsVisible(chart_bottom_Y <= container_bottom_Y);
}
}, []);

Expand Down
Loading