51 Commits

Author SHA1 Message Date
Alina Beck
1ecfee09db hide embed remove button when viewing post 2019-10-07 10:37:52 +02:00
Alina Beck
4a1ca2610a show overlay only for embedded html 2019-10-02 18:23:30 +02:00
Alina Beck
1f93c690be only display available data 2019-10-02 18:05:29 +02:00
Alina Beck
8c78fef457 toggle preview image with showEmbed 2019-10-02 16:55:30 +02:00
Alina Beck
c46c13dbdf toggle overlay with methods 2019-10-02 16:37:52 +02:00
Alina Beck
99629991d0 style embed preview 2019-10-02 15:49:23 +02:00
Alina Beck
ec12171e80 style embed overlay 2019-10-02 15:11:43 +02:00
roschaefer
2f90a45da7 Follow @Tirokk's review and fix a bug
The bug happened because the hashtag link won't get parsed by the
extension. This is desired for mentions because you don't want to
re-notify a user if you haven't updated the text in which you notify
somebody. For hashtags this is undesired and would lead to transforming
the hashtag link into a normal link on the next edit of a post.
2019-09-17 11:09:45 +02:00
roschaefer
a8222c5290 Remove obsolete code
I believe this is obsolete code. Could someone double-check?

@mattwr18 I tried to see any difference to `master` and I couldn't. Did
I miss sth.?

For context: During my work on https://github.com/Human-Connection/Human-Connection/pull/1517
the webapp was complaining about missing mutations when I changed the
dropdown.
2019-09-10 03:35:10 +02:00
Wolfgang Huß
0df086e07f Rename variables 2019-09-04 15:38:28 +02:00
mattwr18
fdee7efa03 Fix lint 2019-09-04 08:12:11 +02:00
mattwr18
9bb0884f89 Follow @alina-beck's PR suggestions
- save regex to descriptive variables
2019-09-03 22:10:02 +02:00
mattwr18
2d9cd96867 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1395-hashtags-imported-with-not-allowed-chars 2019-09-03 17:44:53 +02:00
Matt Rider
accb8ae505 Follow @alina-beck's suggestions
- set items to the full list of hashtags or users to avoid unnecessarily reassigning the items variable based on suggestionType
- refactor tests to trigger onFilter, which calls filterSuggestionList, then check that it returns a maximum of 15 items both for queries and empty queries
- fix description with incorrect type(users, instead of hashtags)
- return 15 items, not 14
2019-09-02 15:43:18 +02:00
Matt Rider
cf10b650ae Limit suggestions list to 15, add component tests 2019-09-02 10:42:37 +02:00
Wolfgang Huß
0bc4c558ae Refactore the import and hashtags to all unicode characters
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-08-29 17:02:02 +02:00
Alina Beck
9b405377f9 fix input height in all browsers 2019-08-28 20:16:17 +01:00
Alina Beck
604789b32e check for empty values 2019-08-27 16:37:28 +01:00
Alina Beck
a1c402ce8d style editor input field 2019-08-27 13:36:00 +01:00
Alina Beck
f47502ade1 survive empty urls 2019-08-26 16:38:33 +01:00
Alina Beck
1df3cb1ed1 get link input to work 2019-08-26 16:08:46 +01:00
Alina Beck
62e34bf5b0 refactor suggestion list 2019-08-26 12:46:46 +01:00
Alina Beck
5c4ec0dd19 use constants for keycodes and mention types 2019-08-26 11:58:15 +01:00
Alina Beck
dc70da8826 make optional extensions a computed property 2019-08-24 12:42:34 +01:00
Alina Beck
6b452a2217 refactor duplicate code 2019-08-24 11:59:59 +01:00
Alina Beck
af985ba95c rename suggestions menu to suggestion list 2019-08-24 10:44:37 +01:00
Alina Beck
62775a93d6 put link input in separate component 2019-08-24 10:42:24 +01:00
Alina Beck
2c0b2ed482 place tippy popup in renderless component 2019-08-23 23:21:24 +01:00
Alina Beck
fbe4de347b extract suggestions menu into separate component 2019-08-23 22:30:05 +01:00
Alina Beck
cbb0d79331 put link bubble back in (wip) 2019-08-23 17:37:17 +01:00
Alina Beck
ee00a3b3df replace floating and bubble menu with menu bar 2019-08-23 15:49:20 +01:00
Wolfgang Huß
f653bac9e1 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 1017-send-out-notifications-on-create-omment
# Conflicts:
#	backend/src/middleware/handleHtmlContent/handleContentData.spec.js
2019-08-16 18:22:36 +02:00
roschaefer
51b734275a The name of the hashtag is now it's ID
`name` was just a redundant attribute
2019-08-16 01:49:29 +02:00
Wolfgang Huß
6ab9a3204b Fix the backend test 2019-08-15 11:07:57 +02:00
Wolfgang Huß
c2357d32b3 Fixed broken Editor tests without breaking the Mentions and the Hashtags in the Editor 2019-08-15 07:52:49 +02:00
Wolfgang Huß
43c2764fcf Fix mentions and hashtags in editor 2019-08-14 18:05:03 +02:00
Matt Rider
1930e5bafe Add some component tests, rename files
- with new naming schema
2019-08-08 17:04:23 +02:00
Matt Rider
21aa729edb Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1017-send-out-notifications-on-create-omment 2019-08-08 09:10:18 +02:00
Robert Schäfer
72edf78889 Meld a chaotic commit history into one commit
Some important commit messages:

```
    Fix youtu.be not being embedded

    And also try to maintain the old behaviour matching
    `provider.provider_url`.
```

```
    Remove confusing code comments and obsolete code

    I discovered that the behaviour of no duplicate notifications being send
    out is caused by the frontend: When the editor reads html from the
    backend, it will parse hashtags and mentions as ordinary links, not as
    their respective nodes during editing. Also, we don't have to worry
    about duplicate ids being found: The cypher statement will implicitly
    suppress duplicate notification nodes for the same user.

    So let's remove the code to avoid confusing the next developer.
```

```
    Test editor.getHTML()

    I do this because I'm not able to test the content of `this.editor` from
    a wrapper of `vue-test-utils`. If I call `this.editor.getHTML` directly
    and use it as a computed property `renderedContent` to populate a `<div
    v-html="renderedContent" />` this will not work for the embeds. So, my
    current best bet is to test the editor object isolated from a real
    component. ;(
```

```
    Add core-js as explicit dependency

    Because of build errors on Travis.

    See: https://stackoverflow.com/a/55313456

    Remove as soon as this issue is resolved:
    https://github.com/storybookjs/storybook/issues/7591

```

```
    Refactor: Keep Runtime-only builds

    See: https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
```
2019-08-01 00:28:22 +02:00
Robert Schäfer
455eac1031 Merge remote-tracking branch 'origin/master' into storybook 2019-07-22 13:27:32 +02:00
Wolfgang Huß
6430c9e1bf Comment can notify a Mention of a User in the database
Frontend notification is still missing.
2019-07-15 09:42:24 +02:00
Wolfgang Huß
5aec13caa1 Refactored avoiding Hashtags in Comments 2019-07-15 09:03:09 +02:00
Wolfgang Huß
1255a46b7a Avoid Hashtags in Comments in the Editor
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-07-10 18:35:19 +02:00
Robert Schäfer
6f24f066d6 Revert "Get rid of obsolete /search/hashtag page"
This reverts commit ec19c732e5678544d8dfd50c25f2c33e5aeb217e.

Ok, native module URL cannot parse relative URLs. It ensures that all parts
of the URL are present. So I'll revert this to get the ball rolling. We
can refactor out the obsolete page later on.

FYI @Tirokk
2019-07-09 14:39:28 +02:00
Robert Schäfer
ec19c732e5 Get rid of obsolete /search/hashtag page
@Tirokk there is this neat URL module: https://nodejs.org/api/url.html

It has convenience methods for adding query params. I'm just not quite
sure about browser compatibility though.
2019-07-08 23:10:46 +02:00
Wolfgang Huß
e69f292bd8 Hashtags restricted in the chars, in Editor Suggestions and Backend
Refactor Seeding with Tag ids as Tag names.
In Frontend: Done as a suggestion with all the forbidden chars removed.
In Backend by Regex only the fitting links.
Rewrite backend test to make sure Hashtag „id“ is the name of the Hashtag.
Test for „https://www.example.org/#anchor“

Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-07-08 19:25:57 +02:00
Wolfgang Huß
a4cf2d3ee8 Store Hashtags of Post content in database and write a lot of tests
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-07-01 20:13:28 +02:00
Robert Schäfer
b70e5be8b1 Follow file naming convention
All components should consist of a folder with these three files:
```
README.d
index.vue
spec.js
```

When you import components, omit the `index.vue`. That helps to `git
grep` for component names.
2019-04-16 01:39:47 +02:00
Robert Schäfer
f760f37186 Pass entire user collection to Editor 2019-04-16 01:39:47 +02:00
Robert Schäfer
2529c62137 Copy+paste from tiptap example
See https://github.com/scrumpy/tiptap/blob/master/examples/Components/Routes/Suggestions/index.vue
2019-04-16 01:39:47 +02:00