Commit graph

505 commits

Author SHA1 Message Date
Jeldrik Hanschke
fdebb93be4
remove IE11 support (#400) 2020-04-29 23:39:57 +02: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
33886f3c4e
fix link to GitHub used in translated text (#355) 2020-01-21 22:16:21 +01:00
Jeldrik Hanschke
77afc0d9fa
remove implicit this usage in templates (#352)
This refactors references to values in templates from `{{foo}}` to either `{{this.foo}}` if it's a property of backing JavaScript class or `{{@foo}}` if it's passed in on invocation.

You could find more details on this change in Ember docs:
- [required `this` in templates](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_required-this-in-templates)
- [named arguments](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_named-arguments)

While doing this I noticed that `<PollEvaluationSummaryOption>` component could be easily refactored to a template-only component. Done it as part of this pull request even so it's technically not related.
2020-01-18 12:17:06 +01:00
Jeldrik Hanschke
c9482786c1
refactor to native ECMAScript classes (#344)
Replaces Ember's old object model by native ECMAScript classes. Mostly automated with ember-native-class-codemod.
2020-01-18 10:13:50 +01:00
Jeldrik Hanschke
9983f76189
refactor form steps implementation (#345) 2020-01-13 17:13:23 +01:00
Jeldrik Hanschke
061b9a0d4a
use ember data modules for import (#340) 2020-01-08 15:58:52 +01:00
Jeldrik Hanschke
18ba1b6bbc
convert component invocation to angle brackets (#339) 2020-01-08 15:58:10 +01:00
Jeldrik Hanschke
7e784434b6
Upgrade Ember to 3.15 and other deps (#338) 2020-01-08 15:57:46 +01:00
Jeldrik Hanschke
da16d8d199
Add and delete buttons should indicate focus (#332)
Add and delete buttons used for option creation don't have any text (except
for screenreader) but only an icon. Open Iconic uses a display: inline-block
for icons as default. But that one prevents text decoration from being applied.
Since text decoration is used to visually indicate focus, that's a serious
accessibility issue.

Closes #293
2020-01-05 15:36:54 +01:00
Jeldrik Hanschke
31118748ce
improve spanish translation (#333)
Accordingly to a spanish user the translation for validation error "Times
must be explicit" should be "Horas deben ser explícitas". Changed the
template accordingly. Hopefully that also makes sense for other unique
validations.

Closes #311
2020-01-03 13:41:31 +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
0544cdfe45
fix typo in german translation (#325)
s/behälst/behältst/
2019-12-18 19:44:26 +01:00
vmaffione
eeadc1806e Improve italian translations (#317)
* Improve italian translations

* increase allowed bundle size
2019-12-09 10:20:29 +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
Jeldrik Hanschke
d27a6a4202
scroll to invalid form element if it's behind form navigation buttons (#307)
A form element may be in view port but hidden by form navigation buttons
with have a fixed position on mobile. In that case the form element should
still be scrolled to top of view port to make it visible.
2019-11-17 19:15:55 +01:00
Jeldrik Hanschke
91e3ccfb4b
scroll invalid radio groups into focus on submission (#305) 2019-11-15 23:24:54 +01:00
Jeldrik Hanschke
eb421142c0
radio inputs used on participation form should have validation feedback classes (#304) 2019-11-15 23:08:59 +01:00
renovate[bot]
2dc5c22409 Update dependency ember-bootstrap to v3 (#255) 2019-11-14 21:18:52 +01:00
Jeldrik Hanschke
0da3dc8b02
next/save button should get focus before back button (#298) 2019-11-12 21:56:47 +01:00
Jeldrik Hanschke
d8c316cd75
validation become visible should not alter position of calendar (#296) 2019-11-11 22:34:16 +01:00
Jeldrik Hanschke
cf6d59bf84
readd colors indicating answer to participant table (#289) 2019-11-10 17:44:44 +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
49d380bef6
firefox is not scrolling up enough if it's triggered to early (#288) 2019-11-09 13:20:27 +01:00
Jeldrik Hanschke
bde9254fd7
remove partially filled validation error on clear (#283) 2019-11-03 19:19:55 +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
919aae0df9
use specific validation error if name is not unique on poll participation (#280) 2019-11-02 18:47:27 +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
75a198f3e6
upgrade ember-source to ~3.13 (#266)
Also fixes an issue with owner injection. This must be done in `.create()` and not on `.extend()`. Ember 3.13 seems to be more strict about that one.
2019-10-29 12:31:22 +01:00
renovate[bot]
7e189ab83c Update dependency ember-power-calendar to ^0.14.0 (#239) 2019-10-29 10:43:06 +01:00
Jeldrik Hanschke
b421d19601
refactor step management and do not allow going forward with invalid state (#263)
Also removes an observer that causes a "You modified 'disabled' twice in a single render" and executes the logic in the next run loop to prevent that error. That's not ideal but it's not time for a major refactoring of that part.
2019-10-29 08:42:00 +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
Jeldrik Hanschke
6e26789b8b improve positioning of validation feedback
Also refactors the template to use Octance features.
2019-10-28 13:18:53 +01:00
Jeldrik Hanschke
56643d08eb fix missing validation feedback for input groups
Ember Boostrap adds `.d-block` class to validation feedback in order to
make it visible for input-group in which the `.invalid-feedback` is not
a silbing of `.form-control`.

This fixes the invisble validation feedback on /create/options (poll type:
answer a question) and /create/options-datetime (poll type: find a date).
2019-10-28 13:18:53 +01:00
Jeldrik Hanschke
6b0bb68919
fix invisible validation error message for date selection (#257) 2019-10-20 12:43:27 +02:00
jelhan
2ed888711b
show flash message if creating poll failed (#222) 2019-06-15 00:50:55 +02:00
jelhan
07da863520
fix typo resulting in missing translation strings (#224) 2019-06-15 00:04:32 +02: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
32e5971aba Fixed some typographic issues and typos and stylistic issues with the en localisation (#215)
* Fixed some typos/stylistic issues with the english localisation strings
* typographically correct ellipsis
* typographically correct apostrophe
* typographically correct em dash
2019-06-10 19:51:30 +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
08f2a81ac1
Drop jQuery (#196)
Drops ember-radio-buttons addon and uses a plain input element instead. ember-radio-buttons doesn't seem to be maintained anymore and required jQuery. Also plain input element seems to be much easier to maintain.

Replaces ember-ajax by ember-fetch as ember-ajax is build on top of jQuery.ajax().

This reduces the bundle size by 25 KB (JavaScript) after gzip. Updating the size limit accordingly.
2019-05-22 12:29:29 +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
95d53baae9
refactor: remove route actions (#166) 2019-02-24 00:32:37 +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
96f1990542 fix: label should reflect validation state of all times of a day 2019-01-03 00:46:36 +01:00
Jeldrik Hanschke
cf9efe993b refactor: replace LESS by SASS 2019-01-02 23:48:48 +01:00
Jeldrik Hanschke
af4fe70f72 refactor: drop ember-simple-select 2019-01-02 23:48:36 +01:00
Jeldrik Hanschke
3091f9ac5e deps: upgrade ember-page-title
Current page title is put before generic one, e.g. "Create a poll | Croodle"
instead of "Croodle | Create a poll". This was an upstream change with
could reasoning. Have a look here:
https://github.com/adopted-ember-addons/ember-page-title/releases/tag/5.0.0

Version 4.0.0 required the `{{head-layout}}` component in application's
template:
https://github.com/adopted-ember-addons/ember-page-title/releases/tag/4.0.0
2018-12-31 14:12:21 +01:00
Jeldrik Hanschke
3330151156 refactor: drop unnecessary dynamic component usage 2018-12-31 12:09:23 +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
b7e63ed83b refactor: replace ember-object-at-helper by ember-composable-helpers 2018-12-30 10:06:49 +01:00
Jeldrik Hanschke
71d303174e refactor: drop ember-array-computed-macros 2018-12-30 01:04:33 +01:00
jelhan
b8af8ea121
Merge pull request #148 from jelhan/fix-translation-of-validation-errors
fix: validation errors should be translated
2018-12-29 22:09:22 +01:00
Jeldrik Hanschke
8f591e2978 refactor: use version provided in config in favor of ember-cli-build-info 2018-12-29 22:09:14 +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
78ddf381c1 deps: upgrade ember-cli-bootstrap-datepicker
Drops another bower dependency. 🎉
2018-12-29 20:23:19 +01:00
Jeldrik Hanschke
6592102837 deps: upgrade ember-cp-validations to 3.x 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
fe826666ba Fixes "TypeError: attempted to assign to readonly property" in Safari 10.1 2017-08-31 14:24:49 +02: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
fc342b6c05 Fix: poll creation time is not displayed as formatted
Also fixes #122
2017-08-13 20:32:23 +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
e99a2f13b8 Fix: chart options are overriden by poll options
Bug introduced by 1df562b352.
2017-08-03 16:44:38 +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
96ec32aa3e Fix: ember-i18n does not provide a default locale configuration for catalan 2017-08-01 09:48:48 +02:00
jelhan
53a34fcc2f Fixes DEPRECATION: Importing from the model-fragments module is deprecated.
Instead import from `ember-data-model-fragments
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
jorge_SD
b517f0dee2 improve spanish translations 2017-07-29 15:16:56 +02:00
jelhan
13598fbe1b include catalan and italian locales for moment and bootstrap-datepicker 2017-07-28 10:52:22 +02:00
jorge_SD
1b815f0ee9 add italian and catalan translations; improve english translations 2017-07-28 10:40:22 +02:00
jelhan
364147f4b6 fix build issue by updating ember-moment 2017-07-25 17:17:39 +02:00
heavygale
9f05db9b2e Small tweaks for the german translation 2017-07-04 10:48:35 +02:00
jelhan
495d56c6ea language selct should allways be inline
`.form-inline` only applies to forms within viewports that are at least 768px wide.
2017-02-09 17:34:05 +01:00
jelhan
b5b547fce6 Fix: assets should be relative to index.html to support installation in subdirectories 2016-12-25 23:01:22 +01:00
jelhan
387e6adcdc improve detection of language prefered by user 2016-12-03 20:44:40 +01:00
jelhan
d76783c9cf refactor form navigation to use a component 2016-09-23 19:39:31 +02:00
jelhan
fa0ac48500 Readd spanish translation
thanks to @rugk
2016-09-20 11:50:04 +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
jelhan
fd0d7ffd39 update ember to 2.8 and ember-cli to 2.9.0-beta.1 2016-09-20 02:01:26 +02:00
jelhan
17b7f81dea UX: next and back buttons in create wizzard in xs and sm 2016-09-18 20:44:22 +02:00
jelhan
ed87a86c2c Fixes #115 2016-09-18 20:16:17 +02:00
rugk
e97c666458
Improve CSP header & add Referrer-Policy 2016-09-02 21:35:55 +02:00
jelhan
d6f7bb761c Fixed some typos
Thanks to @aehm03 for reporting via twitter:
https://twitter.com/aehm03/status/770918866658754560
2016-08-31 12:12:37 +02:00
jelhan
d5705b2c3b Fix: participation table header should not overflow container
Was introduced by this breaking change in jquery.floatThead:
3973eb523a
2016-08-30 11:10:05 +02:00
jelhan
9b221e7861 add a test for saving a new poll fails due to server 2016-08-26 19:04:50 +02:00
jelhan
545f3b0664 autofocus first form element
currently not working for date selection (calendar) since this one did not
support keyboard navigation

part of #94
2016-08-26 00:10:22 +02:00
jelhan
e735587c93 update floatThead and drop CSP unsafe-inline requirement
Closes #90
2016-08-23 11:43:58 +02:00
jelhan
94b4dc6f82 use localStorage instead of cookie to save locale setting
there is no need to tell the server which locale is prefered by client
2016-08-21 14:31:39 +02:00
jelhan
d8db29ecd9 adds back button to create wizard
Part of #76
2016-08-21 00:38:44 +02:00
jelhan
9a33e08ac4 browser should not mess around with our validation logic 2016-08-20 23:41:27 +02:00
jelhan
17d4a3feda save button should have suitable text 2016-08-20 23:35:54 +02:00
jelhan
8441c92295 use poll title as page title
Part of #76
2016-08-20 23:28:39 +02:00
jelhan
afb06e4f12 Fix: novalidate option of {{bs-form}} should be true (and not string 'true')
This had been fixed in ember-bootstrap 0.9.0
2016-08-20 22:59:50 +02:00
jelhan
8d9278a9ee show validation immediately after change for select and radio buttons
Introduced this feature by https://github.com/kaliber5/ember-bootstrap/pull/127
2016-08-20 22:51:21 +02:00
jelhan
5613dfdd43 add button for copying poll link
closes #95
2016-08-20 22:02:53 +02:00