Commit Graph

2831 Commits

Author SHA1 Message Date
Kevin Ansfield
b900b2a940 Merge pull request #64 from acburdine/internal-tags-followup
internal-tags style followup
2016-06-13 17:37:12 +01:00
Austin Burdine
8b07f934e3 internal-tags style followup
no issue
- improves internal-tags display on content page
- fix typo in settings/labs
2016-06-13 09:40:16 -06:00
Aileen Nowak
9a28e5d7d5 Scheduler UI
refs TryGhost/Ghost#6413 and TryGhost/Ghost#6870

needs TryGhost/Ghost#6861

- **Post Settings Menu (PSM)**:'Publish Date' input accepts a date from now, min. 2 minutes to allow scheduler processing on the server. Also, there will always be some delay between typing the date and clicking on the 'Schedule Post' button. If the user types a future date for an already published post, the date will be reseted and he sees the message, that the post needs to be unpublished first. Once, the date is accepted, the label will change to 'Scheduled Date'.

- adds a CP 'timeScheduled' to post model, which will return `true` if the publish time is currently in the future.

- **Changes to the button flow in editor**:
- if the the CP `timeScheduled` returns true, a different drop-down-menu will be shown: 'Schedule Post' replaces 'Publish Now' and 'Unschedule' replaces 'Unpublish'.

- Covering the _edge cases_, especially when a scheduled post is about to be published, while the user is in the editor.
	- First, a new CP `scheduleCountdown` will return the remaining time, when the estimated publish time is 15 minutes from now. A notification with this live-ticker is shown next to the save button. Once, we reach a 2 minutes limit, another CP `statusFreeze` will return true and causes the save button to only show `Unschedule` in a red state, until we reach the publish time
	- Once the publish time is reached, a CP `scheduledWillPublish` causes the buttons and the existing code to pretend we're already dealing with a publish post. At the moment, there's no way to make a background-fetch of the now serverside-scheduled post model from the server, so Ember doesn't know about the changed state at that time.
	- Changes in the editor, which are done during this 'status freeze'-process will be saved back correctly, once the user hits 'Update Post' after the buttons changed back. A click on 'Unpublish' will change the status back to a draft.
	- The user will get a regular 'toaster' notification that the post has been published.

- adds CP `isScheduled` for scheduled posts
- adds CP `offset` to component `gh-posts-list-item` and helper `gh-format-time-scheduled` to show schedule date in content overview.
- sets timeout in `gh-spin-button` to 10ms for `Ember.testing`
- changes error message in `gh-editor-base-controller` to be in one line, seperated with a `:`

TODOs:
- [x] new sort order for posts (1. scheduled, 2. draft, 3. published) (refs TryGhost/Ghost#6932)
- [ ] Move posts sorting from posts controller to model and refactor to use `Ember.comparable` mixin
- [x] Flows for draft -> scheduled -> published like described in TryGhost/Ghost#6870 incl. edge cases and button behaviour
- [x] Tests
- [x] new PSM behaviour for time/date in future
- [x] display publishedAt date with timezone offset on posts overview
2016-06-13 17:01:42 +02:00
Kevin Ansfield
6606e18991 Merge pull request #58 from acburdine/internal-tags-admin
internal tags feature
2016-06-13 15:53:08 +01:00
Austin Burdine
5d008780fd internal tags feature
refs TryGhost/Ghost#6165
- change behavior to use 'visibility' property
- add tests
2016-06-13 08:21:41 -06:00
Hannah Wolfe
05243a2dbc Merge pull request #63 from kevinansfield/add-ghost-desktop-update-tests
Fix and add tests for Ghost Desktop manual update notification
2016-06-13 14:10:20 +01:00
Hannah Wolfe
1d31a8d973 Merge pull request #62 from kevinansfield/fix-401s-in-uploaders
Fix auth header caching in ajax service
2016-06-13 14:07:58 +01:00
Kevin Ansfield
b521e4dba4 Fix and add tests for Ghost Desktop manual update notification
closes #51
- move the check into the `afterModel` hook so that it's always performed on app load (previously it would only be displayed after going through the sign-in process)
- change the alert type to `warn` so that it matches our existing types (success, warn, error)
- don't rely on the `.htmlSafe()` prototype extension
- add basic tests for the upgrade alert display
2016-06-13 13:40:41 +01:00
Kevin Ansfield
39a09ca28a Fix auth header caching in ajax service
closes https://github.com/TryGhost/Ghost/issues/6884
- mark the `headers` method in the ajax service as "volatile" - it's dependent key was causing the auth headers to be cached on first use which would then cause 401 errors once the token had been refreshed externally

It would also be possible to add `session.authenticated.access_token` as a dependent key but the code-path and usage are minimal so I believe `.volatile()` is preferable as it means that it's not tied directly to the authorizer implementation.
2016-06-13 11:40:08 +01:00
Kevin Ansfield
e308256601 Merge pull request #61 from acburdine/jscs-update
Update grunt-jscs and ember-suave to 3.0.0
2016-06-13 08:49:11 +01:00
Kevin Ansfield
55eabdb350 Merge pull request #57 from AileenCGN/set-default-timezone-to-utc
Add UTC timezone as default in settings model
2016-06-13 08:44:17 +01:00
Austin Burdine
cf36851265 deps: grunt-jscs,ember-suave@3.0.0
replaces #41, #60
- update ember-suave and grunt-jscs to 3.0
- standardize Ember global de-structuring rules across app & tests
2016-06-11 13:39:31 -06:00
Austin Burdine
a42c571055 Merge pull request #59 from TryGhost/greenkeeper-ember-cli-2.6.1
Update ember-cli to version 2.6.1 🚀
2016-06-11 07:16:06 -06:00
Aileen Nowak
6d22a6dcb6 Add UTC timezone as default in settings model
no issue

- Changes the default timezone from 'Europe/Dublin' to 'Etc/UTC' in setting model
- Updates acceptance test for settings general to expect more timezones in list and different default
- adds mirage fixtures values
2016-06-11 12:24:04 +02:00
greenkeeperio-bot
6d8501f507 chore(package): update ember-cli to version 2.6.1
https://greenkeeper.io/
2016-06-11 10:38:22 +01:00
Kevin Ansfield
9b8348a0c0 Merge pull request #53 from TryGhost/greenkeeper-loader.js-4.0.8
Update loader.js to version 4.0.8 🚀
2016-06-10 11:00:40 +01:00
greenkeeperio-bot
446d4bc4fe chore(package): update loader.js to version 4.0.8
https://greenkeeper.io/
2016-06-10 10:18:14 +01:00
Kevin Ansfield
185f0bcb7f Merge pull request #54 from TryGhost/greenkeeper-ember-route-action-helper-0.3.2
Update ember-route-action-helper to version 0.3.2 🚀
2016-06-10 10:17:59 +01:00
greenkeeperio-bot
43aef761be chore(package): update ember-route-action-helper to version 0.3.2
https://greenkeeper.io/
2016-06-10 10:04:29 +01:00
Kevin Ansfield
dd6130e6d3 Merge pull request #56 from TryGhost/greenkeeper-ember-cli-2.6.0
Update ember-cli to version 2.6.0 🚀
2016-06-10 10:04:14 +01:00
greenkeeperio-bot
b2b5301b96 chore(package): update ember-cli to version 2.6.0
https://greenkeeper.io/
2016-06-10 09:41:13 +01:00
Kevin Ansfield
0e30aad959 Merge pull request #55 from ErisDS/labs-subscribe
Labs Subscribers option clearer & with docs link
2016-06-10 09:20:26 +01:00
Hannah Wolfe
bba0918a2f Labs Subscribers option clearer & with docs link
no issue

- changes wording to not indicate that we already send emails
- adds link to documentation
2016-06-10 08:51:44 +01:00
Austin Burdine
089226330b Merge pull request #52 from kevinansfield/deps-ember
deps: ember@2.6.0
2016-06-09 10:39:05 -06:00
Kevin Ansfield
fda6a6939c Merge pull request #50 from TryGhost/greenkeeper-ember-data-2.6.0
Update ember-data to version 2.6.0 🚀
2016-06-09 17:12:28 +01:00
Kevin Ansfield
12cda07e94 deps: ember@2.6.0
no issue
- bugfix & cleanup release https://github.com/emberjs/ember.js/releases/tag/v2.6.0
- fix tests that were relying on not having the `rootURL` prefixed in `href`s
2016-06-09 16:58:09 +01:00
Austin Burdine
393925de68 Merge pull request #47 from kevinansfield/rename-tz-offset
Rename "offset" to "blogTimezone"
2016-06-09 09:35:49 -06:00
Kevin Ansfield
ef774a8593 Merge pull request #49 from acburdine/readme-update
add travis build status to readme
2016-06-09 11:40:43 +01:00
Felix Rieseberg
289742a7b5 Check for Ghost Desktop manual update
If the user is running a version of Ghost Desktop that requires a
manual update, we display a little warning message referring to a blog
post on dev.ghost.org.
2016-06-08 15:10:56 -07:00
greenkeeperio-bot
53ff416d37 chore(package): update ember-data to version 2.6.0
https://greenkeeper.io/
2016-06-08 22:23:54 +01:00
Austin Burdine
a0cd579067 add travis build status to readme 2016-06-08 14:35:38 -06:00
Austin Burdine
2032729522 Merge pull request #48 from TryGhost/greenkeeper-ember-wormhole-0.4.0
Update ember-wormhole to version 0.4.0 🚀
2016-06-08 14:08:47 -06:00
greenkeeperio-bot
59bb01bf8a chore(package): update ember-wormhole to version 0.4.0
https://greenkeeper.io/
2016-06-08 20:41:37 +01:00
Kevin Ansfield
7c2e923074 Rename "offset" to "blogTimezone"
refs https://github.com/TryGhost/Ghost/pull/6941#issuecomment-224553575
- `blogTimezone` and `timezone` better reflect their values (a string representing a timezone in the format `Europe/Dublin`) than `offset` which suggests a fixed value
2016-06-08 12:09:19 +01:00
Austin Burdine
bec486f542 Merge pull request #16 from TryGhost/deps-ember-ajax
deps: ember-ajax@2.4.1
2016-06-06 09:39:18 -06:00
Kevin Ansfield
0c79ff3365 deps: ember-ajax@2.4.1
no issue
- update ember-ajax
- update error handling to match recommended approach
- update error normalization for handling a returned array of strings
2016-06-06 11:54:15 +01:00
Kevin Ansfield
8d12b6bb91 Version bump to 0.9.0-beta1 2016-06-06 10:21:16 +01:00
Kevin Ansfield
c74c937b40 Merge pull request #43 from TryGhost/greenkeeper-ember-one-way-controls-0.8.2
Update ember-one-way-controls to version 0.8.2 🚀
2016-06-04 14:33:33 +01:00
greenkeeperio-bot
11aa59356a chore(package): update ember-one-way-controls to version 0.8.2
https://greenkeeper.io/
2016-06-04 13:57:12 +01:00
Austin Burdine
bebcc49073 Merge pull request #42 from TryGhost/greenkeeper-ember-one-way-controls-0.8.1
Update ember-one-way-controls to version 0.8.1 🚀
2016-06-04 03:30:22 -06:00
greenkeeperio-bot
580961f915 chore(package): update ember-one-way-controls to version 0.8.1
https://greenkeeper.io/
2016-06-04 10:05:55 +01:00
Hannah Wolfe
9ab3cae6c9 Merge pull request #40 from kevinansfield/package-json
Update package.json details, rename module to `ghost-admin`
2016-06-03 17:39:30 +01:00
Kevin Ansfield
d53ef125e0 Update package.json details, rename module to ghost-admin
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Kevin Ansfield
b1987e586c Merge pull request #29 from AileenCGN/timezones-finish-up
Always use the timezone of blog setting
2016-06-03 15:32:35 +01:00
Aileen Nowak
24e71ffdaa Timezones: Always use the timezone of blog setting
closes TryGhost/Ghost#6406

follow-up PR of #2

- adds a `timeZone` Service to provide the offset (=timezone reg. moment-timezone) of the users blog settings
- `gh-datetime-input` will read the offset of the timezone now and adjust the `publishedAt` date with it. This is the date which will be shown in the PSM 'Publish Date' field. When the user writes a new date/time, the offset is considered and will be deducted again before saving it to the model. This way, we always work with a UTC publish date except for this input field.
- gets `availableTimezones` from `configuration/timezones` API endpoint
- adds a `moment-utc` transform on all date attr (`createdAt`, `updatedAt`, `publishedAt`, `unsubscribedAt` and `lastLogin`) to only work with UTC times on serverside
- when switching the timezone in the select box, the user will be shown the local time of the selected timezone
- `createdAt`-property in `gh-user-invited` returns now `moment(createdAt).fromNow()` as `createdAt` is a moment date already
- added clock service to show actual time ticking below select box
- default timezone is '(GMT) Greenwich Mean Time : Dublin, Edinburgh, London'
- if no timezone is saved in the settings yet, the default value will be used
- shows the local time in 'Publish Date'  in PSM by default, until user overwrites it
- adds dependency `moment-timezone 0.5.4` to `bower.json`

---------

**Tests:**

- sets except for clock service in test env
- adds fixtures to mirage
- adds `service.ajax` and `service:ghostPaths` to navigation-test.js
- adds unit test for `gh-format-timeago` helper
- updates acceptance test `general-setting`
- adds acceptance test for `editor`
- adds integration tests for `services/config` and `services/time-zone`

---------

**Todos:**

- [ ] Integration tests: ~~`services/config`~~, ~~`services/time-zone`~~, `components/gh-datetime-input`
- [x] Acceptance test: `editor`
- [ ] Unit tests: `utils/date-formatting`
- [ ] write issue for renaming date properties (e. g. `createdAt` to `createdAtUTC`) and translate those for server side with serializers
2016-06-03 16:23:39 +02:00
Hannah Wolfe
b9864114ea Merge pull request #39 from kevinansfield/version-header-fixes
Minor version header fixes
2016-06-03 15:16:33 +01:00
Kevin Ansfield
5e9cec8384 Minor version header fixes
refs #38
- use same version regex as `safeVersion` does on the server
- remove errant `console.log` from store service test
2016-06-03 14:47:47 +01:00
Austin Burdine
c854dacefe Merge pull request #38 from kevinansfield/version-header
Add version header to API requests
2016-06-03 05:09:18 -06:00
Kevin Ansfield
4cc4781b3e Add version header to API requests
no issue
- modifies the version info included in `env.APP.version` to only include the `major.minor` version numbers
- update base adapter to include `X-Ghost-Version` header
- update `ajax` service to include `X-Ghost-Version` header
2016-06-03 11:53:29 +01:00
Austin Burdine
a4d519d20c Merge pull request #33 from kevinansfield/bower-deps
Bower dependency updates
2016-06-02 21:34:56 -06:00