Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# NPM
/node_modules
npm-*
/package-lock.json

# Testing
/.nyc_output
Expand Down
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
- NODE_ENV=production
- SMOKE_URL=https://llk.github.io/scratch-gui/$TRAVIS_PULL_REQUEST_BRANCH
- NPM_TAG=latest
- RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')"
cache:
directories:
- node_modules
Expand All @@ -22,8 +23,8 @@ script:
before_deploy:
- >
if [ -z "$BEFORE_DEPLOY_RAN" ]; then
npm --no-git-tag-version version 0.1.0-prerelease.$(date +%Y%m%d%H%M%S)
if [ "$TRAVIS_BRANCH" == "develop" ]; then export NPM_TAG=develop; fi
npm --no-git-tag-version version $RELEASE_VERSION
if [ "$TRAVIS_BRANCH" == "master" ]; then export NPM_TAG=stable; fi
git config --global user.email $(git log --pretty=format:"%ae" -n1)
git config --global user.name $(git log --pretty=format:"%an" -n1)
export BEFORE_DEPLOY_RAN=true
Expand All @@ -40,6 +41,15 @@ deploy:
email: $NPM_EMAIL
api_key: $NPM_TOKEN
tag: $NPM_TAG
- provider: script
on:
branch:
- master
- develop
- smoke
condition: $TRAVIS_EVENT_TYPE != cron
skip_cleanup: true
script: if npm info scratch-gui | grep -q $RELEASE_VERSION; then git tag $RELEASE_VERSION && git push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git $RELEASE_VERSION; fi
- provider: s3
on:
branch:
Expand All @@ -58,11 +68,6 @@ deploy:
condition: $TRAVIS_EVENT_TYPE != cron
skip_cleanup: true
script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- provider: script
on:
all_branches: true
condition: $TRAVIS_EVENT_TYPE != cron
script: npm run prune -- https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- provider: script
on:
branch: develop
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install https://github.com/LLK/scratch-gui.git
```
If you want to edit/play yourself:
```bash
git clone git@github.com:LLK/scratch-gui.git
git clone https://github.com/LLK/scratch-gui.git
cd scratch-gui
npm install
```
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"eslint": "^5.0.1",
"eslint-config-scratch": "^5.0.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-react": "7.11.1",
"file-loader": "2.0.0",
"get-float-time-domain-data": "0.1.0",
"get-user-media-promise": "1.1.4",
Expand All @@ -76,6 +76,8 @@
"lodash.throttle": "4.0.1",
"minilog": "3.1.0",
"mkdirp": "^0.5.1",
"omggif": "1.0.9",
"papaparse": "4.6.2",
"postcss-import": "^12.0.0",
"postcss-loader": "^3.0.0",
"postcss-simple-vars": "^5.0.1",
Expand All @@ -102,14 +104,14 @@
"redux-mock-store": "^1.2.3",
"redux-throttle": "0.1.1",
"rimraf": "^2.6.1",
"scratch-audio": "0.1.0-prerelease.20181023202904",
"scratch-blocks": "0.1.0-prerelease.1544625383",
"scratch-l10n": "3.1.20181210144244",
"scratch-paint": "0.2.0-prerelease.20181211153626",
"scratch-render": "0.1.0-prerelease.20181127194508",
"scratch-storage": "1.2.0",
"scratch-svg-renderer": "0.2.0-prerelease.20181126212715",
"scratch-vm": "0.2.0-prerelease.20181210154926",
"scratch-audio": "0.1.0-prerelease.20190114210212",
"scratch-blocks": "0.1.0-prerelease.1549990124",
"scratch-l10n": "3.1.20190218084652",
"scratch-paint": "0.2.0-prerelease.20190114205252",
"scratch-render": "0.1.0-prerelease.20190213183713",
"scratch-storage": "1.2.2",
"scratch-svg-renderer": "0.2.0-prerelease.20190125192231",
"scratch-vm": "0.2.0-prerelease.20190215190223",
"selenium-webdriver": "3.6.0",
"startaudiocontext": "1.2.1",
"style-loader": "^0.23.0",
Expand Down
6 changes: 4 additions & 2 deletions src/components/action-menu/action-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class ActionMenu extends React.Component {
<div className={styles.moreButtonsOuter}>
<div className={styles.moreButtons}>
{(moreButtons || []).map(({img, title, onClick: handleClick,
fileAccept, fileChange, fileInput}, keyId) => {
fileAccept, fileChange, fileInput, fileMultiple}, keyId) => {
const isComingSoon = !handleClick;
const hasFileInput = fileInput;
const tooltipId = `${this.mainTooltipId}-${title}`;
Expand All @@ -166,6 +166,7 @@ class ActionMenu extends React.Component {
<input
accept={fileAccept}
className={styles.fileInput}
multiple={fileMultiple}
ref={fileInput}
type="file"
onChange={fileChange}
Expand Down Expand Up @@ -198,7 +199,8 @@ ActionMenu.propTypes = {
onClick: PropTypes.func, // Optional, "coming soon" if no callback provided
fileAccept: PropTypes.string, // Optional, only for file upload
fileChange: PropTypes.func, // Optional, only for file upload
fileInput: PropTypes.func // Optional, only for file upload
fileInput: PropTypes.func, // Optional, only for file upload
fileMultiple: PropTypes.bool // Optional, only for file upload
})),
onClick: PropTypes.func.isRequired,
title: PropTypes.node.isRequired,
Expand Down
35 changes: 27 additions & 8 deletions src/components/alerts/alert.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
display: flex;
flex-direction: row;
overflow: hidden;
justify-content: space-between;
justify-content: flex-start;
border-radius: $space;
padding: $space;
padding-top: .875rem;
padding-bottom: .875rem;
padding-left: 1rem;
padding-right: 1rem;
margin-bottom: 7px;
min-height: 1.5rem;
}
Expand All @@ -26,20 +29,28 @@
box-shadow: 0px 0px 0px 2px $extensions-light;
}

.alert-spinner {
self-align: center;
}

.icon-section {
min-width: 1.25rem;
min-height: 1.25rem;
display: flex;
padding-right: 1rem;
}

.alert-icon {
margin-left: .25rem;
margin-right: .25rem;
vertical-align: middle;
}

.alert-message {
color: #555;
font-weight: bold;
font-size: .75rem;
line-height: 14px;
font-size: .8125rem;
line-height: .875rem;
display: flex;
align-items: center;
padding-left: .5rem;
padding-right: .5rem;
}

Expand All @@ -61,6 +72,7 @@

.alert-connection-button {
min-height: 2rem;
width: 6.5rem;
padding: 0.55rem 0.9rem;
border-radius: 0.35rem;
background: #FF8C1A;
Expand All @@ -70,8 +82,9 @@
border: none;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
align-self: center;
align-self: stretch;
outline-style:none;
}

Expand All @@ -82,3 +95,9 @@
[dir="rtl"] .alert-connection-button {
margin-left: 13px;
}

/* prevent last button in list from too much margin to edge of alert */
.alert-buttons > :last-child {
margin-left: 0;
margin-right: 0;
}
23 changes: 15 additions & 8 deletions src/components/alerts/alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@ const AlertComponent = ({
className={classNames(styles.alert, styles[level])}
>
{/* TODO: implement Rtl handling */}
{iconSpinner && (
<Spinner className={styles.alertSpinner} />
)}
{iconURL && (
<img
className={styles.alertIcon}
src={iconURL}
/>
{(iconSpinner || iconURL) && (
<div className={styles.iconSection}>
{iconSpinner && (
<Spinner
className={styles.alertSpinner}
level={level}
/>
)}
{iconURL && (
<img
className={styles.alertIcon}
src={iconURL}
/>
)}
</div>
)}
<div className={styles.alertMessage}>
{extensionName ? (
Expand Down
4 changes: 4 additions & 0 deletions src/components/alerts/alerts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.alerts-inner-container {
min-width: 200px;
max-width: 548px;
}
40 changes: 22 additions & 18 deletions src/components/alerts/alerts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import PropTypes from 'prop-types';
import Box from '../box/box.jsx';
import Alert from '../../containers/alert.jsx';

import styles from './alerts.css';

const AlertsComponent = ({
alertsList,
className,
Expand All @@ -13,24 +15,26 @@ const AlertsComponent = ({
bounds="parent"
className={className}
>
{alertsList.map((a, index) => (
<Alert
closeButton={a.closeButton}
content={a.content}
extensionId={a.extensionId}
extensionName={a.extensionName}
iconSpinner={a.iconSpinner}
iconURL={a.iconURL}
index={index}
key={index}
level={a.level}
message={a.message}
showDownload={a.showDownload}
showReconnect={a.showReconnect}
showSaveNow={a.showSaveNow}
onCloseAlert={onCloseAlert}
/>
))}
<Box className={styles.alertsInnerContainer} >
{alertsList.map((a, index) => (
<Alert
closeButton={a.closeButton}
content={a.content}
extensionId={a.extensionId}
extensionName={a.extensionName}
iconSpinner={a.iconSpinner}
iconURL={a.iconURL}
index={index}
key={index}
level={a.level}
message={a.message}
showDownload={a.showDownload}
showReconnect={a.showReconnect}
showSaveNow={a.showSaveNow}
onCloseAlert={onCloseAlert}
/>
))}
</Box>
</Box>
);

Expand Down
1 change: 1 addition & 0 deletions src/components/alerts/inline-message.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const InlineMessageComponent = ({
<Spinner
small
className={styles.spinner}
level={'info'}
/>
)}
{content}
Expand Down
4 changes: 2 additions & 2 deletions src/components/asset-panel/selector.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $fade-out-distance: 100px;

.list-item {
width: 5rem;
min-height: 5rem;
height: 5rem;
margin: 0.5rem auto;
}

Expand All @@ -72,6 +72,6 @@ $fade-out-distance: 100px;


.list-item.placeholder {
background: black;
background: white;
filter: opacity(15%) brightness(0%);
}
22 changes: 21 additions & 1 deletion src/components/audio-trimmer/audio-trimmer.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ $hover-scale: 2;
left: 0;
width: 100%;
height: 100%;

/* Force the browser to paint separately to avoid composite cost with waveform */
transform: translateZ(0);
}

.trim-background {
Expand Down Expand Up @@ -50,8 +53,25 @@ $hover-scale: 2;
border: 1px solid $red-tertiary;
}

.playhead-container {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: hidden;
}

.playhead {
border: 1px solid $motion-primary;
/*
Even though playhead is just a line, it is 100% width (the width of the waveform)
so that we can use transform: translateX() using percentages.
*/
width: 100%;
border-left: 1px solid $motion-primary;
border-top: none;
border-bottom: none;
border-right: none;
}

.start-trim-line {
Expand Down
14 changes: 8 additions & 6 deletions src/components/audio-trimmer/audio-trimmer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ const AudioTrimmer = props => (
)}

{props.playhead ? (
<Box
className={classNames(styles.trimLine, styles.playhead)}
style={{
left: `${100 * props.playhead}%`
}}
/>
<div className={styles.playheadContainer}>
<div
className={classNames(styles.trimLine, styles.playhead)}
style={{
transform: `translateX(${100 * props.playhead}%)`
}}
/>
</div>
) : null}

{props.trimEnd === null ? null : (
Expand Down
Loading