diff --git a/README.md b/README.md
index 927240a53..b67e84b07 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,9 @@ This is an 'evergreen' application, each time it launches the application code i
# Development
-The application is built using AngularJS and ES2016, transpiled via Babel. The charts are rendered using [d3fc](https://d3fc.io/), a Scott Logic open source project which provides a number of components that allow the creation of bespoke interactive charts. The bulk of the charting code is adapted from [BitFlux](http://scottlogic.github.io/BitFlux/), which showcases the capabilities of d3fc.
+The application is built using AngularJS and ES2015, transpiled via Babel. The charts are rendered using [d3fc](https://d3fc.io/), a Scott Logic open source project which provides a number of components that allow the creation of bespoke interactive charts. The bulk of the charting code is adapted from [BitFlux](http://scottlogic.github.io/BitFlux/), which showcases the capabilities of d3fc.
+
+The displayed data is real and provided by [Quandl](https://www.quandl.com). The application uses separate Quandl API keys for development and release to mitigate chances of crossing Quandl's [rate limits](https://www.quandl.com/docs/api?json#rate-limits).
### Initial Setup
@@ -49,12 +51,16 @@ grunt serve
The project is also accessible at http://localhost:5000
+#### Testing
+
+There is a [test plan](docs/TEST_PLAN.md) that covers the main features and behaviour. This should be used as a basis for testing before releasing and also the main features covered on testing PR changes.
+
#### Releasing
To release, run the Grunt task: `grunt release` for a major release, or `grunt bump:minor`
for a minor. This updates all the version references to a new version. Then, submit a PR
-with this new version in to `dev`, and then merge it to `master`. Finally, run
-`grunt deploy:upstream` or `grunt deploy`, depending on how your remotes are set up.
+with this new version in to `dev`, and then merge it to `master`. Merging to master will
+trigger the update of the deployed gh-pages version.
## License
diff --git a/deploy.sh b/deploy.sh
index 40e53fafd..a3b723f75 100644
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,28 +1,54 @@
#!/usr/bin/env bash
set -eo pipefail
-if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ $TRAVIS_BRANCH == "dev" ] || [ $TRAVIS_BRANCH == "master" ]))
+
+# Check for release branch - not using grep as set -e means it fails script
+RELEASE_BRANCH=$(echo "$TRAVIS_BRANCH" | sed -n 's/^release\-/&/p')
+
+#Get the release type (dev/master) from the branch name
+TYPE="$TRAVIS_BRANCH"
+
+if ([ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ "$TYPE" == "dev" ] || [ "$TYPE" == "master" ] || [ -n "$RELEASE_BRANCH" ]))
then
#Clone the latest gh-pages
git clone https://github.com/ScottLogic/StockFlux.git --branch gh-pages gh-pages
#Get line with version from the file -> get the second word -> remove quotes around the value
VERSION=$(grep "version" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
- echo "Version is: $VERSION"
- #Get line with the release type (develop/master) from the file -> get the second word -> remove quotes around the value
- TYPE=$(grep "type" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
echo "Type is: $TYPE"
+ echo "Version is: $VERSION"
- if ([ -z "$TYPE" ] || [ -z "$VERSION" ])
+ if ([ $TYPE == "master" ] || [ $TYPE == "dev" ])
then
- echo "Version or Type not set in package.json"
- exit 1
+ echo "Preparing to build version $TYPE"
+ grunt ci --build-target=$TYPE
+
+ rm -rf "./gh-pages/$TYPE"
+ cp -r "./public" "./gh-pages/$TYPE"
+ fi
+
+ if ([ $TYPE == "master" ] || [ -n "$RELEASE_BRANCH" ])
+ then
+ echo "On $TYPE - building versioned build"
+ if ([ -z "$VERSION" ])
+ then
+ echo "Unable to determine version from package.json."
+ exit 1
+ fi
+ if [ -n "$RELEASE_BRANCH" ]
+ then
+ #For release branches add rc postfix
+ VERSION="$VERSION-rc"
+ echo "Release branch - updating version to $VERSION"
+ fi
+ # Rebuild everything to do $VERSION
+ echo "Cleaning build. Targetting $VERSION"
+ grunt ci --build-target=$VERSION
+
+ rm -rf "./gh-pages/$VERSION"
+ cp -r "./public" "./gh-pages/$VERSION"
fi
- rm -rf "./gh-pages/$TYPE"
- cp -r "./public" "./gh-pages/$TYPE"
- rm -rf "./gh-pages/$VERSION"
- cp -r "./public" "./gh-pages/$VERSION"
cd gh-pages
#Removing git history
@@ -42,6 +68,11 @@ then
# repo's gh-pages branch. (All previous history on the gh-pages branch
# will be lost, since we are overwriting it.) We redirect any output to
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
- echo "Pushing to: https://${GH_TOKEN}@${GH_REF}"
+ echo "Pushing to Github..."
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
+
+ echo "Cleaning residual gh-pages folder"
+ rm -rf ./gh-pages
+else
+ echo "Nothing needs deploying"
fi
diff --git a/docs/TEST_PLAN.md b/docs/TEST_PLAN.md
new file mode 100644
index 000000000..8f5ebc535
--- /dev/null
+++ b/docs/TEST_PLAN.md
@@ -0,0 +1,80 @@
+# Test Plan
+## Assumptions/Luxuries
+You should really run full view tests using the full screen of the computer being tested AND also at a reduced size of perhaps 50% of the screen size to improve the quality of the results
+The assumption is that right click is disabled and in any instance should always produce no effect.
+Hover on means to move mouse cursor over an element.
+Hover off means to move mouse cursor off an element.
+
+
+## Task bar functionality
+| |Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
+|--- |--- |--- | --- | --- | --- |
+| Close Button | Hover in | Close button is highlighted | "" | "" | "" |
+| | Hover out | Close button highlight removed | "" | "" | "" |
+| | Left click | Application Closes | "" | "" | "" |
+| Minimize Button | Hover in | Minimize button is highlighted | "" | "" | "" |
+| | Hover out | Minimize button highlight removed | "" | "" | "" |
+| | Left click | Application Minimizes | "" | "" | "" |
+| Maximize Button | Hover in | Maximize button is highlighted | "" | "" | "" |
+| | Hover out | Maximize button highlight removed | "" | "" | "" |
+| | Left click | Application maximizes | "" | "" | "" |
+| History Button (No history) | Observe | Button should not be present | "" | "" | "" |
+| History Button (unviewed history) | Observe | Button should be present highlighted | "" | "" | "" |
+| | Hover in | History button is highlighted | "" | "" | "" |
+| | Hover out | History button is highlighted | "" | "" | "" |
+| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
+| | Exiting history | Button should lose highlight. | "" | "" | "" |
+| History Button (viewed history) | Observe | Button should be present and not highlighted | "" | "" | "" |
+| | hover in | History button is highlighted | "" | "" | "" |
+| | hover out | History button highlight is removed | "" | "" | "" |
+| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
+| | Exiting history | Button remain unhighlighted. | "" | "" | "" |
+| Compact View Button | Hover in | CW button is highlighted | "" | N/A | "" |
+| | Hover out | CW button highlight removed | "" | N/A | "" |
+| | Left click | Changes view to CV | "" | N/A | "" |
+| Full View Button | Hover in | N/A | "" | FW button is highlighted | "" |
+| | Hover out | N/A | "" | FW button highlight is removed | "" |
+| | Left Click | N/A | "" | Changes view to FV | "" |
+
+
+### Favourites
+|Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
+|---|---|---|---|---|
+| Before First favourite is added | Should contain no stocks and display the text "You have no favourites to display. Use the search tab to add new stocks to the list" | Should display nothing if the search field is empty | Should contain no stocks and display the text "You have no favourites to display. Use the search tab to add new stocks to the list" | Should display nothing if the search field is empty |
+| Add *first* favourite | The favourite should be displayed in favourites list, the stock should be automatically selected and the chart and navigation bar for it opened. | The newly added favourite should be displayed in favourites list at the bottom if search field is empty | The newly added favourite should be displayed in favourites list | The newly added favourite should be displayed in favourites list at the bottom if search field is empty |
+| Add *another* favourite | The newly added favourite should be displayed in favourites list at the bottom | The newly added favourite should be displayed in favourites list at the bottom if search field is empty | The newly added favourite should be displayed in favourites list at the bottom | The newly added favourite should be displayed in favourites list at the bottom if search field is empty |
+| Left click on a favourite stock star symbol | Should display a confirmation dialog asking the user to confirm they wish to remove the stock | The stock should be unfavourited and should not be displayed in the favourites list | Should display a confirmation dialog asking the user to confirm they wish to remove the stock | The stock should be unfavourited and should not be displayed in the favourites list |
+| Left click on confirm button when removing stock | The stock should be unfavourited and should not be displayed in the favourites list | N/A | The stock should be unfavourited and should not be displayed in the favourites list | N/A |
+| Left click anywhere on page other than confirm button when removing stock | The stock should not be unfavourited and should still be displayed in the favourites list | N/A | The stock should not be unfavourited and should still be displayed in the favourites list | N/A|
+| Hover on a favourite stock | Should change the background colour of the hovered favourite to dark grey | "" | "" | "" |
+| Hover off a favourite stock | Should change the background colour of the hovered out favourite back to light grey | "" | "" | "" |
+| Hover on a favourite stock with long list of favourites | Should change the background colour of the hovered favourite to dark grey. The favourite stock labels should shift right allowing a scroll bar to appear without colliding with the text. Scrolling up/down the list should allow navigating favourites list. | "" | Should change the background colour of the hovered favourite to dark grey. Scroll bar should appear to allow scrolling up/down the list. | "" |
+| Hover off a favourite stock with long list of favourites | Should change the background colour of the hovered out favourite back to light grey, the scroll bar should disappear. The text labels should return to their default location | "" | Should change the background colour of the hovered out favourite back to light grey, the scroll bar should disappear. | "" |
+| Left click a favourite stock | Favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | "" | Stock should not be selected | "" |
+| Double left click a favourite stock | Favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | "" | Full view should be opened. The clicked favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | Stock should not be selected |
+| Hover on another favourite whilst one is selected | Selected favourite should maintain its dark grey state. Hovered favourite should also be displayed with dark grey background. | "" | Selected stock should not be dark grey in compact view | "" |
+| Hover off another favourite whilst one is selected | Should maintain the dark background on selected favourite. Should change the background colour of the hovered out favourite back to light grey. | "" | N/A | "" |
+| Reposition favourites by holding down left mouse button and dragging | Should move to its new position in the list. | Drag to reposition should not work in search tab | Should move to its new position in the list. | Drag to reposition should not work in search tab |
+| Position refreshed | New positions should be immediately visible | "" | "" | "" |
+| Maintain position | New positions should be retained if window is closed and reopened | "" | "" | "" |
+| Drag a favourite out and drop else where on desktop | Favourite is removed from original window and new full window opens with favourite | "" | Favourite is removed from original window and new collapsed window opens with the favourite | "" |
+| Drag a favourite out and drop on to another windows favourites | Favourite is removed from original window and moved to the other window | "" | Favourite is removed from original window and moved to the other window | "" |
+| Drag the last favourite out and keep mouse down | Window should fade out whilst mouse is moving and reappear if mouse is still for a short while | "" | Window should fade out whilst mouse is moving and reappear if mouse is still for a short while | "" |
+| Drag the last favourite out and drop else where on desktop | Window should move to drop location | "" | Window should move to drop location | "" |
+| Drag the last favourite out and drop on to another windows favourites | Favourite should move to other window and original should stay closed and not appear in closed window list | "" | Favourite should move to other window and original should stay closed and not appear in closed window list | "" |
+
+### Transition between Favourites FV and Search FV
+| Element | Action |Result |
+|---|---|---|
+| Search Tab | From the favourites FV, left click the search tab | favourites tab should hide and search tab become visible. |
+| Favourites Tab | From the Search FV, left click favourites tab | Search tab should hide and favourites become visible|
+
+### Searching
+| Action |Result |
+|---|---|---|
+| View empty search field | Should contain text "Enter stock name or symbol" |
+| Enter "A" character into search field | Should remove the "Enter stock name or symbol" text and replace with the entered search term. The search results field should display "loading search results". Search results which match criteria should be displayed|
+| Entering "A" character into search field and hovering on search results | A scroll bar should become visible down the left side of the search results to allow scrolling down the long list. Dragging it should scroll down the list. The stock hovered over should receive dark grey highlighting. |
+| Entering "complicated" into search field | No search results should be found. The search results box should display "Oops! looks like no matches were found."|
+| Entering "two" into search field and hovering on results | Should display less results than are needed for a scroll bar to appear on hover. The stock hovered over should receive dark grey highlighting.|
+| Entering a search query, closing the search tab and then reopening it| The previous search results should remain on the screen. Long search result lists will be displayed from the first element (not to where you scrolled in the list)|
diff --git a/gruntfile.js b/gruntfile.js
index 10dce9c9f..43e289a25 100644
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -3,27 +3,9 @@
module.exports = function(grunt) {
var target = grunt.option('target') || 'http://localhost:5000',
port = process.env.PORT || 5000,
- version = grunt.file.readJSON('package.json').version,
- type = grunt.file.readJSON('package.json').type;
+ buildTarget = grunt.option('build-target') || 'dev';
grunt.initConfig({
- 'gh-pages': {
- origin: {
- options: {
- base: 'public',
- message: 'Deploy to GitHub Pages'
- },
- src: ['**/*']
- },
- upstream: {
- options: {
- base: 'public',
- message: 'Deploy to GitHub Pages',
- repo: 'git@github.com:ScottLogic/StockFlux.git'
- },
- src: ['**/*']
- }
- },
connect: {
options: {
@@ -53,7 +35,8 @@ module.exports = function(grunt) {
},
shortcut: {
icon: target + '/favicon.ico'
- }
+ },
+ splashScreenImage: target + '/assets/png/splashscreen.png'
}
}
},
@@ -88,19 +71,6 @@ module.exports = function(grunt) {
}
},
- download: {
- //One zip for release type (development/master) and one for the version are created here
- openfinZip: {
- src: ['https://dl.openfin.co/services/download?fileName=StockFlux-' + version +
- '&config=http://scottlogic.github.io/StockFlux/' + version + '/app.json'],
- dest: './public/StockFlux-' + version + '.zip'
- },
- openfinTypeZip: {
- src: ['https://dl.openfin.co/services/download?fileName=StockFlux-' + type + '&config=http://scottlogic.github.io/StockFlux/' + type + '/app.json'],
- dest: './public/StockFlux-' + type + '.zip'
- }
- },
-
eslint: {
target: ['src/**/*.js']
},
@@ -231,6 +201,20 @@ module.exports = function(grunt) {
replacements: [{
pattern: 'const allowContextMenu = true;',
replacement: 'const allowContextMenu = false;'
+ }, {
+ pattern: 'API_KEY = \'kM9Z9aEULVDD7svZ4A8B\'',
+ replacement: 'API_KEY = \'SmMCEZxMRoNizToppows\''
+ }]
+ }
+ },
+ 'gh-pages': {
+ files: {
+ 'public/app.json': 'public/app.json'
+ },
+ options: {
+ replacements: [{
+ pattern: new RegExp('http://scottlogic.github.io/StockFlux/([A-z]+)/', 'g'),
+ replacement: 'http://scottlogic.github.io/StockFlux/' + buildTarget + '/'
}]
}
}
@@ -247,10 +231,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-eslint');
- grunt.loadNpmTasks('grunt-http-download');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-string-replace');
@@ -273,17 +255,13 @@ module.exports = function(grunt) {
grunt.registerTask('transpile', ['babel', 'less:development']);
grunt.registerTask('build:dev', ['concatenate', 'transpile', 'connect:livereload']);
- grunt.registerTask('build:release', ['concatenate', 'string-replace', 'transpile', 'uglify', 'connect:livereload']);
+ grunt.registerTask('build:release', ['concatenate', 'string-replace', 'transpile', 'uglify']);
grunt.registerTask('serve', ['build:dev', 'openfin:serve']);
grunt.registerTask('default', ['serve']);
- grunt.registerTask('createZip', ['build:release', 'download']);
- grunt.registerTask('deploy', ['createZip', 'gh-pages:origin']);
- grunt.registerTask('deploy:upstream', ['ci', 'gh-pages:upstream']);
-
grunt.registerTask('release', ['bump:major']);
- grunt.registerTask('ci', ['build:release', 'download']);
+ grunt.registerTask('ci', ['build:release']);
};
diff --git a/package.json b/package.json
index ca5c62281..8fe4cf794 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "bitflux-openfin",
- "version": "10.0.1",
- "type": "master",
+ "version": "10.1.0",
+ "type": "develop",
"scripts": {
"test": "grunt ci",
"postinstall": "cd node_modules/BitFlux && npm i"
@@ -22,8 +22,6 @@
"grunt-contrib-less": "^1.1.0",
"grunt-contrib-uglify": "^0.11.1",
"grunt-eslint": "^17.3.1",
- "grunt-gh-pages": "^1.0.0",
- "grunt-http-download": "^0.1.0",
"grunt-jsbeautifier": "^0.2.7",
"grunt-openfin": ">=1.0.2",
"grunt-string-replace": "^1.2.1",
@@ -34,7 +32,7 @@
"angular-animate": "^1.4.8",
"angular-resource": "^1.4.8",
"d3fc": "^5.2.0",
- "BitFlux": "ScottLogic/BitFlux#dc6c552014d6d578152967a2930b9b73d7b5a687",
+ "BitFlux": "ScottLogic/BitFlux#37e9a2d632a0ff06e5fc3932bcbd9400bcfabb5d",
"jquery": "^1.11.1",
"malihu-custom-scrollbar-plugin": "^3.1.3",
"moment": "^2.10.6"
diff --git a/src/.eslintrc b/src/.eslintrc
index d78223dae..079a8d3ef 100644
--- a/src/.eslintrc
+++ b/src/.eslintrc
@@ -12,6 +12,7 @@
"confirm": true,
"Event": true,
"localStorage": true,
- "$q": true
+ "$q": true,
+ "reportAction": true
}
}
diff --git a/src/app.js b/src/app.js
index f844ba583..d07ff6099 100644
--- a/src/app.js
+++ b/src/app.js
@@ -23,7 +23,7 @@
angular.module('stockflux.main', []);
angular.module('stockflux.showcase', ['stockflux.selection', 'stockflux.quandl', 'stockflux.config']);
- angular.module('stockflux.toolbar', ['stockflux.currentWindow', 'stockflux.closedWindows']);
+ angular.module('stockflux.toolbar', ['stockflux.currentWindow', 'stockflux.closedWindows', 'stockflux.config']);
angular.module('stockflux.icon', []);
angular.module('stockflux.search', ['stockflux.quandl', 'stockflux.selection', 'stockflux.currentWindow']);
angular.module('stockflux.favourites', ['stockflux.quandl', 'stockflux.selection', 'stockflux.currentWindow']);
diff --git a/src/app.json b/src/app.json
index bc06745f9..96ce2bfd8 100644
--- a/src/app.json
+++ b/src/app.json
@@ -21,5 +21,6 @@
"description": "Hosts BitFlux as an OpenFin application.",
"icon": "http://scottlogic.github.io/StockFlux/master/favicon.ico",
"name": "StockFlux"
- }
+ },
+ "splashScreenImage": "http://scottlogic.github.io/StockFlux/master/assets/png/splashscreen.png"
}
diff --git a/src/assets/png/drag_handle.png b/src/assets/png/drag_handle.png
deleted file mode 100644
index 62710786f..000000000
Binary files a/src/assets/png/drag_handle.png and /dev/null differ
diff --git a/src/assets/png/splashscreen.png b/src/assets/png/splashscreen.png
new file mode 100644
index 000000000..d2e67e61f
Binary files /dev/null and b/src/assets/png/splashscreen.png differ
diff --git a/src/assets/styles/mixins.less b/src/assets/styles/mixins.less
index 0d30552e9..65a408ea8 100644
--- a/src/assets/styles/mixins.less
+++ b/src/assets/styles/mixins.less
@@ -1,8 +1,4 @@
-.right-alignment(@icon-order) {
- right: (15 + (@icon-order * 30));
-}
-
-.transition(@duration: 0.2s, @delay: 0.1s) {
+.transition(@duration: 0.2s, @delay: 0.1s) {
transition: all @duration linear @delay;
}
@@ -14,6 +10,11 @@
-webkit-app-region: no-drag;
}
+.size(@width: auto, @height: auto) {
+ width: @width;
+ height: @height;
+}
+
// 400 is 'normal'
.font(@size, @weight: 400, @line-height: 1.5) {
font-size: @size;
@@ -31,30 +32,29 @@
white-space: nowrap;
}
-.bubble-head(@top: auto, @bottom: auto, @left: auto, @right: auto) {
- position: absolute;
- width: 10px;
- height: 10px;
+.bubble-head(@top: auto, @right: auto, @bottom: auto, @left: auto) {
+ .position(absolute, @top: @top, @right: @right, @bottom: @bottom, @left: @left);
+ .size(@width: 10px, @height: 10px);
transform: rotate(45deg);
background-color: @light-background;
- top: @top;
- bottom: @bottom;
- left: @left;
- right: @right;
}
.box-shadow(@shadow-position, @colour) {
box-shadow: @shadow-position 2px 0px @colour;
}
-.closed-window(@shadow-position, @top: auto, @bottom: auto, @left: auto, @right: auto) {
+.closed-window(@shadow-position, @top: auto, @right: auto, @bottom: auto, @left: auto) {
.box-shadow(@shadow-position, @dark-background);
+ .position(fixed, @top: @top, @right: @right, @bottom: @bottom, @left: @left);
background: @light-background;
- position: fixed;
- width: 180px;
+ .size(@width: 180px);
max-height: 353px;
+}
+
+.position(@position, @top: auto, @right: auto, @bottom: auto, @left: auto) {
+ position: @position;
top: @top;
+ right: @right;
bottom: @bottom;
left: @left;
- right: @right;
}
diff --git a/src/assets/styles/style.less b/src/assets/styles/style.less
index 0d592a87e..490d03a91 100644
--- a/src/assets/styles/style.less
+++ b/src/assets/styles/style.less
@@ -15,11 +15,12 @@
@import "../../sidebars/favourites/minichart/minichart.less";
@import "../../sidebars/star/star.less";
@import "../../showcase/showcase-changes.less";
-@import "custom-scroll.less";
+@import "../../sidebars/custom-scroll.less";
// Compact styles
@import "../../main/main-compact.less";
@import "../../toolbar/toolbar-compact.less";
+@import "../../sidebars/star/star-compact.less";
@import "../../sidebars/favourites/favourite-compact.less";
@import "../../sidebars/sidebar-compact.less";
@import "../../sidebars/search/search-compact.less";
@@ -32,19 +33,12 @@ body {
.main {
background-color: @dark-background;
padding: 0px;
- position: fixed;
- top: 0px;
- bottom: 0px;
- left: 0px;
- right: 0px;
+ .position(fixed, @top: 0px, @right: 0px, @bottom: 0px, @left: 0px);
+ border: 1px solid @light-background;
}
.main-content {
- bottom: -12px;
- position: absolute;
- top: @toolbar-height;
- left: (@sidebar-width + 20);
- right: -2px;
+ .position(absolute, @top: @toolbar-height, @right: 0px, @bottom: 0px, @left: (@sidebar-width + 20));
}
.disable-transitions {
@@ -61,10 +55,8 @@ body {
#showcase-title {
color: @chart-teal;
- position: absolute;
- right: 75px;
+ .position(absolute, @top: -10px, @right: 75px);
z-index: 10;
- top: -10px;
.code, .name {
display: inline-block;
diff --git a/src/assets/styles/variables.less b/src/assets/styles/variables.less
index fc71e4abd..4992e0193 100644
--- a/src/assets/styles/variables.less
+++ b/src/assets/styles/variables.less
@@ -2,9 +2,9 @@
@text-grey: #AEB1B5;
@light-background: #464E58;
@middle-background: #28313D;
-@dark-background: #1A1F25;
+@dark-background: #1A212A;
@separator-colour: #5B626B;
-@chart-teal: #42D8BD;
+@chart-teal: #37D8BC;
@chart-fade: #307A71;
@font-thin: 100;
@font-light: 300;
@@ -16,6 +16,9 @@
// Dimensions
@sidebar-width: 280px;
@expanded-width: 230px;
-@chart-width: 155px;
-@chart-height: 40px;
@toolbar-height: 50px;
+@shadow-depth: 2px;
+@star-width: 16px;
+@bubble-width: 10px;
+// Declared here as used outside of the favourite card styling.
+@favourite-padding-right: 15px;
diff --git a/src/closedWindows/closedCard/closedCard-controller.js b/src/closedWindows/closedCard/closedCard-controller.js
index 59b22937d..6edab5e44 100644
--- a/src/closedWindows/closedCard/closedCard-controller.js
+++ b/src/closedWindows/closedCard/closedCard-controller.js
@@ -3,6 +3,7 @@
class ClosedCardCtrl {
openClosedWindow(name) {
+ reportAction('Restore window', name);
var store = window.storeService.open(name);
window.windowService.createMainWindow(name, store.isCompact());
}
diff --git a/src/closedWindows/closedCard/closedCard.less b/src/closedWindows/closedCard/closedCard.less
index c24ebd76f..3ada59af3 100644
--- a/src/closedWindows/closedCard/closedCard.less
+++ b/src/closedWindows/closedCard/closedCard.less
@@ -8,11 +8,8 @@
}
.closed-card {
- height: 70px;
- padding-left: 12px;
- padding-right: 12px;
- padding-top: 15px;
- padding-bottom: 15px;
+ .size(@height: 70px);
+ padding: 15px 12px 15px 12px;
cursor: default;
.no-overflow;
@@ -21,8 +18,6 @@
}
}
-.closed-selection {
- .closed-card-container:not(:last-child) {
- border-bottom: 1px solid @dark-background;
- }
+.closed-selection .closed-card-container:not(:last-child) {
+ border-bottom: 1px solid @dark-background;
}
diff --git a/src/config-service.js b/src/config-service.js
index 3111d834e..fdba418b9 100644
--- a/src/config-service.js
+++ b/src/config-service.js
@@ -1,10 +1,16 @@
(function() {
- const RESIZE_NO_LIMIT = 50000;
- const BITFLUX_STOCK_AMOUNT = 1200;
- const BITFLUX_INITIAL_PROPORTION = 16 * 7 / BITFLUX_STOCK_AMOUNT; // ~4 months
- const TEAROUT_WINDOW_OFFSET = [268, 65];
- const TEAROUT_WINDOW_OFFSET_COMPACT = [218, 47];
+ const RESIZE_NO_LIMIT = 50000,
+ BITFLUX_STOCK_AMOUNT = 1200,
+ BITFLUX_INITIAL_PROPORTION = 16 * 7 / BITFLUX_STOCK_AMOUNT, // ~4 months
+ CLOSED_SIDEBAR_WIDTH = 50,
+ SIDETAB_TOP_HEIGHT = 50,
+ TEAROUT_WINDOW_OFFSET = [CLOSED_SIDEBAR_WIDTH, SIDETAB_TOP_HEIGHT],
+ TEAROUT_WINDOW_OFFSET_COMPACT = [0, 34],
+ TEAROUT_CARD_WIDTH = 230,
+ TEAROUT_CARD_DIMENSIONS = [TEAROUT_CARD_WIDTH, 110],
+ COMPACT_WINDOW_DIMENSIONS = [TEAROUT_CARD_WIDTH, 500],
+ DEFAULT_WINDOW_DIMENSIONS = [1280, 720];
// Be very careful changing the line below. It is replaced with a string.replace in the grunt build
// to disable the right click menu in release.
@@ -18,24 +24,13 @@
return 'window' + Math.floor(Math.random() * 1000) + Math.ceil(Math.random() * 999);
}
- getWindowConfig(name) {
- return {
+ _getConfig(name, overrides) {
+ var sharedConfig = {
name: name || this.createName(),
contextMenu: allowContextMenu,
autoShow: false,
frame: false,
- showTaskbarIcon: true,
- saveWindowState: true,
- url: 'index.html',
- resizable: true,
- maximizable: true,
- minWidth: 918,
- minHeight: 510,
- maxWidth: RESIZE_NO_LIMIT,
- maxHeight: RESIZE_NO_LIMIT,
- defaultWidth: 1280,
- defaultHeight: 720,
- shadow: true,
+ shadow: false,
resizeRegion: {
size: 7,
topLeftCorner: 14,
@@ -44,44 +39,52 @@
bottomLeftCorner: 14
}
};
+
+ Object.keys(sharedConfig).forEach((key) => {
+ if (overrides[key] === undefined) {
+ overrides[key] = sharedConfig[key];
+ }
+ });
+
+ return overrides;
}
- getCompactConfig(name) {
- return {
- name: name || this.createName(),
- contextMenu: allowContextMenu,
- autoShow: false,
- frame: false,
+ getWindowConfig(name) {
+ return this._getConfig(name, {
showTaskbarIcon: true,
saveWindowState: true,
url: 'index.html',
- resizable: false,
- maximizable: false,
- minWidth: 230,
- minHeight: 500,
- maxWidth: 230,
- maxHeight: 500,
- defaultWidth: 230,
- defaultHeight: 500,
- shadow: true
- };
+ resizable: true,
+ maximizable: true,
+ minWidth: 918,
+ minHeight: 510,
+ defaultWidth: DEFAULT_WINDOW_DIMENSIONS[0],
+ defaultHeight: DEFAULT_WINDOW_DIMENSIONS[1]
+ });
}
getTearoutConfig(name) {
- return {
- name: name || this.createName(),
- contextMenu: allowContextMenu,
- autoShow: false,
- frame: false,
+ return this._getConfig(name, {
maximizable: false,
resizable: false,
showTaskbarIcon: false,
saveWindowState: false,
- maxWidth: 230,
- maxHeight: 100,
- url: 'tearout.html',
- shadow: true
- };
+ maxWidth: TEAROUT_CARD_DIMENSIONS[0],
+ maxHeight: TEAROUT_CARD_DIMENSIONS[1],
+ url: 'tearout.html'
+ });
+ }
+
+ getTearoutCardDimensions() {
+ return TEAROUT_CARD_DIMENSIONS;
+ }
+
+ getCompactWindowDimensions() {
+ return COMPACT_WINDOW_DIMENSIONS;
+ }
+
+ getDefaultWindowDimensions() {
+ return DEFAULT_WINDOW_DIMENSIONS;
}
getTopCardOffset(compact) {
diff --git a/src/favicon.ico b/src/favicon.ico
index d641c09c5..4073d2b15 100644
Binary files a/src/favicon.ico and b/src/favicon.ico differ
diff --git a/src/index.html b/src/index.html
index bc8a1f71d..ede4d24df 100644
--- a/src/index.html
+++ b/src/index.html
@@ -26,5 +26,21 @@
+