Commit graph

196 commits

Author SHA1 Message Date
Jeldrik Hanschke
88089df7c0
Safari parses date-time strings without explicit time zone as UTC (#364)
Safari does not follow ES5 / ECMAScript 2015 date parsing rules. Per spec a date that has day + time but does not have an explicit time zone (e.g. "2019-01-01T00:00") should be parsed in local time. But Safari treats that one as UTC.
2020-01-31 21:45:58 +01:00
Jeldrik Hanschke
8a62662e6e
migrate from ember-i18n to ember-intl (#358)
* mark string as html safe before passing to translation instead of bypassing HTML escape using {{{unsafe}}} syntax
* replace ember-i18n with ember-intl
2020-01-30 00:23:12 +01:00
Jeldrik Hanschke
5e5dbe84db test should not depend on time zone
This hopefully fixes the flickering tests in Safari.
2020-01-03 14:25:37 +01:00
Jeldrik Hanschke
3d48c221a0
use specialised button for saving (#331)
Adds a <SaveButton> component that renders a save button similar to
<NextButton> but using a special icon that helps to distinguish both.

Also removes the block mode for <NextButton> component and some arguments
that aren't needed anymore.

Closes #294
2020-01-02 17:13:36 +01:00
Jeldrik Hanschke
d9b1bf7b5a
Improve test coverage for validation on participation form (#308)
* add tests that participation form is validated
* assert that first invalid form element is focused on invalid submission attempt
2019-11-20 14:52:23 +01:00
renovate[bot]
2dc5c22409 Update dependency ember-bootstrap to v3 (#255) 2019-11-14 21:18:52 +01:00
Jeldrik Hanschke
4e6d046ec7
add abort button to retry save modal and several other fixes for it (#291)
Croodle shows a modal if saving a participation fails. The modal allows
a user to retry the save attempt. While it was always possible to close
the button by clicking on backdrop or using escape key, a button to do so
was missing. A user may not know about the user ways and may see reloading
the page as only possibilty to close the modal if he doesn't want to retry
again.

This adds the missing abort button and fixes some smaller bugs including:

- The modal was missing a title.
- If the modal was closed once it wasn't reopened on another failed saving
  attemp unless the user has visit another page in between.
- Several arguments were passed to <BsModal> that weren't existing at all.
2019-11-10 10:25:51 +01:00
Jeldrik Hanschke
c55beabcfe
scroll first invalid input into view port on invalid submission (#282) 2019-11-02 21:57:59 +01:00
Jeldrik Hanschke
6571a07ca5
show validation error if time input is partially filled (#279) 2019-11-02 16:51:47 +01:00
Jeldrik Hanschke
41ddafdb72
fix failing test due to unexpected version format (#271) 2019-10-31 07:43:22 +01:00
Jeldrik Hanschke
67caaad803
upgrade Ember CLI to 3.13 and Ember Source + Ember Data to 3.12 (#264)
* upgrade Ember CLI to 3.13 and Ember Source + Ember Data to 3.12

Ember Source upgrade to 3.13 is blocked by Ember CP Validations,
which does not support Ember Source 3.13 yet.

Ember Data upgrade to 3.13 is blocked by Ember Data Model Fragments,
which does not support Ember Data 3.13 yet.

Also removes autofocus mixin and inlines the code as mixins are
considered an antipattern in latest Ember versions.

Removes some left overs in `"resolutions"` key. But that shouldn't have a real impact.
2019-10-29 08:02:50 +01:00
jelhan
65063c71ce
validation error is flashing up for name input while saving participation (#219) 2019-06-14 23:58:53 +02:00
jelhan
7688d468e4
improve form buttons (#211)
* Adds a loading spinner to form buttons as long as submission is pending.
* Does some refactoring of form navigation buttons.
* Updates expected bundle size.
2019-06-12 09:07:48 +02:00
sappor0
c23ba1f6fb Using bootstrap 4 and related UI refresh (#205)
Changes at a glance:

- Switch from BS3 to BS4
- Polishing of some UI elements (low-hanging fruit for UX)
- Mobile-friendly layout.
2019-06-07 11:22:13 +02:00
jelhan
7233f12ee1
refactor setupMirage import after upgrade of ember-cli-mirage (#193)
Recommended import path was changed in v1.0.0-beta.2:
https://github.com/samselikoff/ember-cli-mirage/releases/tag/v1.0.0-beta.2
2019-05-21 13:53:49 +02:00
jelhan
90e842e45b
upgrade dependencies (#178) 2019-04-24 21:43:02 +02:00
jelhan
17cfb4ab6d
Meaningful error pages (#177)
Adds meaningful error pages if
- poll does not exist
- encryption key is wrong.
2019-04-23 17:37:42 +02:00
jelhan
bb160cc503
refactor participants table (#164)
- Drops floatthead and additional scrollbar
- Makes header and first column sticky
- Refactors code for readability

Sticky header is only working in Firefox. Chrome and Edge does not support `position: sticky` for `<thead>`. Haven't tested Safari.
2019-04-20 23:29:59 +02:00
jelhan
6c122148c3
fix: test must not trigger confirmation in IE 11 (#174)
Use test helpers provided by ember-cli-clipboard as they do not trigger confirmation in IE 11. Upgrades ember-cli-clipboard to latest version as the outdated version used before does not include these test helpers yet.

Also refactors test execution against BrowserStack to only run tests one by one. Not quite sure why but that fixes the IE 11 issue. Need to investigate later as that one slows down tests by requiring two additional builds.
2019-03-16 11:26:39 +01:00
jelhan
b8c02ca579
Replace SauceLabs with BrowserStack (#171) 2019-03-14 21:30:48 +01:00
jelhan
215d980033
run tests against Firefox in CI (#168)
* run tests against Firefox in CI
* fix test for Firefox 56
2019-03-07 23:11:03 +01:00
Jeldrik Hanschke
830478051b upgrade qunit to fix CSP violations in test runner
This one requires a migration from deprecated ember-cli-qunit to ember-qunit.
ember-qunit throws in Unit tests cause they interact with runloop but didn't
awaited everything to finish. An assertion was thrown therefor:

> Assertion Failed: expected container not to be destroyed
2019-02-23 23:56:49 +01:00
Jeldrik Hanschke
ac96aaf044 tests should fail if violating CSP 2019-02-23 23:56:49 +01:00
Jeldrik Hanschke
480ceb5e08 provide Content-Security-Policy by meta tag
Having both a Content-Security-Policy (CSP) in meta tag and per header
works fine together. They are merged and the strongest one is applied.
It makes Croodle safer for all users even if the hoster does not apply CSP
for some reason (e.g. they can't set custom headers).

It's still a good idea to recommend using a CSP header cause that ones
are applied earlier - even so this shouldn't be a problem cause we ensure
that CSP meta tag is present before any other link, style or script element.
2019-02-23 23:56:49 +01:00
Jeldrik Hanschke
06a92b947f refactor: replace bootstrap-datepicker by ember-power-calendar
Also renders two linked calendars if there is enough space.

Closes #143
2019-01-20 17:08:16 +01:00
Jeldrik Hanschke
5b34199f41 refactor: drop jQuery from tests except for jQuery plugin bootstrap-datepicker 2019-01-18 20:42:21 +01:00
Jeldrik Hanschke
96f1990542 fix: label should reflect validation state of all times of a day 2019-01-03 00:46:36 +01:00
Jeldrik Hanschke
174b6d493c refactor create/settings to avoid observer
This also fix a bug if user creates more than one croodle without reloading window
in between. In that case a data fragment is reused which throws.

It's also the first step in dropping {{simple-select}} which is very outdated.
2018-12-31 12:09:17 +01:00
Jeldrik Hanschke
bcd4bc7ac6 upgrade to ember 3.4 2018-12-31 10:17:03 +01:00
Jeldrik Hanschke
71d303174e refactor: drop ember-array-computed-macros 2018-12-30 01:04:33 +01:00
Jeldrik Hanschke
b8d4087aaf fix: validation errors should be translated
https://github.com/jasonmit/ember-i18n-cp-validations/tree/v3.1.0#breaking-changes-between-2x-and-3x-for-ember-i18n-cp-validations
2018-12-29 21:23:29 +01:00
Jeldrik Hanschke
11265cb82d deps: upgrade ember to 2.18 2018-12-29 20:23:19 +01:00
Jeldrik Hanschke
8f90414f0c deps: upgrade ember-cli-mirage 2018-12-29 20:23:19 +01:00
Jeldrik Hanschke
97e447bbe7 deps: yarn upgrade 2018-12-29 20:23:19 +01:00
jelhan
9c4bd9e669
upgrade ember-bootstrap and ember-bootstrap-cp-validations to latest versions (#146)
Ember Bootstrap has changed a lot since the very outdated pre 1.0 release
which was used here. Changes are mostly about using composable components
and closure actions.

Also replaces PhantomJS with Chrome in CI cause PhantomJS is also very
outdated and causing test failure not related to any real world issues.
Ember CLI has replaced PhantomJS with Chrome in v2.15.1, which is the
upfollowing minor release to the version currently used.
2018-10-28 22:54:14 +01:00
jelhan
ee8c64e031 show expiration date and warn if poll will expire in next days (#140)
Closes #121
2017-08-26 02:14:09 +02:00
jelhan
ee6728314a replace jstimezonedetect by moment.tz.guess() (#139)
Closes #118
2017-08-26 01:54:41 +02:00
jelhan
565b426b03 tests/dummyData is not used anymore since 87ad9b0506 2017-08-13 20:43:33 +02:00
jelhan
64a9dea5e7 refactor dates handling (#137)
* Remove dates ArrayProxy.
* Use moment template helpers.
* Pass timezone and locale directly to moment template helper to avoid issues.
2017-08-11 16:39:36 +02:00
jelhan
cf8068cd8e remove file which has been added accidentally in 632c36eb12 2017-08-01 16:26:18 +02:00
jelhan
0407d28260 remove tests which just duplicates some tests allready done at tests/acceptance/create-a-poll-test.js 2017-08-01 16:24:10 +02:00
jelhan
5575629fb6 Legacy support is an acceptance test atleast since it's using a mocked api. 2017-08-01 16:23:35 +02:00
jelhan
2f1e729e2c Fix: second pretender instance warning 2017-08-01 10:26:38 +02:00
jelhan
87ad9b0506 use ember-cli-mirage to mock api 2017-08-01 09:49:02 +02:00
jelhan
0f3aa1bc56 Fix tests in IE 11 2017-08-01 09:48:48 +02:00
jelhan
1df562b352 refactor {{poll-evaluation-chart}} and {{poll-evaluation-participants-table}} interfaces to make them less complex 2017-08-01 09:48:48 +02:00
jelhan
632c36eb12 updates dependencies and fixes property modified twice in a single render deprecations 2017-08-01 09:48:48 +02:00
jelhan
364147f4b6 fix build issue by updating ember-moment 2017-07-25 17:17:39 +02:00
jelhan
d76783c9cf refactor form navigation to use a component 2016-09-23 19:39:31 +02:00
jelhan
ae0ad7bd42 Import sjcl by newly added Anonymous AMD Support
Fixes: `invalid aes key size` error in sjcl 1.0.5 and 1.0.6.

https://github.com/ember-cli/ember-cli/pull/5976
2016-09-20 02:01:33 +02:00