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

Ameerul /Bug 69674 Improve floating rate field to handle large rate values #6286

Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6d23a31
changed the margin-top for mobile view for buy-sell
ameerul-deriv May 10, 2022
85f305c
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv May 11, 2022
39a2b7b
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv May 17, 2022
b2366f6
merging upstream master
ameerul-deriv May 18, 2022
da78191
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv Aug 5, 2022
bbb6bfe
changed the payment methods list modal and wrapped the text for long …
ameerul-deriv Aug 5, 2022
11f316e
reverted changes
ameerul-deriv Aug 10, 2022
da89aaa
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv Aug 10, 2022
3202114
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv Aug 11, 2022
11f4d7c
Merge branch 'master' of github.com:binary-com/deriv-app
ameerul-deriv Aug 25, 2022
2e52c28
changed floating rate field and ad type styling
ameerul-deriv Aug 25, 2022
297796b
removed code from other PR
ameerul-deriv Aug 25, 2022
9602eb7
changed input field value text
ameerul-deriv Aug 25, 2022
49ec992
removed local currency from market rate
ameerul-deriv Aug 25, 2022
8645ae3
Merge branch 'master' of github.com:binary-com/deriv-app into bug-696…
ameerul-deriv Aug 25, 2022
fa9b863
changed floating rate spec file
ameerul-deriv Aug 25, 2022
ca122b5
Merge branch 'master' of github.com:binary-com/deriv-app into bug-696…
ameerul-deriv Aug 26, 2022
ec3a222
Merge branch 'master' of github.com:binary-com/deriv-app into bug-696…
ameerul-deriv Sep 28, 2022
18cc477
changed floating rate msg font size to small
ameerul-deriv Sep 28, 2022
9d9e4e5
fixed font size
ameerul-deriv Sep 28, 2022
6fea84f
fixed conflicts
ameerul-deriv Oct 17, 2022
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 @@ -39,6 +39,6 @@ describe('<FloatingRate/>', () => {
it('should render the exchange rate in hint', () => {
render(<FloatingRate fiat_currency='AED' local_currency='INR' />);

expect(screen.getByText('1 AED = 100.00 INR')).toBeInTheDocument();
expect(screen.getByText('1 AED = 100.00')).toBeInTheDocument();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

took away local currency here as it doesn't need to have the local currency displayed in floating rate field anymore

});
});
3 changes: 1 addition & 2 deletions packages/p2p/src/components/floating-rate/floating-rate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ const FloatingRate = ({
className='floating-rate__mkt-rate--msg'
>
1 {fiat_currency} ={' '}
{removeTrailingZeros(formatMoney(local_currency, floating_rate_store.exchange_rate, true, 6))}{' '}
{local_currency}
{removeTrailingZeros(formatMoney(local_currency, floating_rate_store.exchange_rate, true, 6))}
</Text>
</div>
</section>
Expand Down
4 changes: 2 additions & 2 deletions packages/p2p/src/components/my-ads/ad-type.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import './ad-type.scss';

const AdType = ({ float_rate }) => {
return (
<div className='ad-type'>
<Text as='span' size='xxs' weight='normal' line_height='xs' className='ad-type__badge'>
<div className='ad-types'>
<Text as='span' size='xxs' weight='normal' line_height='xs' className='ad-types__badge'>
{localize('Float')}
</Text>
<Text as='span' size='xxs' weight='normal' line_height='xxs'>
Expand Down
10 changes: 7 additions & 3 deletions packages/p2p/src/components/my-ads/ad-type.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
.ad-type {
.ad-types {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to change the className as it wasn't rendering into the row. display: flex kept on getting overridden by another class when using ad-type className

display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;

@include mobile {
justify-content: flex-end;
}

&__badge {
align-items: center;
border-radius: 0.4rem;
border: 1px solid var(--border-normal);
display: flex;
flex-direction: row;
margin: 0.25rem;
margin: 0.3rem 0.5rem 0.3rem 0;
padding: 0.1rem 0.8rem;
width: fit-content;
}
Expand Down