-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/bureau position results card #1012
Conversation
<Row fluid className="bureau-results-card"> | ||
<Row fluid> | ||
<Row fluid style={{ display: 'flex' }} className="bureau-card--header"> | ||
<div>{detailsLink}</div> | ||
<div>{postShort}</div> | ||
{renderBidCountMobile(stats)} | ||
</Row> | ||
<Row fluid style={{ display: 'flex' }} className="bureau-card--content"> | ||
<DefinitionList itemProps={{ excludeColon: true }} items={sections[0]} style={{ display: 'flex' }} className="bureau-definition" /> | ||
</Row> | ||
<Row fluid style={{ display: 'flex' }} className="bureau-card--footer"> | ||
<DefinitionList items={sections[1]} style={{ display: 'flex' }} /> | ||
<div className="usa-grid-full" style={{ position: 'relative' }}> | ||
<InteractiveElement onClick={() => this.setState({ showMore: !showMore })} style={{ bottom: 0, position: 'absolute', right: 0 }}> | ||
<span style={{ whiteSpace: 'nowrap' }}>View {showMore ? 'less' : 'more'} </span> | ||
<FA name={`chevron-${showMore ? 'up' : 'down'}`} /> | ||
</InteractiveElement> | ||
</div> | ||
</Row> | ||
</Row> | ||
{ | ||
showMore && | ||
<Row fluid style={{ marginTop: '1em' }}> | ||
<Linkify properties={{ target: '_blank' }}> | ||
{description} | ||
</Linkify> | ||
</Row> | ||
} | ||
</Row> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to clean up the inline styles here before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍬 🍰 🥮 🎊 👍 very nice! 😸
describe('BureauPage', () => { | ||
it('mounts', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😿
@@ -1,23 +1,8 @@ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import TestUtils from 'react-dom/test-utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭
import { Row } from 'Components/Layout'; | ||
import DefinitionList from 'Components/DefinitionList'; | ||
import InteractiveElement from 'Components/InteractiveElement'; | ||
import { getResult, getBidStatsToUse, getDifferentials, renderBidCountMobile } from 'Components/ResultsCard/ResultsCard'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎
Don't think i've ever seen this used like this before. Very cool 🏅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we already had that logic built out in the ResultsCard component, so instead of re-creating or moving it to utilities, I just exported those functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep that in mind, as we build out other Bureau stuff 🆒
@@ -22,6 +23,11 @@ const Stats = (props) => { | |||
<div className="usa-grid-full bureau-page"> | |||
{placeholderText} | |||
</div> | |||
<div className="usa-grid-full"> | |||
{[1, 2, 3, 4, 5].map((m) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗺️ ❤️
import PropTypes from 'prop-types'; | ||
import { get } from 'lodash'; | ||
import FA from 'react-fontawesome'; | ||
import Linkify from 'react-linkify'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛓️
import React, { Component } from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import PropTypes from 'prop-types'; | ||
import { get } from 'lodash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only 1 for lodash? I'm disappointed....
Depends on #1006
Adds static position results card to be integrated in the future. Placed it on the Bureau Stats page for now.