Conversation
|
I don't get why are the tests failing... |
|
The problem is I don't understand enough about the express router - it looks like it is colliding with the Changing like below works: |
i can't find such a code in my local instance, where is that from? |
/server/homebrew.api.js 510:router.put('/api/:id/:author', checkClientVersion, asyncHandler(api.deleteAuthor)); Oh, bother, I got ahead of myself on the cut and pastes and pasted the same one twice. It was colliding with |
|
huh, well, i fixed that, but the tests are still failing |
|
Weird. It passes locally. |
Particularly weird because looking at the test that failed, it passed. |
The log results above are showing a failing result for coverage. The individual tests are passing with correct outputs, but test coverage is failing:
|
…nto add-remove-author-if-owner
Gazook89
left a comment
There was a problem hiding this comment.
Left a few design related comments.
…nto add-remove-author-if-owner
Gazook89
left a comment
There was a problem hiding this comment.
What about this:
- crown squashed vertically just a bit and rotated with
transform: rotate(-25deg) scaleY(0.6);and positioned to hang on the corner - set only the tag that is the current user to bold; so not the owner, but the currently logged in user if they are one of the authors. Logically I think if you are viewing the editor the current user must be in that list (or at least in the Invited Authors list).
- remove the
text-decorationon the hyperlink (useany-linkselector). - change the
titleattribute on the user profile link to say "Author - Click to open [username]'s profile in a new tab" and set the link to open in a new tab. - and because there are now two actions in the tag (a link and a button), I really think that the 'remove' button needs some sort of hover effect...either changing the "x" color or fading in a background color of some sort for that button.
All that said, none of that is key to the functionality and isn't really a blocker to the PR for me.
…nto add-remove-author-if-owner
…nto add-remove-author-if-owner
…nto add-remove-author-if-owner

This PR introduces a check for ownership in app.js, which is prop drilled into editPage and there used to render the author list differently depending on if the user is author or owner.
UI:
Ownership is checked again on the server side, just in case.