* feat(backend): resize images with imagor
Open questions:
* Do we have external URLs for images? E.g. we have them for seeds. But
in production?
* Do we want to apply image transformations on these as well? My current
implementation does not apply image transformations as of now. If we
want to do that, we will also expose internal URLs in the kubernetes
Cluster to the S3 endpoint to the client.
TODOs:
* The chat component is using a fixed size for all avatars at the moment.
Maybe we can pair-program on this how to implement responsive images in
this component library.
Commits:
* do not replace upload domain url in the database
* fix all webapp specs
* refactor: remove behaviour we won't need
We don't want to apply image transformations on files, right?
* refactor: replace the domain on read not on write
* wip: webapp fixes
* refactor(backend): add another url to config
I've given up. There seems to be no nice way to tell the minio to return
a location which differs from it's host name.
* refactor: add test for s3Service
* refactor(backend): proxy minio via backend in local development
Commits:
* provide tests for message attachments
* remove S3_PUBLIC_URL config value
* refactor: follow @ulfgebhardt's review
* add missing environment variable
---------
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
* refactor(graphql): Introduce image type
* Undo changes to .travis.yml
* chore: Upgrade travis to node LTS
- URL is available since v10
* chore: use lts
Co-authored-by: mattwr18 <mattwr18@gmail.com>
While refactoring the login form component I found many inconsistent
ways of importing the list of locales. So I decided to refactor the
imports altogether. Don't use `process.env` to import locales!
- We want to remove the html from the count, and trucate just the
content; otherwise, we can have a situation where a person mentions
several people, but only the the first user's name appears, and not a
predetermined number of characters.
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.
Fix#820
Ok, so after I would have to use the same method in three different
locations (`<ds-card>` expects an `image` attribute but cannot render
entire components) I decided to implement the prefix of image urls with
a filter rather than a component. The downside of this is that we have
to add the filter on a lot of component tests. The benefit is less
components and hopefully less complexity.
Unfortunately with `v-html` you cannot use filters directly in
handlebars.
See: https://github.com/nuxt/nuxt.js/issues/231
I also fixed the tests even **without** mocking vue-filters.js plugin 👍
cc @Tirokk@ulfgebhardt @appinteractive
This is a perfect example why I insist on writing tests. While debugging
@Tirokk and I discovered several design flaws and plugins that depend on
each other. The solution to all of this is not to use vue-filters plugin
at all! Vue-filters depends on Vuex, i18n, vuex-i18n, nuxt-modules and so
on.
This is just bad, bad, bad code. Start writing tests. Now.
We should start to refactor vue-filters and use components instead.