Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
🐛 fix #121, #120, #119
Browse files Browse the repository at this point in the history
📝 Added disclaimer for first commers
👥 added contributors
🐛 Fix custom width issues
  • Loading branch information
jccguimaraes committed Feb 15, 2017
1 parent d3c9fff commit d94ded9
Show file tree
Hide file tree
Showing 13 changed files with 152 additions and 76 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.6] - 2017-02-15

### Added

- Add @girlandhercode and @colorful-tones as a contributors.
- Disclaimer for Release notes.

### Fixed

- Fix Elevate to project ([#121](https://github.com/jccguimaraes/atom-project-viewer/issues/121)).
- Fix autohide ([#120](https://github.com/jccguimaraes/atom-project-viewer/issues/120)) and ([#119](https://github.com/jccguimaraes/atom-project-viewer/issues/119)).
- Fix custom width changes not taking place.

### Updated

- README and CHANGE LOG.

## [1.0.5] - 2017-02-14

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Join the chat at https://gitter.im/jccguimaraes/atom-project-viewer](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://gitter.im/jccguimaraes/atom-project-viewer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)

[![atom version](https://img.shields.io/badge/atom-1.14.1-orange.svg?style=flat-square)](https://atom.io/packages/project-viewer/)
[![atom version](https://img.shields.io/badge/atom-1.14.2-orange.svg?style=flat-square)](https://atom.io/packages/project-viewer/)
[![apm version](https://img.shields.io/apm/v/project-viewer.svg?style=flat-square)](https://atom.io/packages/project-viewer/)
[![apm downloads](https://img.shields.io/apm/dm/project-viewer.svg?style=flat-square)](https://atom.io/packages/project-viewer/)

Expand Down Expand Up @@ -104,6 +104,7 @@ Or just find the package by accessing the menu **Atom → Preferences... → Ins

Settings | Type | Description | Default
---------|------|-------------|--------
`disclaimer` | `Boolean` | Show release notes on startup | `true`
`visibilityOption` | `String` | Define what would be the default action for **project-viewer** visibility on startup. | `Display on startup`
`visibilityActive` | `Boolean` | Relative to the interaction option selected above. | `true`
`panelPosition` | `String` | Position the panel to the left or right of the main pane. | `Right`
Expand Down Expand Up @@ -162,6 +163,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

> If you feel you were left out, just shout!
## Contacts

You can follow me on [Twitter](https://twitter.com/jccguimaraes)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "project-viewer",
"main": "./src/main",
"version": "1.0.5",
"description": "Project viewer/manager that lets you add, edit and remove clients/groups/projects as well as switching between them.",
"description": "A project manager that lets you add, edit and remove groups and projects as well as switching between them.",
"keywords": [
"project",
"productivity",
Expand All @@ -13,7 +13,7 @@
"repository": "https://github.com/jccguimaraes/atom-project-viewer",
"license": "MIT",
"engines": {
"atom": ">=1.14.1"
"atom": ">=1.14.2"
},
"dependencies": {
"atom-space-pen-views": "latest",
Expand Down
2 changes: 1 addition & 1 deletion spec/colours-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const colours = require('../src/colours');

xdescribe ('module: colours', function () {
describe ('module: colours', function () {

describe ('on initialization', function () {

Expand Down
81 changes: 41 additions & 40 deletions spec/common-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,47 @@ const view = require('../src/project-view');

describe ('common', function () {

// it ('should clean a config entry not defined', function () {
// atom.config.set('project-viewer.dummy-config', 'dummy-config');
// expect(atom.config.get('project-viewer.dummy-config')).toBe('dummy-config');
// cleanConfig();
// expect(atom.config.get('project-viewer.dummy-config')).toBeUndefined();
// });
//
// it ('should not get any view if not a valid view', function () {
// const itemView = document.createElement('div');
// expect(getView(itemView)).toBeNull();
// });
//
// it ('should get the view associated with a valid child view', function () {
// const itemModel = model.createProject();
// const itemView = view.createView(itemModel);
// itemView.initialize();
// itemView.render();
// const insideView = itemView.querySelector('span');
// expect(getView(insideView)).toBe(itemView);
// });
//
// it ('should get the view passed', function () {
// const itemModel = model.createProject();
// const itemView = view.createView(itemModel);
// itemView.initialize();
// itemView.render();
// expect(getView(itemView)).toBe(itemView);
// });
//
// it ('should not get any model if not a valid view', function () {
// const itemView = document.createElement('div');
// expect(getModel(itemView)).toBeUndefined();
// });
//
// it ('should get the model associated with a valid view', function () {
// const itemModel = model.createProject();
// const itemView = view.createView(itemModel);
// expect(getModel(itemView)).toBe(itemModel);
// });
describe ('#sortList', function () {
it ('should clean a config entry not defined', function () {
atom.config.set('project-viewer.dummy-config', 'dummy-config');
expect(atom.config.get('project-viewer.dummy-config')).toBe('dummy-config');
cleanConfig();
expect(atom.config.get('project-viewer.dummy-config')).toBeUndefined();
});

it ('should not get any view if not a valid view', function () {
const itemView = document.createElement('div');
expect(getView(itemView)).toBeNull();
});

it ('should get the view associated with a valid child view', function () {
const itemModel = model.createProject();
const itemView = view.createView(itemModel);
itemView.initialize();
itemView.render();
const insideView = itemView.querySelector('span');
expect(getView(insideView)).toBe(itemView);
});

it ('should get the view passed', function () {
const itemModel = model.createProject();
const itemView = view.createView(itemModel);
itemView.initialize();
itemView.render();
expect(getView(itemView)).toBe(itemView);
});

it ('should not get any model if not a valid view', function () {
const itemView = document.createElement('div');
expect(getModel(itemView)).toBeUndefined();
});

it ('should get the model associated with a valid view', function () {
const itemModel = model.createProject();
const itemView = view.createView(itemModel);
expect(getModel(itemView)).toBe(itemModel);
});

xdescribe ('#sortList', function () {
const listPosition = [
{ name: 'bbbb'},
{ name: 'zzzz'},
Expand Down
2 changes: 1 addition & 1 deletion spec/db-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require('fs');
const database = require('../src/db');

xdescribe ('database', function () {
describe ('database', function () {

const toBeMethod = function _toBeMethod() {
return typeof this.actual === 'function';
Expand Down
2 changes: 1 addition & 1 deletion spec/dom-builder-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const domBuilder = require('../src/dom-builder');
const map = require('./../src/map');

xdescribe ('dom-builder', function () {
describe ('dom-builder', function () {

it ('should not build an element', function () {
let view = domBuilder.createView(
Expand Down
20 changes: 12 additions & 8 deletions src/colours.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const destroy = function _destroy () {
* @public
* @since 1.0.0
*/
const addRule = function _addRule (itemId, type, color) {
const addRule = function _addRule (itemId, type, value) {
if (!itemId) { return; }
if (!mapper.element || !mapper.element.sheet) { return; }

if (!color) {
if (!value) {
delete mapper.rules[itemId];
return;
}
Expand All @@ -64,29 +64,33 @@ const addRule = function _addRule (itemId, type, color) {
let rule;

switch (type) {
case 'app':
selectorText = `project-viewer, project-viewer.autohide:hover`;
rule = `${selectorText} { width: ${value}px}`;
break;
case 'group':
selectorText = `project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li[data-project-viewer-uuid="${itemId}"] .list-item`;
rule = `${selectorText} { color: ${color}}`;
rule = `${selectorText} { color: ${value}}`;
break;
case 'project':
selectorText = `project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li[data-project-viewer-uuid="${itemId}"].list-item`;
rule = `${selectorText} { color: ${color}}`;
rule = `${selectorText} { color: ${value}}`;
break;
case 'project-hover':
selectorText = `project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li.list-item:hover, project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li .list-item:hover`
rule = `${selectorText} { color: ${color}}`;
rule = `${selectorText} { color: ${value}}`;
break;
case 'project-hover-before':
selectorText = `project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li.list-item:not(.selected)::before`
rule = `${selectorText} { background-color: ${color}}`;
rule = `${selectorText} { background-color: ${value}}`;
break;
case 'project-selected':
selectorText = `project-viewer .list-tree.has-collapsable-children.pv-has-custom-icons li.list-item.selected`
rule = `${selectorText} { color: ${color}}`;
rule = `${selectorText} { color: ${value}}`;
break;
case 'title':
selectorText = `project-viewer .heading`;
rule = `${selectorText} { color: ${color}}`;
rule = `${selectorText} { color: ${value}}`;
break;
}

Expand Down
42 changes: 24 additions & 18 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
'use strict';

const config = {
'disclaimer': {
title: 'Show release notes on startup',
type: 'boolean',
default: true,
order: 0
},
'visibilityOption': {
title: 'Panel visibility interaction option',
description: 'Define what would be the default action for **project-viewer** visibility on startup.',
Expand All @@ -10,14 +16,14 @@ const config = {
'Display on startup',
'Remember state'
],
order: 0
order: 1
},
'visibilityActive': {
title: 'Panel visibility interaction state',
description: 'Relative to the interaction option selected above.',
type: 'boolean',
default: true,
order: 1
order: 2
},
'panelPosition': {
title: 'Panel Position',
Expand All @@ -30,49 +36,49 @@ const config = {
'Right (first)',
'Right (last)'
],
order: 2
order: 3
},
'autoHide': {
title: 'Sidebar auto hidding',
description: 'Panel has auto hide with hover behavior.',
type: 'boolean',
default: false,
order: 3
order: 4
},
'hideHeader': {
title: 'Hide the header',
description: 'You can have more space for the list by hiding the header.',
type: 'boolean',
default: false,
order: 4
order: 5
},
'keepContext': {
title: 'Keep Context',
description: 'When switching from items, if set to `true`, will keep current context. Also will not save contexts between switching.',
type: 'boolean',
default: false,
order: 5
order: 6
},
'openNewWindow': {
title: 'Open in a new window',
description: 'Always open items in a new window.',
type: 'boolean',
default: false,
order: 6
order: 7
},
'statusBar': {
title: 'Show current project in the status-bar',
description: 'Will show the breadcrumb to the current opened project in the `status-bar`.',
type: 'boolean',
default: false,
order: 7
order: 8
},
'customWidth': {
title: 'Set a custom panel width',
description: 'Define a custom width for the panel.<br>*double clicking* on the resizer will reset the width',
type: 'number',
default: 200,
order: 8
order: 9
},
'rootSortBy': {
title: 'Root SortBy',
Expand All @@ -85,34 +91,34 @@ const config = {
'alphabetically',
'reverse-alphabetically'
],
order: 9
order: 10
},
'githubAccessToken': {
title: 'GitHub Access Token',
description: 'Your personal and private GitHub access token. This is useful if you want to save/backup your projects to a remote place (as a gist). *note*: keep in mind that this token should have only permissions to `rw` gists as well as that any package can access this token string.',
type: 'string',
default: '',
order: 10
order: 11
},
'gistId': {
title: 'Gist ID',
description: 'ID of the gist used as a backup storage.',
type: 'string',
default: '',
order: 11
order: 12
},
'setName': {
description: 'Name of your working set, for example \'work\' or \'home\'. As each working set is backed up into a separate file in gist, you can have multiple Group/Project sets on different machines and have them all safely backed up on gist.',
type: 'string',
default: 'default',
order: 12
order: 13
},
'onlyIcons': {
title: 'Icons list without description',
description: 'Will show only the icons in the icon\'s list',
type: 'boolean',
default: true,
order: 13
order: 14
},
'customPalette': {
title: 'Custom palette to use on editor',
Expand All @@ -124,25 +130,25 @@ const config = {
items: {
type: 'string'
},
order: 14
order: 15
},
'customSelectedColor': {
description: 'Only allows for hexadecimal colors',
type: 'string',
default: '',
order: 15
order: 16
},
'customHoverColor': {
description: 'Only allows for hexadecimal colors',
type: 'string',
default: '',
order: 16
order: 17
},
'customTitleColor': {
description: 'Only allows for hexadecimal colors',
type: 'string',
default: '',
order: 17
order: 18
}
};

Expand Down
Loading

0 comments on commit d94ded9

Please sign in to comment.