Skip to content

Commit 2e1341f

Browse files
author
kaptron
committed
Adds fix for scrolling and searching; Renames app to Shape
1 parent dcb4ecb commit 2e1341f

File tree

14 files changed

+75
-41
lines changed

14 files changed

+75
-41
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ OKTA_DOMAIN=oktapreview
88
FILESTACK_API_KEY=XXXXXX
99
AWS_ACCESS_KEY_ID=XXXX
1010
AWS_SECRET_ACCESS_KEY=XXXXX
11-
S3_UPLOADS_BUCKET=oie-2-uploads-production
11+
S3_UPLOADS_BUCKET=shape-uploads-production
1212

13-
APPSIGNAL_APP_NAME=oie-2
13+
APPSIGNAL_APP_NAME=shape
1414
APPSIGNAL_PUSH_API_KEY=xxxxxxxx
1515

1616
YOUTUBE_V3_API_KEY=xxxx

.ruby-gemset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
oie
1+
shape

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ brew install postgresql
1414
Clone the app and install the gems:
1515
```
1616
git clone <clone URL>
17-
cd oie-2/
17+
cd shape/
1818
rvm install ruby 2.4.3
1919
cd ..
20-
cd oie-2/
20+
cd shape/
2121
gem install bundler
2222
bundle install
2323
yarn install

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "OIE 2.0",
2+
"name": "Shape",
33
"description": "The future of work is here.",
44
"buildpacks": [
55
{

app/javascript/ui/grid/blankContentTool/GridCardBlank.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import AddTextIcon from '~/ui/icons/AddTextIcon'
88
import AddCollectionIcon from '~/ui/icons/AddCollectionIcon'
99
import AddImageIcon from '~/ui/icons/AddImageIcon'
1010
import AddVideoIcon from '~/ui/icons/AddVideoIcon'
11+
import CloseIcon from '~/ui/icons/CloseIcon'
1112
import v, { ITEM_TYPES } from '~/utils/variables'
1213
import FilestackUpload from '~/utils/FilestackUpload'
1314
import { StyledGridCard } from '~/ui/grid/GridCard'
@@ -36,10 +37,13 @@ const StyledGridCardBlank = StyledGridCard.extend`
3637
const StyledGridCardInner = styled.div`
3738
button.close {
3839
position: absolute;
40+
top: 5px;
41+
right: 10px;
3942
color: #9b9b9b;
40-
font-size: 1.75rem;
41-
top: 0rem;
42-
right: 0.33rem;
43+
.icon {
44+
width: 12px;
45+
height: 12px;
46+
}
4347
4448
&:hover {
4549
color: black;
@@ -226,7 +230,7 @@ class GridCardBlank extends React.Component {
226230
<StyledGridCardInner>
227231
{this.renderInner()}
228232
<button className="close" onClick={this.closeBlankContentTool}>
229-
&times;
233+
<CloseIcon />
230234
</button>
231235
</StyledGridCardInner>
232236
</StyledGridCardBlank>

app/javascript/ui/icons/CloseIcon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Icon from './Icon'
22

33
const CloseIcon = () => (
44
<Icon fill>
5-
<svg width="29" height="28" viewBox="0 0 29 28" xmlns="http://www.w3.org/2000/svg">
6-
<path d="M16.584 13.897L27.836 2.645c.586-.585.586-1.536 0-2.121-.586-.586-1.535-.586-2.121 0L14.463 11.776 3.211.524c-.586-.586-1.535-.586-2.121 0-.586.585-.586 1.536 0 2.121l11.252 11.252L1.09 25.149c-.586.585-.586 1.536 0 2.121.293.293.677.439 1.061.439.384 0 .767-.146 1.06-.439l11.252-11.252L25.715 27.27c.293.293.677.439 1.061.439.384 0 .767-.146 1.06-.439.586-.585.586-1.536 0-2.121L16.584 13.897" fill="#9b9b9b" fillRule="evenodd" />
5+
<svg viewBox="0 0 29 28" xmlns="http://www.w3.org/2000/svg">
6+
<path d="M16.584 13.897L27.836 2.645c.586-.585.586-1.536 0-2.121-.586-.586-1.535-.586-2.121 0L14.463 11.776 3.211.524c-.586-.586-1.535-.586-2.121 0-.586.585-.586 1.536 0 2.121l11.252 11.252L1.09 25.149c-.586.585-.586 1.536 0 2.121.293.293.677.439 1.061.439.384 0 .767-.146 1.06-.439l11.252-11.252L25.715 27.27c.293.293.677.439 1.061.439.384 0 .767-.146 1.06-.439.586-.585.586-1.536 0-2.121L16.584 13.897" fillRule="evenodd" />
77
</svg>
88
</Icon>
99
)

app/javascript/ui/layout/Logo.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import styled from 'styled-components'
22
import { FormattedMessage } from 'react-intl'
3+
import v from '~/utils/variables'
34

45
const StyledLogo = styled.div`
56
font-size: 0.75rem;
67
letter-spacing: 0.5px;
7-
font-family: 'Gotham';
8+
font-family: ${v.fonts.sans};
89
text-transform: uppercase;
910
`
1011
const Logo = () => (
1112
<StyledLogo>
12-
<FormattedMessage id="Logo.name" defaultMessage="Innovation OS" />
13+
<FormattedMessage id="Logo.name" defaultMessage="Shape" />
1314
</StyledLogo>
1415
)
1516

app/javascript/ui/layout/SearchBar.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,23 @@ import styled from 'styled-components'
88

99
import v from '~/utils/variables'
1010
import SearchIcon from '~/ui/icons/SearchIcon'
11+
import CloseIcon from '~/ui/icons/CloseIcon'
1112

1213
const StyledSearchBar = styled.div`
1314
border-bottom: 1px solid ${props => (props.focused ? v.colors.blackLava : v.colors.cloudy)};
1415
color: ${props => (props.focused ? v.colors.blackLava : v.colors.cloudy)};
1516
height: 28px;
1617
margin-right: 16px;
1718
position: relative;
19+
width: 205px;
20+
@media only screen and (max-width: ${v.responsive.smallBreakpoint}px) {
21+
width: 140px;
22+
}
23+
1824
1925
input {
2026
display: inline-block;
27+
width: 60%;
2128
font-size: 1rem;
2229
padding-left: 14px;
2330
background: none;
@@ -39,12 +46,11 @@ const StyledSearchBar = styled.div`
3946
}
4047
.close {
4148
position: absolute;
42-
right: 0;
43-
bottom: -4px;
44-
font-size: 2.25rem;
49+
right: 2px;
50+
bottom: 10px;
4551
color: ${v.colors.cloudy};
4652
&:hover {
47-
color: ${v.colors.linkHover};
53+
color: black;
4854
}
4955
}
5056
`
@@ -118,9 +124,11 @@ class SearchBar extends React.Component {
118124
onBlur={this.handleFocus(false)}
119125
onChange={this.handleTextChange}
120126
/>
121-
<button onClick={this.clearSearch} className="close">
122-
&times;
123-
</button>
127+
{this.searchText &&
128+
<button onClick={this.clearSearch} className="close">
129+
<CloseIcon />
130+
</button>
131+
}
124132
</StyledSearchBar>
125133
)
126134
}

app/javascript/ui/pages/CollectionPage.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ReactRouterPropTypes from 'react-router-prop-types'
33
import { inject, observer, PropTypes as MobxPropTypes } from 'mobx-react'
44
import { Flex, Box } from 'reflexbox'
55
import styled from 'styled-components'
6+
import { animateScroll as scroll } from 'react-scroll'
67

78
import v from '~/utils/variables'
89
import PageWithApi from '~/ui/pages/PageWithApi'
@@ -33,6 +34,11 @@ const StyledTitleAndRoles = styled(Flex)`
3334
@inject('apiStore', 'uiStore')
3435
@observer
3536
class CollectionPage extends PageWithApi {
37+
componentDidMount() {
38+
super.componentDidMount()
39+
scroll.scrollToTop({ duration: 0 })
40+
}
41+
3642
componentWillReceiveProps(nextProps) {
3743
super.componentWillReceiveProps(nextProps)
3844
// when navigating between collections, close BCT

app/javascript/ui/pages/ItemPage.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ReactRouterPropTypes from 'react-router-prop-types'
33
import { inject, observer, PropTypes as MobxPropTypes } from 'mobx-react'
44
import styled from 'styled-components'
55
import { Link } from 'react-router-dom'
6+
import { animateScroll as scroll } from 'react-scroll'
67

78
import PageWithApi from '~/ui/pages/PageWithApi'
89
import PageContainer from '~/ui/layout/PageContainer'
@@ -12,6 +13,7 @@ import Breadcrumb from '~/ui/layout/Breadcrumb'
1213
import TextItem from '~/ui/items/TextItem'
1314
import ImageItem from '~/ui/items/ImageItem'
1415
import VideoItem from '~/ui/items/VideoItem'
16+
import CloseIcon from '~/ui/icons/CloseIcon'
1517
import v, { ITEM_TYPES } from '~/utils/variables'
1618
import EditableName from './shared/EditableName'
1719

@@ -32,18 +34,26 @@ const CloseLink = styled(Link)`
3234
text-decoration: none;
3335
color: ${v.colors.cloudy};
3436
&:hover {
35-
color: ${v.colors.linkHover};
37+
color: black;
3638
}
3739
padding: 0;
3840
height: auto;
3941
position: relative;
4042
top: -6px;
41-
font-size: 1.75rem;
43+
.icon {
44+
width: 12px;
45+
height: 12px;
46+
}
4247
`
4348

4449
@inject('apiStore')
4550
@observer
4651
class ItemPage extends PageWithApi {
52+
componentDidMount() {
53+
super.componentDidMount()
54+
scroll.scrollToTop({ duration: 0 })
55+
}
56+
4757
get item() {
4858
const { match, apiStore } = this.props
4959
if (!apiStore.items.length) return null
@@ -98,7 +108,7 @@ class ItemPage extends PageWithApi {
98108
{this.content}
99109
<StyledRightColumn>
100110
<CloseLink to={item.parentPath}>
101-
&times;
111+
<CloseIcon />
102112
</CloseLink>
103113
</StyledRightColumn>
104114
</PageContainer>

0 commit comments

Comments
 (0)