Skip to content

Commit

Permalink
Make height consistent on all row in send-content (#6480)
Browse files Browse the repository at this point in the history
* Update all send-content row to 54px height

* Remove header subtitle

* Remove tests that check for send screen subheader
  • Loading branch information
chikeichan authored and danjm committed Apr 18, 2019
1 parent ed23801 commit 3519e90
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
3 changes: 0 additions & 3 deletions test/integration/lib/send-new-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ async function runSendFlowTest (assert, done) {
const sendTitle = await queryAsync($, '.page-container__title')
assert.equal(sendTitle[0].textContent, 'Send ETH', 'Send screen title is correct')

const sendCopy = await queryAsync($, '.page-container__subtitle')
assert.equal(sendCopy[0].textContent, 'Only send ETH to an Ethereum address.', 'Send screen has copy')

const sendFromField = await queryAsync($, '.send-v2__form-field')
assert.ok(sendFromField[0], 'send screen has a from field')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
.gas-price-button-group--small {
display: flex;
justify-content: stretch;
height: 54px;

@media screen and (max-width: $break-small) {
max-width: 260px;
Expand All @@ -80,10 +81,14 @@

&__label {
font-weight: 500;
line-height: 16px;
padding-bottom: 4px;
}

&__primary-currency {
font-size: 12px;
line-height: 12px;
padding-bottom: 2px;

@media screen and (max-width: 575px) {
font-size: 10px;
Expand All @@ -92,6 +97,8 @@

&__secondary-currency {
font-size: 12px;
line-height: 12px;
padding-bottom: 2px;

@media screen and (max-width: 575px) {
font-size: 10px;
Expand All @@ -105,11 +112,7 @@
.button-group__button, .button-group__button--active {
background: white;
color: $scorpion;
padding: 2px 8.5px 4px 8.5px;

@media screen and (max-width: $break-small) {
padding-left: 4px;
}
padding: 0 4px;

div {
display: flex;
Expand Down
11 changes: 9 additions & 2 deletions ui/app/components/ui/unit-input/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
border-radius: 4px;
background-color: #fff;
color: #4d4d4d;
font-size: 1rem;
font-size: 16px;
padding: 8px 10px;
position: relative;

Expand All @@ -29,6 +29,8 @@

&__inputs {
flex: 1 0 auto;
display: flex;
flex-flow: column nowrap;
}

&__input {
Expand All @@ -38,15 +40,20 @@
border: none;
outline: 0 !important;
max-width: 22ch;
height: 16px;
line-height: 18px;
}

&__input-container {
display: flex;
align-items: center;
align-items: flex-start;
padding-bottom: 4px;
}

&__suffix {
margin-left: 3px;
font-size: 1rem;
line-height: 1rem;
}

&--error {
Expand Down
14 changes: 11 additions & 3 deletions ui/app/css/itcss/components/send.scss
Original file line number Diff line number Diff line change
Expand Up @@ -633,14 +633,14 @@
}

&__asset-dropdown {
height: 62px;
height: 54px;
border: none;

&__asset {
display: flex;
flex-flow: row nowrap;
align-items: center;
padding: 10px 8px;
padding: 0 8px;
cursor: pointer;

&:hover {
Expand Down Expand Up @@ -688,22 +688,30 @@
border-radius: 4px;
background-color: $white;
box-shadow: 0 3px 6px 0 rgba(0 ,0 ,0 ,.11);
top: 55px;
top: 65px;
left: 0;
box-sizing: content-box;
overflow-y: scroll;
margin-top: 0;
padding: 4px 0;

.send-v2__asset-dropdown__asset {
padding: 8px;
}
}

&__input-wrapper {
border: 1px solid $alto;
border-radius: 4px;
height: 100%;

&--opened {
position: relative;
z-index: 2050;
}

.send-v2__asset-dropdown__asset {
height: 100%;
&:hover {
background-color: $white;
}
Expand Down
1 change: 0 additions & 1 deletion ui/app/pages/send/send-header/send-header.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class SendHeader extends Component {
return (
<PageContainerHeader
onClose={() => this.onClose()}
subtitle={this.context.t(...this.props.subtitleParams)}
title={this.context.t(this.props.titleKey)}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ describe('SendHeader Component', function () {
it('should pass the correct props to PageContainerHeader', () => {
const {
onClose,
subtitle,
title,
} = wrapper.find(PageContainerHeader).props()
assert.equal(subtitle, 'mockSubtitleKeymockVal')
assert.equal(title, 'mockTitleKey')
assert.equal(SendHeader.prototype.onClose.callCount, 0)
onClose()
Expand Down

0 comments on commit 3519e90

Please sign in to comment.