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

[BOT] Farabi/bot-1601/dbot bugs and improvements #15086

Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { toast, ToastPosition, TypeOptions } from 'react-toastify';
import { localize } from '@deriv/translations';
import { isDbotRTL } from '@deriv/bot-skeleton/src/utils/workspace';
import { localize } from '@deriv/translations';

const getToastPosition = () => {
const is_RTL = isDbotRTL();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import { toast } from 'react-toastify';
import { notification_style, TAction, TNotificationContent, TNotificationStyle } from './bot-notification-utils';

export const NotificationContent: React.FC<TNotificationContent> = ({ message, primary_action, closeToast }) => {
React.useEffect(() => {
const handleToastVisibility = () => {
if (document.visibilityState === 'hidden') {
toast.dismiss();
}
};

document.addEventListener('visibilitychange', handleToastVisibility);

return () => {
document.removeEventListener('visibilitychange', handleToastVisibility);
};
}, []);

return (
<div className='notification-content'>
<div>{message}</div>
Expand Down
3 changes: 0 additions & 3 deletions packages/bot-web-ui/src/components/download/download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ const Download = observer(({ tab }: TDownloadProps) => {
id='download-button'
is_disabled={disabled}
className='download__button'
icon={
<Icon icon='IcDbotDownload' color={disabled ? 'disabled' : undefined} className='download__icon' />
}
text={localize('Download')}
onClick={clickFunction}
secondary
Expand Down
8 changes: 8 additions & 0 deletions packages/bot-web-ui/src/components/run-panel/run-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@
justify-content: space-between;
flex-direction: column;
overflow: hidden !important;

.dc-tabs {
&__item {
overflow: hidden;
text-overflow: ellipsis;
padding: 0 0.8rem;
}
}
}
&__buttons {
display: inline-flex !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ const Transactions = observer(({ is_drawer_open }: TTransactions) => {
toggleTransactionDetailsModal(true);
}}
secondary
icon={<Icon icon='IcDbotViewDetail' size={18} />}
/>
</div>
<div className='transactions__header'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@
flex-direction: row-reverse;

@include mobile() {
top: -2.8rem;
right: 4rem;
top: -2.6rem;
right: 5rem;
}

.dc-text {
Expand Down Expand Up @@ -537,11 +537,11 @@

&__trailing-icon {
@extend .seddle-actions;
right: 0.3rem;
right: 1rem;
color: var(--text-general);

@include mobile() {
right: 0.2rem;
right: 1.6rem;
}

&:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const WorkspaceGroup = observer(() => {
</DesktopWrapper>
<DesktopWrapper>
<ToolbarIcon
popover_message={localize('Trading View Chart')}
popover_message={localize('TradingView Chart')}
icon='IcTradingViewChart'
icon_id='db-toolbar__tradingview-button'
action={() => setTradingViewModalVisibility()}
Expand Down
3 changes: 0 additions & 3 deletions packages/bot-web-ui/src/pages/dashboard/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@
text-align: center;
}
}
&:nth-last-child(2) {
padding-inline: 0;
}
}

&__images {
Expand Down
Loading