Skip to content

Commit

Permalink
Merge pull request #1141 from relative-ci/update-ui
Browse files Browse the repository at this point in the history
UI updates
  • Loading branch information
vio authored Jan 5, 2021
2 parents 77a0666 + bf968b9 commit c38d203
Show file tree
Hide file tree
Showing 29 changed files with 18,591 additions and 16,533 deletions.
22 changes: 10 additions & 12 deletions packages/html-templates/src/app/header/header.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { Container } from '@bundle-stats/ui/lib-esm/ui/container';
import { JobsHeader } from '@bundle-stats/ui/lib-esm/components/jobs-header';
import { Logo } from '@bundle-stats/ui/lib-esm/ui/logo';

import css from './header.module.css';

export const Header = ({ className, jobs }) => (
<header className={cx(css.root, className)}>
<a className={css.branding} href="https://github.com/relative-ci/bundle-stats">
<Logo className={css.brandingLogo}>BundleStats</Logo>
</a>
<JobsHeader className={css.jobs} jobs={jobs} />
<div className={css.tools}>
<Logo
className={css.toolsGithub}
kind="github"
as="a"
<Container as="header" className={cx(css.root, className)}>
<div className={css.inner}>
<a
className={css.branding}
href="https://github.com/relative-ci/bundle-stats"
target="_blank"
rel="noopener noreferrer nofollow"
/>
>
<Logo className={css.brandingLogo}>BundleStats</Logo>
</a>
<JobsHeader className={css.jobs} jobs={jobs} />
</div>
</header>
</Container>
);

Header.propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions packages/html-templates/src/app/header/header.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.root {
.inner {
display: flex;
align-items: stretch;
align-items: center;
}

.branding {
Expand Down
2 changes: 1 addition & 1 deletion packages/html-templates/src/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const StandaloneApp = ({ jobs }) => {
return (
<HashRouter>
<StandaloneAppLayout jobs={jobs}>
<Container>
<Container className={css.summaryContainer}>
<Summary
data={jobs[0].summary}
showSummaryItemDelta={jobs.length !== 1}
Expand Down
14 changes: 8 additions & 6 deletions packages/html-templates/src/app/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@
text-align: center;
}

.summaryContainer {
padding-top: var(--space-large);
padding-bottom: var(--space-small);
background: var(--color-highlight);
}

.tabsContainer {
margin-top: var(--space-small);
margin-bottom: var(--space-large);
border-bottom: 1px solid var(--color-outline);
background: var(--color-highlight);
}

.tabs {
Expand Down Expand Up @@ -55,10 +61,6 @@
--header-height: 80px;
}

.root {
padding-top: calc(var(--header-height) + var(--space-large));
}

.header {
position: fixed;
z-index: 100;
Expand All @@ -68,6 +70,6 @@
height: var(--header-height);
background-color: var(--color-background);
border-bottom: 1px solid var(--color-outline);
box-shadow: 0 0 var(--space-xxsmall) var(--color-shadow);
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
}
}
2 changes: 1 addition & 1 deletion packages/ui/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
'@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-class-properties',
'babel-plugin-lodash',
['babel-plugin-inline-react-svg', { svgo: false }],
['@simplyianm/babel-plugin-inline-react-svg', { noReactAutoImport: true, svgo: false }],
],
env: {
test: {
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/build/webpack/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const StatsPlugin = require('stats-webpack-plugin');
const webpack = require('webpack');

const ROOT = path.join(__dirname, '../../');
const CONTEXT = path.join(ROOT, 'src');
Expand Down Expand Up @@ -70,6 +71,9 @@ module.exports = {
},
devtool: 'source-map',
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}),
new StatsPlugin('../artifacts/webpack-stats.json', {
all: false,
assets: true,
Expand Down
191 changes: 117 additions & 74 deletions packages/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"@babel/preset-env": "7.12.11",
"@babel/preset-react": "7.12.10",
"@bundle-stats/utils": "^2.4.0",
"@simplyianm/babel-plugin-inline-react-svg": "1.2.0",
"@storybook/addon-knobs": "6.1.11",
"@storybook/addon-storyshots": "6.1.11",
"@storybook/addons": "6.1.11",
"@storybook/react": "6.1.11",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "26.6.3",
"babel-loader": "8.2.2",
"babel-plugin-inline-react-svg": "1.1.2",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-require-context-hook": "1.0.0",
"classnames": "2.2.6",
Expand All @@ -67,6 +67,7 @@
"react": "16.14.0",
"react-dom": "16.14.0",
"react-test-renderer": "16.14.0",
"reakit": "^1.3.3",
"recompose": "0.30.0",
"stats-webpack-plugin": "0.7.0",
"style-loader": "2.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/components/bundle-assets/bundle-assets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const getRenderRowHeader = (labels) => (item) => (
<Tooltip
className={css.notPredictive}
title={<TooltipNotPredictive runs={item.runs} />}
align="topLeft"
>
<span className={cx('ui-icon ui-icon--small', css.notPredictiveIcon)}>warning</span>
</Tooltip>
Expand Down
Loading

0 comments on commit c38d203

Please sign in to comment.