Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Commit 58e9517

Browse files
authored
Refactor: wire backlog page to overmind (#50)
* refactor: remove unused settings and wire up existing to overmind * refactor: move components around on summary page * style: fix styles for dropdown * style: fix styles for checkbox * refactor: migrate sorting and ordering to overmind * feat: styling fixes as well as empty state for the issues table * style: better image for empty state * feat: change navbar title via context * fix: resolve focus issues in Dropdown * feat: different empty state for empty search
1 parent 28a2bcd commit 58e9517

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1317
-1225
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
2,
8585
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
8686
],
87+
"implicit-arrow-linebreak": ["error", "beside"],
8788
"import/no-extraneous-dependencies": [
8889
"error",
8990
{

main/redmine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const createRequestClient = () => {
7979
method: data.method || 'GET',
8080
headers: data.headers,
8181
json: data.body,
82-
serchParams: data.query
82+
searchParams: data.query
8383
});
8484

8585
console.log(response.statusCode, response.body);

main/transformers/issues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const transform = (route, responseBody) => {
99
project: issue.project,
1010
tracker: issue.tracker,
1111
status: issue.status,
12-
proprity: issue.priority,
12+
priority: issue.priority,
1313
author: issue.author,
1414
assignee: issue.assigned_to,
1515
subject: issue.subject,

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@
164164
"rc-slider": "^9.2.1",
165165
"react": "^17.0.2",
166166
"react-confirm-alert": "^2.5.0",
167+
"react-cool-inview": "^2.0.8",
167168
"react-day-picker": "^7.4.0",
168169
"react-dom": "^17.0.2",
170+
"react-focus-lock": "^2.6.0",
169171
"react-redux": "^6.0.1",
170172
"react-responsive-modal": "^3.6.0",
171173
"react-router-dom": "^5.3.0",

render/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const Routes = ({ dispatch }) => {
105105
return (
106106
<Switch>
107107
<Route path="/" exact component={LoginView} />
108-
<Route path="/app" exact component={(props) => <AppView {...props} />} />
108+
<Route path="/app" exact component={AppView} />
109109
</Switch>
110110
);
111111
};

render/about/__tests__/AboutPage.spec.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ThemeProvider } from 'styled-components';
66
import { version } from '../../../package.json';
77

88
import AboutPage from '../AboutPage';
9-
import theme from '../../theme';
9+
import { theme } from '../../theme';
1010

1111
describe('About page', () => {
1212
afterEach(cleanup);

render/about/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
33
import { ThemeProvider } from 'styled-components';
44

55
import AboutPage from './AboutPage';
6-
import theme from '../theme';
6+
import { theme } from '../theme';
77

88
try {
99
// eslint-disable-next-line import/no-extraneous-dependencies, global-require

render/assets/empty-search-state.png

141 KB
Loading

render/assets/empty-state.jpg

139 KB
Loading

render/components/Button.jsx

Lines changed: 10 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ const StyledButton = styled.button`
88
font-size: 14px;
99
outline: none;
1010
text-align: center;
11-
12-
${(props) => css`
11+
12+
${props => css`
1313
background: ${props.theme.bg};
1414
transition: color ease ${props.theme.transitionTime};
1515
transition: background ease ${props.theme.transitionTime};
1616
width: ${props.block ? '100%' : 'auto'};
1717
`}
1818
19-
${(props) => {
19+
${props => {
2020
if (!props.disabled) {
2121
return css`
22-
border: 2px solid ${props.palette.light};
22+
border: 2px solid ${props.palette.light};
2323
color: ${props.palette.light};
2424
cursor: pointer;
25-
25+
2626
&:hover,
2727
&:focus {
28-
background: ${props.palette.light};
28+
background: ${props.palette.light};
2929
color: ${props.theme.hoverText} !important;
3030
3131
svg {
@@ -46,42 +46,7 @@ const StyledButton = styled.button`
4646
fill: ${props.theme.minorText};
4747
}
4848
`;
49-
}
50-
}
51-
`;
52-
53-
const StyledLink = styled.a`
54-
text-decoration: none;
55-
color: ${(props) => props.theme.main};
56-
transition: color ease ${(props) => props.theme.transitionTime};
57-
58-
${(props) => {
59-
if (!props.disabled) {
60-
return css`
61-
&:hover {
62-
color: ${props.theme.mainDark};
63-
64-
svg {
65-
fill: ${props.theme.mainDark}
66-
}
67-
}
68-
`;
69-
}
70-
return css`
71-
color: ${props.theme.minorText};
72-
73-
svg {
74-
fill: ${props.theme.minorText};
75-
}
76-
`;
77-
}
78-
}
79-
80-
&:active,
81-
&:focus,
82-
&:visited {
83-
background: transparent;
84-
}
49+
}}
8550
`;
8651

8752
class Button extends Component {
@@ -109,18 +74,11 @@ class Button extends Component {
10974
dark: theme.mainDark
11075
};
11176
}
112-
}
77+
};
11378

11479
render() {
11580
const {
116-
id,
117-
children,
118-
type,
119-
disabled,
120-
block,
121-
onClick,
122-
theme,
123-
className
81+
id, children, type, disabled, block, onClick, theme, className
12482
} = this.props;
12583
return (
12684
<StyledButton
@@ -140,10 +98,7 @@ class Button extends Component {
14098
}
14199

142100
Button.propTypes = {
143-
id: PropTypes.oneOfType([
144-
PropTypes.string,
145-
PropTypes.number
146-
]),
101+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
147102
theme: PropTypes.object.isRequired,
148103
children: PropTypes.node.isRequired,
149104
type: PropTypes.oneOf(['button', 'submit']),
@@ -163,54 +118,4 @@ Button.defaultProps = {
163118
className: undefined
164119
};
165120

166-
class GhostButton extends Component {
167-
preventDefault = (e) => {
168-
e.preventDefault();
169-
e.persist();
170-
const { onClick, disabled } = this.props;
171-
if (onClick && !disabled) {
172-
onClick(e);
173-
}
174-
}
175-
176-
render() {
177-
const {
178-
id, children, disabled, className
179-
} = this.props;
180-
return (
181-
<StyledLink
182-
id={id}
183-
onClick={this.preventDefault}
184-
href="#"
185-
disabled={disabled}
186-
className={className}
187-
>
188-
{children}
189-
</StyledLink>
190-
);
191-
}
192-
}
193-
194-
GhostButton.propTypes = {
195-
id: PropTypes.oneOfType([
196-
PropTypes.string,
197-
PropTypes.number
198-
]),
199-
children: PropTypes.node.isRequired,
200-
disabled: PropTypes.bool,
201-
onClick: PropTypes.func,
202-
className: PropTypes.string,
203-
};
204-
205-
GhostButton.defaultProps = {
206-
id: undefined,
207-
disabled: false,
208-
onClick: undefined,
209-
className: undefined
210-
};
211-
212-
export {
213-
GhostButton
214-
};
215-
216121
export default withTheme(Button);

0 commit comments

Comments
 (0)