Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Dec 20, 2017
2 parents 59a1771 + 4ad5027 commit 00ba8b0
Show file tree
Hide file tree
Showing 89 changed files with 2,715 additions and 1,144 deletions.
2 changes: 1 addition & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"port": 4400,
"port": 4200,
"live-reload-port": 41954
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/*
coverage/*
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ module.exports = {
globals: {
MathJax: true
},
rules: {
'array-callback-return': 'off',
}
};
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ sudo: required
dist: trusty
addons:
chrome: stable

node_js:
8
firefox: latest

env:
global:
- SUPPRESS_NO_CONFIG_WARNING=true
- SUPPRESS_NO_CONFIG_WARNING=true

cache:
yarn: true
directories:
- node_modules
cache: yarn

install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn --prefer-offline --pure-lockfile
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn --prefer-offline --frozen-lockfile

script:
- yarn test:cover
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-engines true
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Headless Firefox for tests
- Integration tests for
- moderation-list-row component
- action-feed component
- action-feed-entry component
- Pending count on Reviews Dashboard
- Skeleton screens for providers list

### Changed
- Remove global eslint rule and inline in router
- Update travis to use Firefox
- Update README
- Use .nvmrc file (for travis and local)
- Update yarn.lock
- Use COS ember-base image and multi-stage build
- Notify DevOps prior to merging into master to update Jenkins
- Show moderator name (instead of creator) in the accepted/rejected records in the moderation list
- Update style/layout for Reviews to be more mobile friendly


### Removed
- Remove name link from action logs in the dashboard view

### Fixed
- Fix Loading indicator on Reviews dashboard which was not displaying when user clicks on see more link button.
- Add loading indicator for preprints titles on the Reviews dashboard.

## [0.1.1] - 2017-11-02
### Fixed
* Show most recent data after moderator makes a decision and looks at it immediately.
* Fix timezone issue on moderation list page.

## [0.1.0] - 2017-10-26
### Added
MVP release of Reviews!

* Allow provider admins to set up moderation, choosing a workflow and settings
* Allow moderators to view submissions by state (pending/accepted/rejected)
* Allow moderators to read submissions and accept/reject them with comment
86 changes: 17 additions & 69 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,79 +1,27 @@
FROM node:8
### App code
FROM quay.io/centerforopenscience/ember-base AS app

RUN apt-get update \
&& apt-get install -y \
git \
# Next 2 needed for yarn
apt-transport-https \
ca-certificates \
# watchman
build-essential \
automake \
autoconf \
python-dev \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY ./package.json ./yarn.lock ./.yarnrc ./
RUN yarn --frozen-lockfile

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y \
yarn \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

ENV WATCHMAN_VERSION 4.7.0
RUN cd /tmp \
&& git clone https://github.com/facebook/watchman.git \
&& cd watchman \
&& git checkout v$WATCHMAN_VERSION \
&& ./autogen.sh \
&& ./configure --enable-statedir=/tmp \
&& make \
&& make install \
&& mv watchman /usr/local/bin/watchman \
&& rm -Rf /tmp/watchman

RUN mkdir -p /code
WORKDIR /code

COPY ./package.json ./yarn.lock /code/
RUN yarn --pure-lockfile --ignore-engines

COPY ./ /code/
COPY ./ ./

ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}

ARG APP_ENV=production
ENV APP_ENV ${APP_ENV}
RUN yarn build --environment=production

### Dist
FROM node:8-alpine AS dist

RUN mkdir -p /code
WORKDIR /code

ARG BACKEND=local
ENV BACKEND ${BACKEND}
COPY --from=app /code/dist /code/dist

ARG OSF_URL=
ENV OSF_URL ${OSF_URL}
ARG OSF_API_URL=
ENV OSF_API_URL ${OSF_API_URL}
ARG OSF_RENDER_URL=
ENV OSF_RENDER_URL ${OSF_RENDER_URL}
ARG OSF_FILE_URL=
ENV OSF_FILE_URL ${OSF_FILE_URL}
ARG OSF_HELP_URL=
ENV OSF_HELP_URL ${OSF_HELP_URL}
ARG OSF_COOKIE_LOGIN_URL=
ENV OSF_COOKIE_LOGIN_URL ${OSF_COOKIE_LOGIN_URL}
ARG OSF_OAUTH_URL=
ENV OSF_OAUTH_URL ${OSF_OAUTH_URL}
ARG SHARE_BASE_URL=
ENV SHARE_BASE_URL ${SHARE_BASE_URL}
ARG SHARE_API_URL=
ENV SHARE_API_URL ${SHARE_API_URL}
ARG SHARE_SEARCH_URL=
ENV SHARE_SEARCH_URL ${SHARE_SEARCH_URL}
### Dev
FROM app AS dev

RUN ./node_modules/ember-cli/bin/ember build --env ${APP_ENV}
EXPOSE 4200

CMD ["yarn", "test"]
CMD ["yarn", "start"]
11 changes: 0 additions & 11 deletions Dockerfile-alpine

This file was deleted.

20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
# OSF Reviews

`master` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/ember-osf-reviews.svg?branch=master)](https://travis-ci.org/CenterForOpenScience/ember-osf-reviews)
[![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/ember-osf-reviews/badge.svg?branch=master)](https://coveralls.io/github/CenterForOpenScience/ember-osf-reviews?branch=master)

`develop` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/ember-osf-reviews.svg?branch=develop)](https://travis-ci.org/CenterForOpenScience/ember-osf-reviews)
[![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/ember-osf-reviews/badge.svg?branch=develop)](https://coveralls.io/github/CenterForOpenScience/ember-osf-reviews?branch=develop)

This README outlines the details of collaborating on this OSF Reviews Ember application.

## Prerequisites

You will need the following software properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with NPM)
* [Bower](https://bower.io/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)
* [Chrome](https://www.google.com/chrome/)
* [Firefox](https://www.mozilla.org/firefox/)

## Installation

* `git clone <repository-url>` this repository
* `cd reviews`
* `npm install`
* `bower install`
* `cd ember-osf-reviews`
* `yarn --frozen-lockfile`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4400](http://localhost:4400).
* Visit your app at [http://localhost:4200](http://localhost:4200).

### Code Generators

Expand Down
11 changes: 11 additions & 0 deletions app/components/action-feed-entry-skeleton/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.action-body--skeleton {
margin-left: 30px;
}

.action-heading--skeleton {
width: 200px;
}

.icon--skeleton {
float: left;
}
9 changes: 9 additions & 0 deletions app/components/action-feed-entry-skeleton/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="p-b-lg">
{{#content-placeholders as |placeholder|}}
<div class="icon--skeleton">{{placeholder.icon}}</div>
<div class="action-body--skeleton">
<div class="action-heading--skeleton">{{placeholder.text lines=1}}</div>
{{placeholder.heading}}
</div>
{{/content-placeholders}}
</div>
2 changes: 1 addition & 1 deletion app/components/action-feed-entry/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default Component.extend({

message: computed('action.{actionTrigger,provider}', function() {
const i18n = this.get('i18n');
return i18n.t(`components.action-feed-entry.action_message.${this.get('action.actionTrigger')}`, {
return i18n.t(`components.actionFeedEntry.actionMessage.${this.get('action.actionTrigger')}`, {
providerName: this.get('action.provider.name'),
documentType: i18n.t(`documentType.${this.get('action.provider.preprintWord')}.singular`),
});
Expand Down
4 changes: 0 additions & 4 deletions app/components/action-feed-entry/style.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
& {
clear: both;

.entry-body {
padding: 20px 15px;
}

:hover {
background: $color-bg-gray-light;
cursor: pointer;
Expand Down
38 changes: 19 additions & 19 deletions app/components/action-feed-entry/template.hbs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<div class="entry-body">
<div class="icon {{iconClass}}">
<i class="fa {{icon}}"></i>
</div>
<div class="action-body">
<div class="action-date">
{{moment-format action.dateCreated 'MMMM D, Y'}}
{{#if action.provider.isPending}}
{{action-feed-entry-skeleton}}
{{else}}
<div class="m-b-xs p-sm">
<div class="icon {{iconClass}}">
<i class="fa {{icon}}"></i>
</div>
<div class="action-heading">
<a href={{action.creator.links.html}}>{{action.creator.fullName}}</a>
{{#if action.provider.isPending}}
{{loading-indicator classes='ball-dark'}}
{{else}}
<div class="action-body">
<div class="action-date">
{{moment-format action.dateCreated 'MMMM D, Y'}}
</div>
<div class="action-heading">
{{action.creator.fullName}}
{{message}}
{{/if}}
</div>
<div class="action-detail">
{{#link-to 'preprints.provider.preprint-detail' action.provider action.target}}
{{action.target.title}}
{{/link-to}}
</div>
<div class="action-detail">
{{#link-to 'preprints.provider.preprint-detail' action.provider action.target}}
{{action.target.title}}
{{/link-to}}
</div>
</div>
</div>
</div>
{{/if}}
Loading

0 comments on commit 00ba8b0

Please sign in to comment.