167 Commits

Author SHA1 Message Date
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
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
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
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
Robert Schäfer
e10b9fde74 Fix translations, lint and some tests 2019-03-08 20:41:17 +01:00
Matt Rider
3cebb0eea0 Update ReportModal to work with back end 2019-03-08 20:41:17 +01:00
Robert Schäfer
44b216f138 Scaffold DisableModal and .spec 2019-03-08 20:41:16 +01:00
Grzegorz Leoniec
c71f6fb07c
Merge remote-tracking branch 'origin/master' into distinct-shouts-and-follows 2019-03-06 18:46:16 +01:00
Grzegorz Leoniec
d848929302
Improved countTo component 2019-03-06 18:45:57 +01:00
Grzegorz Leoniec
78c9b83282
Fixed follow stats 2019-03-06 13:08:26 +01:00
Grzegorz Leoniec
29dac5c5a3
Removed unused voted var from author component 2019-03-05 17:37:48 +01:00
Grzegorz Leoniec
8792f02932
Improved follow button optimistic behavior 2019-03-05 17:35:41 +01:00
Grzegorz Leoniec
d9b633c5ae
Make follow button update instant 2019-03-05 17:26:20 +01:00
Grzegorz Leoniec
d30649164a
Improved following and shout behavior 2019-03-05 17:19:35 +01:00
Grzegorz Leoniec
66edec0dc8
Translated shot button 2019-03-05 14:30:02 +01:00
Grzegorz Leoniec
1423101ca5
Disable shouting for own content 2019-03-05 14:18:06 +01:00
Grzegorz Leoniec
33ef91ee08
Fixed an issue with following state update 2019-03-05 13:47:33 +01:00
Grzegorz Leoniec
e20d3fb214
Improved following button and translated it 2019-03-05 13:43:09 +01:00
Grzegorz Leoniec
975c0c80f9
Added unshout functionality to shout button 2019-03-05 12:53:46 +01:00
Grzegorz Leoniec
30e7c57764
Fixed shout and follow behavior 2019-03-05 11:39:55 +01:00
Grzegorz Leoniec
dc13467294
Use new follow mutation 2019-03-05 11:21:19 +01:00