47 Commits

Author SHA1 Message Date
Markus
dfd84f921c [fix] adds white space after mention in comment editor 2023-05-19 15:15:41 +02:00
Moriz Wahl
6eb5ad25af get all components tests running 2023-02-15 11:12:19 +01:00
Wolfgang Huß
e82d35c824 Fix linting 2022-08-25 23:17:50 +02:00
roschaefer
92fba41286 Replace example link 2020-06-05 14:18:08 +02:00
Raphael Beer
5fad066819
Change: selectable: false on LegacyEmbed schema 2020-04-02 02:12:27 +02:00
roschaefer
276ea79e8f Update prettier to v2 2020-03-24 21:11:11 +01:00
Alina Beck
2b1f0b1c4a
Merge pull request #2288 from Human-Connection/migrate-styleguide-icons
Migrate styleguide icons
2019-11-27 13:28:56 +03:00
mattwr18
aeac1edb32 Add LegacyEmbeds component to fix bug 2019-11-22 12:58:57 +01:00
Alina Beck
a210dd599d Merge branch 'master' into migrate-styleguide-icons 2019-11-20 19:35:03 +03:00
Alina Beck
77f4810ddc set up global localVue
by setting up localVue with all required plugins (such as styleguide and vuex)
in a separate testSetup file we can avoid doing this individually in all component tests
the testSetup is executed before each test suite, so each test file gets a fresh
instance of localVue
2019-11-20 12:31:40 +03:00
Marco Bomfim
f921244661 fix(editor): Fix hashtags not working after embeded content
Up to this point, once you've inserted a given URL to the editor, and it renders a new embeded content, if you hit Return, and try using a tag, or mention, it would not work since the paragraph was never closed, causing a sintatic error that rendered the mentions unable to be used unless you explicitly hit return again, to escape the given text block you were in. See the PR/Issue for further info.
2019-11-06 16:24:48 -03:00
ogerly
7cc139e879 add test embeds and links 2019-10-08 13:20:07 +02:00
mattwr18
da1df27799 Extract logic to EmbedComponent to separate concerns
- Co-authored-by: senderfm <dev@sender.fm>
2019-10-07 19:15:39 +02:00
Alina Beck
9350994cca use translations for data privacy warning 2019-10-07 11:12:48 +02:00
Alina Beck
1ecfee09db hide embed remove button when viewing post 2019-10-07 10:37:52 +02:00
ogerly
574fbcf8b1 tests ok, lint ok 2019-10-07 10:32:11 +02:00
ogerly
fd697f5f12 Template changed for removeEmbed() function 2019-10-03 10:09:51 +02:00
ogerly
3607bf9551 befor alinas work 2019-10-03 09:20:17 +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
3a013d0607 update settings on button click instead of checkbox click 2019-10-02 17:10:08 +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
ogerly
17323aeb25 logic ok 2019-10-01 11:00:14 +02:00
ogerly
63d5140420 break two - two 2019-09-30 11:38:29 +02:00
ogerly
27121a1077 break two 2019-09-30 11:29:43 +02:00
ogerly
e8f771b59a first mega PR crazy update, all work 2019-09-25 18:39:01 +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
Wolfgang Huß
02c6bf70f3 Change the dummy domain to https://human-connection.org 2019-09-17 10:16:12 +02:00
roschaefer
431de3319f Make data-hashtag-id authoritive for #links
This adds consistency: The mention links with `@` was implemented
that way already. Instead of parsing the URL, we add some redundancy and
add another attribute: data-hashtag-id

So, what characters are valid for html attributes?
Read: https://stackoverflow.com/questions/925994/what-characters-are-allowed-in-an-html-attribute-name

Thanks to @Tirokk, who added some validations on the hahstag ids, I
think we are all set. If you try to write a hashtag with a `"` double
quotation mark for example, it gets automatically replaced with a valid
hashtag. If someone wants to send us invalid hashtag ids to the backend
directly, the regex there would filter it out.
2019-09-16 23:09:32 +02:00
Wolfgang Huß
82d5ac99df Make hashtag links URL safe 2019-09-16 22:06:36 +02:00
Robert Schäfer
8093fece00 Update URL regex taking e.g. "?" into account 2019-08-05 13:25:50 +02:00
Robert Schäfer
b797ce4b15 Follow @Tirokk's suggestions:
* Add target="_blank" (on embeds only!)
* When pasting a link, the cursor position is moved after the paste
* Can't reproduce a link slipping into the embed in front of it

@Tirokk it is an unpleasant side efffect that mentions + hastags appear
differently on Edit+View. That's because they don't get parsed from
HTML, it's a one way, they are write only. So, when viewing content,
hashtags and mentions appear as plain links. I don't think I can do
anything about it.

Regarding some links not being embedded: Only those links that have an
oembed provider in this file:
f44d0f1f96/backend/src/schema/resolvers/embeds/providers.json
...will be embedded. Your example `http://backreaction.blogspot.com` and `https://de.wikipedia.org/wiki/Yin_und_Yang`
have no embed provider and won't be embedded.

We would have to add oembed providers to this list if we wanted to embed those
links, too.
2019-08-02 23:18:10 +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
Matt Rider
30c5558925 Add href to link 2019-07-02 16:25:34 -03:00
Grzegorz Leoniec
6d852b5803 Added basic embed link rendering 2019-06-26 00:44:44 +02:00
Wolfgang Huß
5018e60a13 Renamed Tag to Hashtag in the Frontend
Not in the database yet …
2019-06-21 14:10:56 +02:00
Wolfgang Huß
ffbe0b949a Translate menu item, renamed variables and tried to get hashtag to work correct 2019-06-20 08:40:05 +02:00
Wolfgang Huß
4725b8cbd2 Got Tags as # in the editor as an extension to work 2019-06-19 09:12:26 +02:00
Wolfgang Huß
4e780f52dc Copy and refactoring Mentions to Tags, Started 2019-06-17 18:44:17 +02:00
5202763dd8
frontend lint fixes 2019-05-23 19:40:39 +02:00
Robert Schäfer
e247d25aee Open mentioning link in new tab
This will help some people not to loose data after accidently clicking
on the user @-mentioning.
2019-04-16 22:11:07 +02:00
Robert Schäfer
b21df879c6 Fix lint 2019-04-16 01:39:47 +02:00
Robert Schäfer
d87a0d5694 Customize Mention node based on Superclass 2019-04-16 01:39:47 +02:00