Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

ability to at-mention users in bucket comments #383

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

jlopker
Copy link
Contributor

@jlopker jlopker commented Dec 16, 2017

No description provided.

@jlopker
Copy link
Contributor Author

jlopker commented Jan 3, 2018

@chime-mu

a problem that I'm not sure how to fix.. I'm using #{root_url} for the user links in the email but it's interpolating that to mean localhost:3000 which is the backend root. when i use #{root_url} in the emails templates, it interpolates correctly to localhost:9000. do you know anything about why this is happening?

@chime-mu
Copy link
Contributor

@jlopker There's <br> and a </a> in the comment, so still a mixture of HTML and markdown

This is from parameters in the POST http://localhost:3000/api/v1/comments

body: Test I can do basic markdown _italic_ <br><br>*another italic*<br><br>**bold** </a><br>

@chime-mu
Copy link
Contributor

@jlopker When I use a header all text become header sized:

body: # Header<br><br>Normal text<br><br>Another line<br>

skaermbillede 2018-02-21 kl 16 56 03

@jlopker
Copy link
Contributor Author

jlopker commented Feb 22, 2018

@chime-mu Ok this is officially the most annoying feature ever. But! I think I may gotten it..

The comment field is a contenteditable div rather than a textarea which is why we were getting all that html markup. From my current thinking, it needs to be contenteditable because we need to transform the user name into something that carries information about the userid. And because we can't hide that kind of information in textareas, I thought we needed a contenteditable div.

I'm now using jQuery to strip out the html and turn the inputted comment into text. It's not an elegant solution though :(. I tested it with all the kinds of markup I could think of and it seems to be working. Let me know how it goes for you! Thanks.

@chime-mu
Copy link
Contributor

chime-mu commented Feb 26, 2018

@jlopker Now linebreaks are completely gone.

This is expected output (taken from prod):

skaermbillede 2018-02-26 kl 23 18 44

This is what happens in the @-mention branch:

skaermbillede 2018-02-26 kl 23 19 56

For the header problem, this is expected output:

skaermbillede 2018-02-26 kl 23 21 23

This is what happens in the @-mention branch:

skaermbillede 2018-02-26 kl 23 22 16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants