Skip to content

Commit

Permalink
Merge pull request #1434 from ProjectMirador/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
aeschylus committed Jun 2, 2017
2 parents f86812b + e0c483f commit ea1d34f
Show file tree
Hide file tree
Showing 88 changed files with 4,690 additions and 1,177 deletions.
17 changes: 17 additions & 0 deletions .eslintrc
@@ -0,0 +1,17 @@
{
"extends": "airbnb-base/legacy",
"globals": {
"Mirador": true,
"jQuery": true
},
"rules": {
"no-param-reassign": [
2, {
"props": true,
"ignorePropertyModificationsFor": [
"$"
]
}
]
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,7 @@ language: node_js
sudo: false
node_js:
- '5'
- 'node'
- 'v6.10.3'
before_install:
- npm install
script:
Expand Down
22 changes: 12 additions & 10 deletions CONTRIBUTING.md
Expand Up @@ -10,10 +10,10 @@ Mirador uses [node.js](http://nodejs.org/) and a build system to assemble, test,
`npm start` will run a local server that is available at `localhost:8000`.

## How to Contribute
### Making Changes
### Making Changes
Contributions are always welcome, however, it will always be helpful to begin any large change by submitting an issue, or reviewing an existing issue. This will give the developer community a chance to point you in the right direction, let you know of any connected issues that may not be obvious, and provide feedback about how the feature might fit into the current roadmap. Contributions that involve major changes to the UI will need to have a design audit completed before they can be fully integrated. See the Design section below for information about the design review process.

To make a contribution, update the master and current release branches. At any time, there is one "next release" branch named after the corresponding github milestone. Currently the upcoming release is 2.1.2. Make a discrete change representing a bite-sized chunk of work, and write an informative commit message. We do not enforce any rebasing strategy, but we may ask you to rebase if you have many small and intermediate commits with unhelpful messages. "One commit per PR" is a worthy goal.
To make a contribution, update the master and develop branches. The master branch is the current stable version, though each release also has a tag. The develop branch is the current working branch into which pull requests will be merged for upcoming releases. After creating a new branch off of develop, make a discrete change representing a bite-sized chunk of work, and write an informative commit message. We do not enforce any rebasing strategy, but we may ask you to rebase if you have many small and intermediate commits with unhelpful messages. "One commit per PR" is a worthy goal.
### Making Small Changes
Even small changes should follow the branching strategy outlined above, though they may not need a long discussion. It may still be helpful to create an issue for them, though it is not strictly necessary.
### Updating Documentation
Expand All @@ -26,9 +26,9 @@ Create a branch for your work:
e.g.: `git checkout -b my-feature-branch` or `git checkout -b my-bug-fix`

### Usual Development
Once you have built the necessary files and created a branch for your feature or bug fix work, you are ready to code.
Once you have built the necessary files and created a branch for your feature or bug fix work, you are ready to code.

Live interactive reloading of the browser each time a file is saved is enabled and used in the `npm start` command. Note that this will require middleware or a [livereload browser extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions).
Live interactive reloading of the browser each time a file is saved is enabled and used in the `npm start` command. Note that this will require middleware or a [livereload browser extension](http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions).
### Submitting Your Contribution
### Publishing a New Release

Expand All @@ -38,8 +38,8 @@ All development occurs on the pinned development branch. Ensure that all tests w
#### 2. Change version number in package.json
If the version number included in the `package.json` does not already accurately reflect the version to be released, be sure to increment the number according to [SemVer](http://semver.org/) conventions. Bump the third number for a small patch that does not change or add any new functionality; bump the second number if the branch includes any new features that do not interfere with or change existing features; and bump the first ("major") version number if the changes to be released break or change the API for existing functionality.

#### 3. Merge the Release Branch into Master
For example, if the current release branch is x.x.1, ensure that all feature branches (such as "fix_annotation_bug#1234") have been merged into the x.x.1 release branch as Github Pull Requests, and then merge the x.x.1 (which will be the default branch) into master through the Github interface (through a PR).
#### 3. Merge Develop into Master
For example, ensure that all feature branches (such as "fix_annotation_bug#1234") have been merged into the develop branch as Github Pull Requests, and then merge the develop branch (which will be the default branch) into master through the Github interface (through a PR).

#### 4. Create a New Local Tag
After all new changes have been merged into master, checkout master locally, and create a git tag for the new version:
Expand All @@ -58,7 +58,7 @@ Now push the tagged version to github (from master):
Using the github commit log, compile a bulleted list of the features and changes added to the new release.

#### 9. Publish to NPM
Assuming the commiter has access to the project's package management account on npm, publishing the most recent version requires logging into npm on the command line.
Assuming the commiter has access to the project's package management account on npm, publishing the most recent version requires logging into npm on the command line.
Then simply type `npm publish` to post the new package version to the registry.
To configure your npm user locally, refer to the npm-adduser [documentation](https://docs.npmjs.com/cli/adduser).

Expand All @@ -68,7 +68,7 @@ To configure your npm user locally, refer to the npm-adduser [documentation](htt
Design review can happen in one of two ways, though both ways start with an issue or issues describing the interaction requirements. Once an issue has been created for a new UI-heavy feature, whether or not a prototype is complete, the feature goes up for design review. This is generally a three-step process:
1. An announcement about the proposed feature is put out to the Mirador-tech mailing list or on one of the bi-weekly calls with a link to the issue that documents the proposed UI feature, with links to any prototype examples or design references.
2. The community discusses the design and requirements, and produces a set of annotated mock-ups of the interaction, which the community reviews on the mailing list or on calls.
3. If the community finds major problems with the design, the feedback is incorporated into a new set of mock-ups until a relative concensus about the feature's mock-ups is complete.
3. If the community finds major problems with the design, the feedback is incorporated into a new set of mock-ups until a relative consensus about the feature's mock-ups is complete.

From here, any existing work must be adjusted to reflect the mock-ups produced by the community before it will be accepted as a pull request. This is why it is so important to document a major UI change in issues before putting in too much work. Often, major feature work will have been the result of local changes to Mirador for an independent project. In this case, often a Pull Request will be encouraged simply so that the code is easily referenced in a later redesign of a completed locally-implemented feature.
## Background Information (Tooling)
Expand All @@ -87,7 +87,9 @@ Some resources are managed with bower, but this is being phased out. It is recom
#### Tasks
### Testing and Coverage
### Version Control
### Editorconfig and jsHint
### JavaScript Style
Contributors use a variety of text editors according to circumstance and preference. This can introduce inconsistencies in the source text files, such as spaces being replaced with tabs, indentation spans being shortened, and whitespace being added or subtracted from the end of lines. Using your editor's [EditorConfig](http://editorconfig.org/) plugin resolves these inconsistencies while allowing each developer to use her own preferences while developing.

[JSHint](http://jshint.com) will notify you of inconsistencies in the style of the code. Mirador uses the AirBnB [styleguide](https://github.com/airbnb/javascript/tree/es5-deprecated/es5) for ES5.
DEPRECATED [NON-FUNCTIONAL]. [JSHint](http://jshint.com) will notify you of inconsistencies in the style of the code. Mirador uses the AirBnB [styleguide](https://github.com/airbnb/javascript/tree/es5-deprecated/es5) for ES5.

[eslint](http://eslint.org/). Mirador uses the AirBnb Javascript styleguide for ES5 as codified by AirBnb in [eslint-config-airbnb-base](https://www.npmjs.com/package/eslint-config-airbnb-base#eslint-config-airbnb-baselegacy). Make sure any changes you make conform to this style. You can check this by running the `npm run lint`. Error checking for this is not turned on in the continuous integration build at the moment, but will be in the future.
27 changes: 19 additions & 8 deletions Gruntfile.js
Expand Up @@ -4,6 +4,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("gruntify-eslint");
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
Expand Down Expand Up @@ -45,7 +46,9 @@ module.exports = function(grunt) {
'node_modules/i18next-xhr-backend/i18nextXHRBackend.min.js',
'bower_components/simplePagination.js/jquery.simplePagination.js',
'js/lib/modernizr.custom.js',
'js/lib/sanitize-html.min.js'
'js/lib/sanitize-html.min.js',
'node_modules/iiif-evented-canvas/dist/iiif-evented-canvas.umd.min.js',
'node_modules/iiif-layout-functions/dist/iiif-layout-functions.umd.min.js',
],

// source files
Expand Down Expand Up @@ -104,7 +107,7 @@ module.exports = function(grunt) {
less: {
compile: {
files: {
'css/mirador.css': 'css/mirador.less/main.less'
'css/mirador.css': 'css/less/main.less'
}
}
},
Expand Down Expand Up @@ -209,8 +212,6 @@ module.exports = function(grunt) {
all: {
options: {
livereload: {
// Here we watch the files the sass task will compile to
// These files are sent to the live reload server after sass compiles to them
options: { livereload: true },
files: ['build/**/*']
}
Expand All @@ -222,13 +223,20 @@ module.exports = function(grunt) {
'locales/*/*.json',
'images/*',
'css/*.css',
'css/mirador.less/**/*.less',
'css/less/**/*.less',
'index.html'
],
tasks: 'dev_build'
}
},

eslint: {
options: {
silent: true
},
src: sources
},

jshint: {
options: {
browser: true,
Expand Down Expand Up @@ -274,16 +282,19 @@ module.exports = function(grunt) {
grunt.file.copy(abspath, dest);
});
});
// ----------
// Lint task
grunt.registerTask('lint', ['jshint', 'eslint'])

// ----------
// Build task.
// Cleans out the build folder and builds the code and images into it, checking lint.
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'jshint', 'less', 'concat:css', 'uglify', 'cssmin', 'copy']);
grunt.registerTask('build', [ 'clean:build', 'git-describe', 'lint', 'less', 'concat:css', 'uglify', 'cssmin', 'copy']);

// ----------
// Dev Build task.
// Build, but skip the time-consuming and obscurantist minification and uglification.
grunt.registerTask('dev_build', [ 'clean:build', 'git-describe', 'jshint', 'less', 'concat', 'copy']);
grunt.registerTask('dev_build', [ 'clean:build', 'git-describe', 'lint', 'less', 'concat', 'copy']);

// ----------
// Package task.
Expand All @@ -308,6 +319,6 @@ module.exports = function(grunt) {
// ----------
// Runs this on travis.
grunt.registerTask('ci', [
'jshint'
'lint'
]);
};
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/ProjectMirador/mirador.svg?branch=master)](https://travis-ci.org/ProjectMirador/mirador?branch=master)
[![Stories in Ready](https://badge.waffle.io/ProjectMirador/mirador.svg?label=ready&title=Ready)](http://waffle.io/iiif/mirador)

#Mirador
# Mirador
![mirador banner](http://projectmirador.github.io/mirador/img/banner.jpg)
**Mirador is a multi-repository, configurable, extensible, and easy-to-integrate viewer and annotation creation and comparison environment for IIIF resources, ranging from deep-zooming artwork, to complex manuscript objects. It provides a tiling windowed environment for comparing multiple image-based resources, synchronised structural and visual navigation of content using openSeadragon, Open Annotation compliant annotation creation and viewing on deep-zoomable canvases, metadata display, bookreading, and bookmarking.**

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion css/mirador.less/main.less → css/less/main.less
@@ -1,7 +1,7 @@
/**
* This file is the entry point for Less processing
*/

@import 'mixins';
@import 'theme/colors';
@import 'theme/fonts';
@import 'overrides/jquery';
Expand All @@ -23,3 +23,4 @@
@import 'panels/bookmark-panel';
@import 'panels/metadata-view';
@import 'panels/bottom-panel';
@import 'panels/layers-tab';
6 changes: 6 additions & 0 deletions css/less/mixins.less
@@ -0,0 +1,6 @@
// use () to avoid outputting this in the stylesheet.
.clearfix() {
zoom:1;
&:before, &:after{ content:""; display:table; }
&:after{ clear: both; }
}
18 changes: 14 additions & 4 deletions css/mirador.less/osd-hud.less → css/less/osd-hud.less
Expand Up @@ -174,6 +174,12 @@
left: 10px;
transition: none;
/*width: 100%*/
>div {
clear: both;
>a:first-child {
margin-bottom: 10px;
}
}
}
.mirador-osd-context-controls a {
float:left;
Expand All @@ -186,10 +192,14 @@
left: 0px;
}
.mirador-manipulation-controls {
position: absolute;
top: 30px;
left: 0px;
min-width: 330px;
min-width: 364px;
}
.mirador-mirror {
-moz-transform: scale(-1, 1);
-webkit-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
filter: FlipH;
}

/* color picker custom style
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,7 +6,7 @@
background-color: @white-a94;
display: none;
overflow: hidden;
z-index: 5;
z-index: 6;
right: 0;
top: 0;
padding: 10px;
Expand Down
File renamed without changes.
111 changes: 111 additions & 0 deletions css/less/panels/layers-tab.less
@@ -0,0 +1,111 @@
// TODO: Go back through less files and remove mirador-container
// wherever it appears explicitly, as it is
// causing specificity problems.
.mirador-container .layersPanel h3 {
margin:10px 0;
}
.layersPanel {
position: absolute;
width: 285px;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow-y: scroll;
.layers-listing {
padding: 0;
list-style-type:none;
margin-top:0;
}
.layers-list-item {
.clearfix();
border-top: 1px solid gray;
border-bottom: 1px solid gray;
padding: 10px 10px 10px 0;
margin-right: 20px;
&>h4 {
margin-bottom: 5px;
}
.thumb-container {
position:relative;
float:left;
width: 60px;
height: 60px;
margin-right:10px;
img {
position: relative;
margin: 0 auto;
max-height:60px;
max-width: 60px;
display:block;
opacity:0;
border: 1px solid gray;
box-shadow: inset 0 0 12px gray;
top: 50%;
transform: translateY(-50%);
&.loaded {
transition: all 0.2s ease-out;
opacity:1;
}
}
.spinner, .failed, .thumb-failed {
position:absolute;
display:inline-block;
width:100%;
margin:0 auto;
top:50%;
transform: translateY(-50%);
opacity:0;
transition: all 0.2s ease-out;
color: #666;
}
&.awaiting-thumbnail {
.spinner {
opacity:1;
}
}
}
&.requested {
.spinner {
opacity: 1;
transition: all 0.2s ease-out;
}
.thumb-container img {
transition: all 0.2s ease-out;
opacity: 0.5;
}
}
&.failed {
.failed {
opacity:1;
transition: all 0.2s ease-out;
}
.thumb-container img {
transition: all 0.2s ease-out;
opacity: 0.5;
}
.thumb-failed {
opacity: 0;
}
.thumb-container.awaiting-thumbnail .spinner {
opacity:0;
transition: all 0.2s ease-out;
}
}
.visibility-toggle {
margin-bottom: 10px;
}
}
.disabled-overlay {
display: none;
}
}
.layersPanel.inactive>*:not(.disabled-overlay){
display: none;
}
.layersPanel.inactive .disabled-overlay {
padding: 10px;
display: block;
box-sizing: border-box;
color: dimgray;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,13 +1,12 @@
.mirador-container {
#workspace-select-menu,
#workspaceContainer {
#workspace-select-menu {
position: absolute;
height: 100%;
width: 100%;
background-color: @white-a94;
display: none;
overflow: hidden;
z-index: 5;
z-index: 6;
}

#workspace-select-menu {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion css/mirador.less/window.less → css/less/window.less
Expand Up @@ -51,7 +51,7 @@
top: 0;
box-sizing: border-box;
background-color: @white-a90;
z-index: 4;
z-index: 5;
width: 45%;
overflow-y: scroll;
height: 80%;
Expand Down
File renamed without changes.

0 comments on commit ea1d34f

Please sign in to comment.