208 Commits

Author SHA1 Message Date
Robert Schäfer
9987ad1c95 Merge branch 'master' of github.com:Human-Connection/Nitro-Web into 37-full-text-search-top-bar 2019-03-18 15:08:31 +01:00
Robert Schäfer
41cf347f21 Fix ReportContent.feature 2019-03-16 19:41:56 +01:00
Robert Schäfer
c2e6416d44 Add post.createdAt in the bottom right corner
@appinteractive feel free to change styling if this is too much visual
clutter.
2019-03-16 12:35:46 +01:00
Robert Schäfer
67686d0af9 Refactoring for consistency
The disabled/deleted part comes first (similar to guard clauses)
2019-03-15 20:12:56 +01:00
Robert Schäfer
f33f3a4d16 Report/disable message shows data of the resource 2019-03-15 19:56:21 +01:00
Robert Schäfer
07731ca548 Nuxt-link makes showAuthorPopover unneccessary 2019-03-15 17:26:30 +01:00
Robert Schäfer
6beabf7eda Moderators see a red border around disabled users 2019-03-15 17:12:52 +01:00
Robert Schäfer
7bc3214d98 User component shows anonymus if disabled 2019-03-15 17:03:43 +01:00
Robert Schäfer
e6af5a11ab Tests pass 2019-03-15 16:56:24 +01:00
Robert Schäfer
3fad432858 Merge Author+RelatedUser into User component 2019-03-15 16:47:51 +01:00
Robert Schäfer
fc244cd098 More honest translations 2019-03-14 23:21:19 +01:00
Robert Schäfer
e0dd39d5fc Fix bug: No red border of comment for user 2019-03-14 23:17:20 +01:00
Robert Schäfer
7160006eed Show red border for moderators 2019-03-14 02:11:17 +01:00
Robert Schäfer
c2d7002795 Translations 2019-03-14 02:11:17 +01:00
Robert Schäfer
48a85b4af3 Copy+paste from post/_slug page 2019-03-14 02:11:17 +01:00
Robert Schäfer
08d0679a67 Show the comment content if you are a moderator 2019-03-14 02:11:17 +01:00
Robert Schäfer
bb2a6c052e Comment component shows content unless disabled 2019-03-14 02:11:17 +01:00
Robert Schäfer
4845904ddf Sketch comment component 2019-03-14 02:11:17 +01:00
Matt Rider
22eec97551 Fix onSelect test to use realistic results 2019-03-13 11:29:41 -03:00
Robert Schäfer
0ba0d2f0a2 Implement effects but remove modals from DOM 2019-03-12 23:26:56 +01:00
Robert Schäfer
58852cb566 Visually distinguish disabled content
with beautiful orange border 😆

cc @appinteractive
2019-03-12 21:47:37 +01:00
Matt Rider
16e75e4464 Refactor SearchInput
- break focus and blur into two functions
- add failing test for onSelect function

Co-authored-by: Wolfgang Huss <wolle.huss@pjannto.com>
2019-03-12 14:31:29 -03:00
Matt Rider
85ffd67a49 Merge branch 'master' of github.com:Human-Connection/Nitro-Web into 37-full-text-search-top-bar 2019-03-12 12:49:48 -03:00
Robert Schäfer
3b7ffde4c2 Merge branch 'master' of github.com:Human-Connection/Nitro-Web into get_rid_of_resource_type 2019-03-12 13:26:56 +01:00
Matt Rider
c4dff9a916 Add tests for onDelete, query functions 2019-03-11 18:36:32 -03:00
Matt Rider
168278d76a Add component tests checking custom functions
- clear()
- handleInput()
- onEnter()
2019-03-11 17:59:24 -03:00
Robert Schäfer
ff926ae35f Bugfix: ReportModal keeps showing success screen 2019-03-10 18:24:37 +01:00
Robert Schäfer
9eba745b83 We probably don't even need 'disabled' property 2019-03-10 15:47:23 +01:00
Robert Schäfer
7efc56a227 Fine-tune styling 2019-03-10 15:24:04 +01:00
Robert Schäfer
4cc02a6200 Import ReportModal in Modal 2019-03-10 15:19:23 +01:00
Robert Schäfer
bc2471c5df Refactor ReportModal 2019-03-10 15:19:23 +01:00
Robert Schäfer
b7ca8a426b Render modals in a closed state and hide
I found out that when you umount the modals completely you don't get the
nice hide effect of `<ds-modal>`. It should be safe to still have all
modals in the DOM.
2019-03-10 15:19:23 +01:00
Robert Schäfer
0b9ad5c395 Refactor context => resourceType
@appinteractive `context` is probably the broadest term you can think
of. If possible avoid and prefer a descriptive name.
2019-03-10 15:19:23 +01:00
Robert Schäfer
3b7308c7ef ModalWrapper closes if DisableModel closes 2019-03-10 15:19:23 +01:00
Robert Schäfer
7d7a1be43d Refactor: Put id in data.resource object 2019-03-10 15:19:23 +01:00
Robert Schäfer
173c2c3281 Test+implement modal wrapper for DisableModal 2019-03-10 15:19:23 +01:00
Robert Schäfer
b1bc46e170 DisableModal ready 2019-03-10 15:19:23 +01:00
Robert Schäfer
ca397b6674 Behaviour of DisableModal fully tested 2019-03-10 15:19:23 +01:00
Robert Schäfer
61e6773e86 Sketch a component test for DisableModal 2019-03-10 15:19:23 +01:00
Robert Schäfer
cdc9cd0af2 Await async mehtods in ReportModal.spec.js 2019-03-10 15:19:23 +01:00
Robert Schäfer
03422920a2 Start to implement wrapper modal 2019-03-10 15:19:23 +01:00
Robert Schäfer
525da7a303 Without vue-portal all the oddities vanish
CC @Tirokk @mattwr18 @appinteractive

Major breakthrough: If I remove `vue-portal` entirely from the
styleguide, problem solved. Not only that we can remove the TODOs from
the tests. Even wrappers of subcomponents get updated when I interact
with the root component. What a bliss 😂

Example code:
```js
let button = wrapper.find('div div div button')
expect(button.attributes()).toEqual({disabled: 'disabled'})
wrapper.doSomeAction()
expect(button.attributes()).toEqual({})
```
2019-03-09 12:20:23 +01:00
Robert Schäfer
2831af469a Remove all code related to vue-portal 2019-03-09 12:20:23 +01:00
Matt Rider
3355c5d85e Remove unused variable 2019-03-08 17:46:06 -03:00
Matt Rider
796b2d8488 Merge branch 'master' of github.com:Human-Connection/Nitro-Web into 37-full-text-search-top-bar 2019-03-08 17:39:20 -03:00
Matt Rider
92aacf6900 Write more component tests
- test the default props values
- test that is open changes when focused on or on blur
- test that the input is clearable, failing still
2019-03-08 17:35:02 -03:00
Robert Schäfer
93a0e6654d Fledge out the test case for ReportModal
@Tirokk I think I could narrow down our problem to an additional call of
Wrapper(). The fact that we have to call it at least twice is a strong
indicator of non-atomic tests, which is bad.
2019-03-08 20:41:17 +01:00
Robert Schäfer
c0d545bae0 Refactor ReportModal
@Tirokk and I had a hard time to reason about the then/catch block if
$toast is undefined.
2019-03-08 20:41:17 +01:00
Robert Schäfer
193cff45e2 Test ReportModal with a wrapper component
... called ModalTestbed
2019-03-08 20:41:17 +01:00
Robert Schäfer
2a1276cdc3 Better test ReportModal first 2019-03-08 20:41:17 +01:00